Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit abb5774

Browse files
authored
Merge pull request #334 from afrisalyp/issue-328
Add create copilot payments options.
2 parents cebdcb6 + b045d54 commit abb5774

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

src/front/src/app/upsertproject/upsertproject.controller.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ angular.module('topcoderX').controller('ProjectController', ['currentUser', '$sc
2424
rocketChatWebhook: null,
2525
rocketChatChannelName: null,
2626
archived: false,
27+
createCopilotPayments: false
2728
};
2829
if ($rootScope.project) {
2930
$scope.title = 'Manage a Project';

src/front/src/app/upsertproject/upsertproject.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ <h2>{{title}}</h2>
8787
Rocket Chat Channel Name is required.</span>
8888
<br />
8989
</div>
90+
<label class="form-label" style="margin-bottom: 0px;">Create Copilot Payments?</label>
91+
<input class="checkbox-control" style="margin-top: 0;" type="checkbox" ng-model="project.createCopilotPayments" ng-checked="project.createCopilotPayments === 'true'"
92+
ng-model="project.createCopilotPayments" ng-true-value="'true'" ng-false-value="'false'" />
93+
<br />
9094
<label class="form-label">Archived:</label>
9195
<input class="checkbox-control" type="checkbox" ng-model="project.archived" ng-checked="project.archived === 'true'"
9296
ng-model="project.archived" ng-true-value="'true'" ng-false-value="'false'" />

src/models/Project.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ const schema = new Schema({
4242
updatedAt: {
4343
type: Date,
4444
default: Date.now,
45-
}
45+
},
46+
createCopilotPayments: {type: String, required: false}
4647
});
4748

4849
module.exports = schema;

src/services/ProjectService.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ const projectSchema = {
5050
registeredWebhookId: Joi.string().allow(null),
5151
createdAt: Joi.date(),
5252
updatedAt: Joi.date(),
53+
createCopilotPayments: Joi.boolean()
5354
},
5455
currentUser: currentUserSchema,
5556
};
@@ -63,6 +64,7 @@ const createProjectSchema = {
6364
rocketChatWebhook: Joi.string().allow(null),
6465
rocketChatChannelName: Joi.string().allow(null),
6566
archived: Joi.boolean().required(),
67+
createCopilotPayments: Joi.boolean()
6668
},
6769
currentUser: currentUserSchema
6870
};

0 commit comments

Comments
 (0)