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

Add create copilot payments options. #334

Merged
merged 1 commit into from
Jul 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ angular.module('topcoderX').controller('ProjectController', ['currentUser', '$sc
rocketChatWebhook: null,
rocketChatChannelName: null,
archived: false,
createCopilotPayments: false
};
if ($rootScope.project) {
$scope.title = 'Manage a Project';
Expand Down
4 changes: 4 additions & 0 deletions src/front/src/app/upsertproject/upsertproject.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ <h2>{{title}}</h2>
Rocket Chat Channel Name is required.</span>
<br />
</div>
<label class="form-label" style="margin-bottom: 0px;">Create Copilot Payments?</label>
<input class="checkbox-control" style="margin-top: 0;" type="checkbox" ng-model="project.createCopilotPayments" ng-checked="project.createCopilotPayments === 'true'"
ng-model="project.createCopilotPayments" ng-true-value="'true'" ng-false-value="'false'" />
<br />
<label class="form-label">Archived:</label>
<input class="checkbox-control" type="checkbox" ng-model="project.archived" ng-checked="project.archived === 'true'"
ng-model="project.archived" ng-true-value="'true'" ng-false-value="'false'" />
Expand Down
3 changes: 2 additions & 1 deletion src/models/Project.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ const schema = new Schema({
updatedAt: {
type: Date,
default: Date.now,
}
},
createCopilotPayments: {type: String, required: false}
});

module.exports = schema;
2 changes: 2 additions & 0 deletions src/services/ProjectService.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const projectSchema = {
registeredWebhookId: Joi.string().allow(null),
createdAt: Joi.date(),
updatedAt: Joi.date(),
createCopilotPayments: Joi.boolean()
},
currentUser: currentUserSchema,
};
Expand All @@ -63,6 +64,7 @@ const createProjectSchema = {
rocketChatWebhook: Joi.string().allow(null),
rocketChatChannelName: Joi.string().allow(null),
archived: Joi.boolean().required(),
createCopilotPayments: Joi.boolean()
},
currentUser: currentUserSchema
};
Expand Down