Skip to content

Commit

Permalink
Merge pull request #3598 from mikhailprivalov/modifyModalSheduleStati…
Browse files Browse the repository at this point in the history
…onar

Лист назначений - модальное окно расписания v2
  • Loading branch information
urchinpro authored Mar 12, 2024
2 parents 89c4c33 + 24a5197 commit 0b91f1d
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 7 deletions.
19 changes: 19 additions & 0 deletions l2-frontend/src/fields/AggregateAssignments.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<VeTable
:columns="columns"
:table-data="assignmentPagination"
:cell-style-option="cellStyleOption"
/>
<div
v-show="assignments.length === 0"
Expand All @@ -40,6 +41,7 @@
:service-number="currentResearchPk"
:direction-id="currentDirectionPk"
@hide="showSchedule = false"
@slotFilled="slotFilled"
/>
</div>
</template>
Expand Down Expand Up @@ -135,6 +137,16 @@ const pageNumberChange = (number: number) => {
const pageSizeChange = (size: number) => {
pageSize.value = size;
};
const cellStyleOption = {
bodyCellClass: ({ row }) => {
if (row.schedule_date) {
return 'table-body-cell-green';
}
return '';
},
};
const assignments = ref([]);
const getAssignments = async () => {
Expand All @@ -149,6 +161,10 @@ const assignmentPagination = computed(() => assignments.value.slice(
page.value * pageSize.value,
));
const slotFilled = () => {
getAssignments();
};
const printForm = () => {
window.open(`/forms/pdf?type=107.03&&hosp_pk=${props.direction}`);
};
Expand Down Expand Up @@ -201,4 +217,7 @@ onMounted(getAssignments);
color: #FFF;
}
}
.table-body-cell-green {
background: #a9cfbb !important;
}
</style>
14 changes: 7 additions & 7 deletions l2-frontend/src/modals/ScheduleModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
ref="modal"
show-footer="true"
white-bg="true"
max-width="600px"
max-width="800px"
width="100%"
height="20%"
height="50%"
margin-left-right="auto"
margin-top
class="an"
Expand All @@ -20,6 +20,7 @@
:card-id="props.cardPk"
:service-pk="props.serviceNumber"
:direction-id="props.directionId"
@fill-slot-ok="slotFilled"
/>
</div>
<div slot="footer">
Expand Down Expand Up @@ -59,14 +60,13 @@ const props = defineProps({
},
});
const emit = defineEmits(['hide']);
const emit = defineEmits(['hide', 'slotFilled']);
const hide = () => {
emit('hide');
};
const slotFilled = () => {
emit('slotFilled');
};
</script>

<style scoped lang="scss">
</style>

0 comments on commit 0b91f1d

Please sign in to comment.