diff --git a/web/src/components/common/BulkUnassignModal.vue b/web/src/components/common/BulkUnassignModal.vue index fff0fdd0..8de3d5c4 100644 --- a/web/src/components/common/BulkUnassignModal.vue +++ b/web/src/components/common/BulkUnassignModal.vue @@ -126,13 +126,16 @@ mounted() { this.$root.$on('bv::modal::show', (bvEvent, modalId) => { - const constructDutyBlocks: Array = []; this.selectedDuties.forEach((sd) => { sd.dutyBlock?.forEach((db) => { const assignmentId = this.dutyRostersJson.find((dr) => dr.id === db.dutyId)?.assignmentId; const findAssignment = this.dutyRosterAssignmentsWeek.find((aw) => aw.assignmentDetail.id === assignmentId); - const assignmentName = findAssignment?.assignmentDetail?.name ? findAssignment.assignmentDetail.name : ''; + + let assignmentName = ''; + + if (findAssignment?.assignmentDetail?.name) assignmentName = findAssignment.assignmentDetail.name; + else if (findAssignment?.assignmentDetail?.lookupCode?.code) assignmentName = findAssignment.assignmentDetail.lookupCode.code; constructDutyBlocks.push({...db, assignmentName: assignmentName}); });