Skip to content

Commit

Permalink
AMP-2532:
Browse files Browse the repository at this point in the history
- move taskManager to Unit
- update references
  • Loading branch information
yingfeng-iu committed Aug 7, 2024
1 parent 03a1a07 commit 4892f42
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
8 changes: 4 additions & 4 deletions src/components/entity/EntityList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
<div class="row">
<div
class="text-left form-group"
:class="baseUrl === 'collection' ? 'col-6' : 'col-12'"
:class="baseUrl === 'unit' ? 'col-6' : 'col-12'"
>
<label>
<span class="text-capitalize">{{ baseUrl }}</span> Name:
Expand Down Expand Up @@ -211,16 +211,16 @@
</div>
<div
class="col-6 text-left form-group"
v-if="baseUrl === 'collection'"
v-if="baseUrl === 'unit'"
>
<label>Task Manager:</label>
<select
class="select custom-select w-100"
v-model="entity.taskManager"
:disabled="
showEdit ||
(baseUrl === 'collection' &&
!accessControl._collection._update)
(baseUrl === 'unit' &&
!accessControl._unit._update)
"
:class="{
'error-border': submitted && !entity.taskManager,
Expand Down
10 changes: 4 additions & 6 deletions src/service/entity-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,14 @@ export default class EntityService {
self.isDataChanged = false;
self.$bvToast.toast("Unit details updated successfully.", self.sharedService.successToastConfig);
});
} else if (self.baseUrl === 'collection') {
self.submitted = true;

// Collection Validation rules
if (!self.entity.name || !self.entity.taskManager) {

self.$bvToast.toast("Please provide required fields!", self.sharedService.erorrToastConfig);
return false;

}
} else if (self.baseUrl === 'collection') {
self.submitted = true;

// Collection Validation rules
if (!self.isCreatePage) {
self.collectionService.updateCollection(self.entity).then(response => {
self.$bvToast.toast("Collection details updated successfully", self.sharedService.successToastConfig);
Expand Down

0 comments on commit 4892f42

Please sign in to comment.