diff --git a/src/App.vue b/src/App.vue index f1bfbea668..4119dcf6c1 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1649,7 +1649,17 @@ tbody:last-child .empty-line:last-child { text-transform: uppercase; top: 0; vertical-align: middle; - z-index: 2; + // Header z-index hierarchy is built around the body taglist metadata + // cells which bump their own z-index up to 1000 so the open combo + // dropdown can spill over the next row (see td.metadata-descriptor + // inline z-index in AssetList.vue / ShotList.vue): + // body taglist ≤ 1000 + // body sticky-left 1001 (.datatable-row-header) + // header non-sticky 1002 (this rule) + // header sticky-left 1003 (.datatable-head .datatable-row-header) + // The +1 between body sticky-left and header non-sticky breaks the + // document-order tie at the vertical-scroll seam. + z-index: 1002; a { color: var(--text-alt); @@ -1700,7 +1710,7 @@ tbody:last-child .empty-line:last-child { } .datatable-row-header { - z-index: 4; + z-index: 1003; } .header-icon { visibility: hidden; @@ -1894,7 +1904,7 @@ tbody:last-child .empty-line:last-child { .datatable-row-header { position: sticky; left: 0; - z-index: 1; + z-index: 1001; border-right: 1px solid rgba(var(--border-rgb), 0.5); &::after { diff --git a/src/components/cells/BooleanCell.vue b/src/components/cells/BooleanCell.vue index f80242e805..fbb3c80950 100644 --- a/src/components/cells/BooleanCell.vue +++ b/src/components/cells/BooleanCell.vue @@ -4,23 +4,12 @@ - diff --git a/src/components/lists/HardwareItemList.vue b/src/components/lists/HardwareItemList.vue index 63244f8c4a..4f2ae28ca4 100644 --- a/src/components/lists/HardwareItemList.vue +++ b/src/components/lists/HardwareItemList.vue @@ -54,44 +54,23 @@

- {{ entries.length }} {{ $tc('hardware_items.number', entries.length) }} + {{ entries.length }} {{ $t('hardware_items.number', entries.length) }}

- diff --git a/src/components/lists/ShotList.vue b/src/components/lists/ShotList.vue index 1238c39dd5..05a52188e1 100644 --- a/src/components/lists/ShotList.vue +++ b/src/components/lists/ShotList.vue @@ -61,9 +61,6 @@ event => showMetadataHeaderMenu(descriptor.id, event) " is-stick - :style="{ - 'z-index': 1001 - }" v-for="(descriptor, j) in stickedVisibleMetadataDescriptors" /> diff --git a/src/components/lists/SoftwareLicenseList.vue b/src/components/lists/SoftwareLicenseList.vue index 89b7ebfa6a..837fcd3ef3 100644 --- a/src/components/lists/SoftwareLicenseList.vue +++ b/src/components/lists/SoftwareLicenseList.vue @@ -66,44 +66,23 @@

- {{ entries.length }} {{ $tc('software_licenses.number', entries.length) }} + {{ entries.length }} {{ $t('software_licenses.number', entries.length) }}

- diff --git a/src/components/lists/StudioList.vue b/src/components/lists/StudioList.vue index 1b48253bd8..d85bd722fd 100644 --- a/src/components/lists/StudioList.vue +++ b/src/components/lists/StudioList.vue @@ -7,7 +7,7 @@ {{ $t('studios.fields.name') }} - {{ $t('studios.fields.color') }} + {{ $t('studios.fields.color') }} @@ -42,18 +42,9 @@ import RowActionsCell from '@/components/cells/RowActionsCell.vue' import TableInfo from '@/components/widgets/TableInfo.vue' defineProps({ - entries: { - type: Array, - default: () => [] - }, - isLoading: { - type: Boolean, - default: false - }, - isError: { - type: Boolean, - default: false - } + entries: { type: Array, default: () => [] }, + isError: { type: Boolean, default: false }, + isLoading: { type: Boolean, default: false } }) defineEmits(['delete-clicked', 'edit-clicked']) diff --git a/src/components/mixins/descriptors.js b/src/components/mixins/descriptors.js index 8bc1c99a05..9eaa3c883f 100644 --- a/src/components/mixins/descriptors.js +++ b/src/components/mixins/descriptors.js @@ -8,6 +8,26 @@ import { mapGetters } from 'vuex' // for every row. Cache keyed by descriptor.id, cleared when it grows too large. const _checklistValuesCache = new Map() +export const getDescriptorChecklistValues = descriptor => { + const cached = _checklistValuesCache.get(descriptor.id) + if (cached) return cached + const values = descriptor.choices.reduce((result, choice) => { + if (choice && typeof choice === 'string' && choice.startsWith('[x] ')) { + result.push({ text: choice.slice(4), checked: true }) + } else if ( + choice && + typeof choice === 'string' && + choice.startsWith('[ ] ') + ) { + result.push({ text: choice.slice(4), checked: false }) + } + return result + }, []) + const result = values.length === descriptor.choices.length ? values : [] + _checklistValuesCache.set(descriptor.id, result) + return result +} + export const descriptorMixin = { emits: [ 'add-metadata', @@ -173,25 +193,7 @@ export const descriptorMixin = { } }, - getDescriptorChecklistValues(descriptor) { - const cached = _checklistValuesCache.get(descriptor.id) - if (cached) return cached - const values = descriptor.choices.reduce((result, choice) => { - if (choice && typeof choice === 'string' && choice.startsWith('[x] ')) { - result.push({ text: choice.slice(4), checked: true }) - } else if ( - choice && - typeof choice === 'string' && - choice.startsWith('[ ] ') - ) { - result.push({ text: choice.slice(4), checked: false }) - } - return result - }, []) - const result = values.length === descriptor.choices.length ? values : [] - _checklistValuesCache.set(descriptor.id, result) - return result - }, + getDescriptorChecklistValues, getMetadataChecklistValues(descriptor, entity) { let values diff --git a/src/components/modals/AddAttachmentModal.vue b/src/components/modals/AddAttachmentModal.vue index c73182fb21..ac4b357a51 100644 --- a/src/components/modals/AddAttachmentModal.vue +++ b/src/components/modals/AddAttachmentModal.vue @@ -29,7 +29,7 @@
- diff --git a/src/components/modals/BuildPeopleFilterModal.vue b/src/components/modals/BuildPeopleFilterModal.vue index bfb165f99f..60fd35874a 100644 --- a/src/components/modals/BuildPeopleFilterModal.vue +++ b/src/components/modals/BuildPeopleFilterModal.vue @@ -1,267 +1,175 @@ - diff --git a/src/components/modals/ChangePasswordModal.vue b/src/components/modals/ChangePasswordModal.vue index 26627f916e..b23c14ea77 100644 --- a/src/components/modals/ChangePasswordModal.vue +++ b/src/components/modals/ChangePasswordModal.vue @@ -1,211 +1,166 @@ - - + +// Watchers + +watch(() => props.person, resetForm) + +watch( + () => props.active, + active => { + if (active) { + resetForm() + setTimeout(() => { + firstPassword.value?.focus() + }, 100) + } + } +) + diff --git a/src/components/modals/ConfirmModal.vue b/src/components/modals/ConfirmModal.vue index ead967b30e..fff4c4b5ba 100644 --- a/src/components/modals/ConfirmModal.vue +++ b/src/components/modals/ConfirmModal.vue @@ -29,43 +29,23 @@
- + +// Watchers + +watch(() => props.backgroundToEdit, resetForm) + +watch( + () => props.active, + active => { + if (active) resetForm() + } +) + diff --git a/src/components/modals/EditBudgetEntryModal.vue b/src/components/modals/EditBudgetEntryModal.vue index 1eb3abf5cc..b3b4f518e9 100644 --- a/src/components/modals/EditBudgetEntryModal.vue +++ b/src/components/modals/EditBudgetEntryModal.vue @@ -98,242 +98,198 @@ - diff --git a/src/components/modals/EditEditModal.vue b/src/components/modals/EditEditModal.vue index 720b8a7c0d..d797ff96a0 100644 --- a/src/components/modals/EditEditModal.vue +++ b/src/components/modals/EditEditModal.vue @@ -1,261 +1,176 @@ - - - diff --git a/src/components/modals/EditEpisodeModal.vue b/src/components/modals/EditEpisodeModal.vue index 2b4dd3d1a5..59f3b7debd 100644 --- a/src/components/modals/EditEpisodeModal.vue +++ b/src/components/modals/EditEpisodeModal.vue @@ -1,223 +1,154 @@ - - +watch( + () => props.active, + active => { + if (active) resetForm() + } +) + +watch(() => props.episodeToEdit, resetForm) + +// Lifecycle + +onMounted(resetForm) + diff --git a/src/components/modals/EditHardwareItemModal.vue b/src/components/modals/EditHardwareItemModal.vue index 36656381a0..892e4f8eaf 100644 --- a/src/components/modals/EditHardwareItemModal.vue +++ b/src/components/modals/EditHardwareItemModal.vue @@ -48,126 +48,89 @@ - - +watch( + () => props.active, + active => { + if (active) { + setTimeout(() => { + nameField.value?.focus() + }, 100) + } + } +) + +watch(() => props.hardwareItemToEdit, resetForm) + +// Lifecycle + +onMounted(() => { + store.dispatch('loadHardwareItems') +}) + diff --git a/src/components/modals/EditHistoryModal.vue b/src/components/modals/EditHistoryModal.vue index 48aa911355..7eeb9a58b1 100644 --- a/src/components/modals/EditHistoryModal.vue +++ b/src/components/modals/EditHistoryModal.vue @@ -1,154 +1,121 @@ - + +// Watchers + +watch( + () => props.label, + label => { + form.value.label = label + } +) + +// Lifecycle + +onMounted(() => { + form.value.label = props.label +}) + diff --git a/src/components/modals/EditMilestoneModal.vue b/src/components/modals/EditMilestoneModal.vue index 1bdfc231d0..b7c68169ec 100644 --- a/src/components/modals/EditMilestoneModal.vue +++ b/src/components/modals/EditMilestoneModal.vue @@ -1,139 +1,108 @@ - diff --git a/src/components/modals/EditPersonModal.vue b/src/components/modals/EditPersonModal.vue index ef8054295c..76682318c3 100644 --- a/src/components/modals/EditPersonModal.vue +++ b/src/components/modals/EditPersonModal.vue @@ -1,218 +1,208 @@ - + +watch(() => props.playlistToEdit, resetForm) + +watch( + () => props.active, + active => { + if (active) { + forClient.value = props.playlistToEdit.for_client ? 'true' : 'false' + resetForm() + setTimeout(() => { + nameField.value?.focus() + }, 100) + } + } +) + diff --git a/src/components/modals/EditSearchFilterGroupModal.vue b/src/components/modals/EditSearchFilterGroupModal.vue index 1470a2373d..7ed767fdc1 100644 --- a/src/components/modals/EditSearchFilterGroupModal.vue +++ b/src/components/modals/EditSearchFilterGroupModal.vue @@ -1,170 +1,138 @@ - diff --git a/src/components/modals/EditSearchFilterModal.vue b/src/components/modals/EditSearchFilterModal.vue index 07875a1fd1..ef97d642e7 100644 --- a/src/components/modals/EditSearchFilterModal.vue +++ b/src/components/modals/EditSearchFilterModal.vue @@ -1,205 +1,170 @@ - diff --git a/src/components/modals/EditSequenceModal.vue b/src/components/modals/EditSequenceModal.vue index 2e37e7ddde..ad128bfb15 100644 --- a/src/components/modals/EditSequenceModal.vue +++ b/src/components/modals/EditSequenceModal.vue @@ -1,210 +1,130 @@ - - +// Watchers + +watch(() => props.active, resetForm) + +watch(() => props.sequenceToEdit, resetForm) + +// Lifecycle + +onMounted(() => { + if (props.active) resetForm() +}) + diff --git a/src/components/modals/EditShotModal.vue b/src/components/modals/EditShotModal.vue index bd6a8e3a11..eb446192ac 100644 --- a/src/components/modals/EditShotModal.vue +++ b/src/components/modals/EditShotModal.vue @@ -1,326 +1,203 @@ - - +watch( + () => props.active, + active => { + resetForm() + if (sequences.value.length === 0) { + store.dispatch('loadSequences') + } + if (active) { + setTimeout(() => { + nameField.value?.focus() + }, 100) + } + } +) + +watch(() => form.value.frameIn, updateNbFramesFromRange) +watch(() => form.value.frameOut, updateNbFramesFromRange) +watch(() => props.shotToEdit, resetForm) + +onMounted(resetForm) + diff --git a/src/components/modals/EditSoftwareLicenseModal.vue b/src/components/modals/EditSoftwareLicenseModal.vue index 1f83284206..98098203b7 100644 --- a/src/components/modals/EditSoftwareLicenseModal.vue +++ b/src/components/modals/EditSoftwareLicenseModal.vue @@ -60,134 +60,93 @@ - - +watch(() => props.softwareLicenseToEdit, resetForm) + +// Lifecycle + +onMounted(() => { + store.dispatch('loadSoftwareLicenses') +}) + diff --git a/src/components/modals/EditTaskStatusModal.vue b/src/components/modals/EditTaskStatusModal.vue index 181efd060f..a4032486cb 100644 --- a/src/components/modals/EditTaskStatusModal.vue +++ b/src/components/modals/EditTaskStatusModal.vue @@ -1,272 +1,231 @@ - - - diff --git a/src/components/modals/EditTaskTypeModal.vue b/src/components/modals/EditTaskTypeModal.vue index 53420fff6d..adb17cac79 100644 --- a/src/components/modals/EditTaskTypeModal.vue +++ b/src/components/modals/EditTaskTypeModal.vue @@ -1,223 +1,171 @@ - - - diff --git a/src/components/modals/ImportEdlModal.vue b/src/components/modals/ImportEdlModal.vue index 6c73231d6c..31b46558a0 100644 --- a/src/components/modals/ImportEdlModal.vue +++ b/src/components/modals/ImportEdlModal.vue @@ -1,177 +1,134 @@ - - + +// Watchers + +watch(currentProduction, updateNamingConvention) + +watch( + () => props.active, + () => { + formData.value = null + inputFile.value?.reset() + } +) + +// Lifecycle + +onMounted(() => { + formData.value = null + if (isTVShow.value) updateNamingConvention() +}) + diff --git a/src/components/modals/ImportModal.vue b/src/components/modals/ImportModal.vue index a00b6c11e2..2ed4c4a385 100644 --- a/src/components/modals/ImportModal.vue +++ b/src/components/modals/ImportModal.vue @@ -1,186 +1,143 @@ - diff --git a/src/components/modals/SetFramesFromTaskTypePreviewsModal.vue b/src/components/modals/SetFramesFromTaskTypePreviewsModal.vue index 2d5cd95346..f6bd73915d 100644 --- a/src/components/modals/SetFramesFromTaskTypePreviewsModal.vue +++ b/src/components/modals/SetFramesFromTaskTypePreviewsModal.vue @@ -1,117 +1,76 @@ - diff --git a/src/components/pages/HardwareItems.vue b/src/components/pages/HardwareItems.vue index a5ef450d59..de333caa10 100644 --- a/src/components/pages/HardwareItems.vue +++ b/src/components/pages/HardwareItems.vue @@ -41,219 +41,185 @@ - diff --git a/src/components/pages/SoftwareLicenses.vue b/src/components/pages/SoftwareLicenses.vue index 616a937b9a..becf8613f6 100644 --- a/src/components/pages/SoftwareLicenses.vue +++ b/src/components/pages/SoftwareLicenses.vue @@ -41,227 +41,193 @@ - diff --git a/src/components/pages/Studios.vue b/src/components/pages/Studios.vue index f2411940d9..08a67507ce 100644 --- a/src/components/pages/Studios.vue +++ b/src/components/pages/Studios.vue @@ -41,42 +41,47 @@ diff --git a/src/components/pages/budget/SalaryScale.vue b/src/components/pages/budget/SalaryScale.vue index 08562afac5..ace3c2301d 100644 --- a/src/components/pages/budget/SalaryScale.vue +++ b/src/components/pages/budget/SalaryScale.vue @@ -23,203 +23,43 @@ :key="department.id" v-for="department in departments" > - - - - - {{ $t('budget.positions.supervisor') }} - {{ $t('budget.seniorities.senior') }} - - - - - - {{ $t('budget.seniorities.mid') }} - - - - - - {{ $t('budget.seniorities.junior') }} - - - - - - {{ $t('budget.positions.lead') }} - {{ $t('budget.seniorities.senior') }} - - - - - - {{ $t('budget.seniorities.mid') }} - - - - - - {{ $t('budget.seniorities.junior') }} - - - - - - {{ $t('budget.positions.artist') }} - {{ $t('budget.seniorities.senior') }} - - - - - - {{ $t('budget.seniorities.mid') }} - - - - - - {{ $t('budget.seniorities.junior') }} - - - - + @@ -230,55 +70,47 @@ -