Skip to content

Commit

Permalink
Merge pull request #1534 from frankrousseau/master
Browse files Browse the repository at this point in the history
[entities] Allow to set a resolution for any entity
  • Loading branch information
frankrousseau authored Sep 18, 2024
2 parents 52f565a + 1c16b81 commit eb0d620
Show file tree
Hide file tree
Showing 22 changed files with 404 additions and 143 deletions.
61 changes: 61 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1738,6 +1738,67 @@ tbody:last-child .empty-line:last-child {
display: none;
}
th .input-editor,
td .input-editor {
background: transparent;
border: 1px solid transparent;
color: $grey-strong;
height: 100%;
padding: 0.5rem;
width: 100%;
z-index: 100;
&:active,
&:focus,
&:hover {
background: transparent;
background: white;
}
&:active,
&:focus {
border: 1px solid $green;
}
&:hover {
border: 1px solid $light-green;
}
&:invalid,
&.error {
color: $red;
}
}
.dark {
th .input-editor,
td .select select,
td .input-editor {
color: $white;
option {
background: $dark-grey-light;
color: $white;
}
&:focus,
&:active,
&:hover {
background: $dark-grey-light;
}
}
}
td.frames,
td.framein,
td.frameout,
td.max-retakes,
td.resolution,
td.fps {
height: 3.1rem;
padding: 0;
}
.resizable {
th {
.resizable-knob {
Expand Down
64 changes: 61 additions & 3 deletions src/components/lists/AssetList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
>
{{ $t('assets.fields.description') }}
</th>

<th
scope="col"
class="time-spent number-cell"
Expand Down Expand Up @@ -143,6 +144,18 @@
{{ $t('main.estimation_short') }}
</th>

<th
scope="col"
class="resolution"
v-if="
isAssetResolution &&
isShowInfos &&
metadataDisplayHeaders.resolution
"
>
{{ $t('shots.fields.resolution') }}
</th>

<metadata-header
:key="'header' + descriptor.id"
:descriptor="descriptor"
Expand Down Expand Up @@ -189,13 +202,13 @@

<table-metadata-selector-menu
ref="headerMetadataSelectorMenu"
:metadata-display-headers.sync="metadataDisplayHeaders"
namespace="assets"
:descriptors="assetMetadataDescriptors"
:metadata-display-headers.sync="metadataDisplayHeaders"
:exclude="{
timeSpent: !isAssetTime,
estimation: !isAssetEstimation
}"
namespace="assets"
v-show="columnSelectorDisplayed && isShowInfos"
/>

Expand All @@ -215,7 +228,7 @@
v-for="(group, k) in displayedAssets"
v-if="!isLoading && isListVisible"
>
<tr class="datatable-type-header">
<tr class="datatable-type-header" v-if="group[0]">
<th scope="rowgroup" :colspan="visibleColumns">
<span
class="datatable-row-header pointer"
Expand Down Expand Up @@ -383,6 +396,42 @@
{{ formatDuration(asset.estimation) }}
</td>

<td
class="resolution"
v-if="
isAssetResolution &&
isShowInfos &&
metadataDisplayHeaders.resolution
"
>
<input
:class="{
'input-editor': true,
error: !isValidResolution(asset)
}"
:value="
getMetadataFieldValue({ field_name: 'resolution' }, asset)
"
@input="
event =>
onMetadataFieldChanged(
asset,
{ field_name: 'resolution' },
event
)
"
@keyup.ctrl="
event =>
onInputKeyUp(event, getIndex(i, k), descriptorLength + 3)
"
v-if="isCurrentUserManager"
/>

<span class="metadata-value selectable" v-else>
{{ getMetadataFieldValue({ field_name: 'resolution' }, asset) }}
</span>
</td>

<!-- other Metadata cells -->
<td
class="metadata-descriptor"
Expand Down Expand Up @@ -567,6 +616,7 @@ export default {
metadataDisplayHeaders: {
estimation: true,
readyFor: true,
resolution: true,
timeSpent: true
},
stickedColumns: {},
Expand All @@ -593,6 +643,7 @@ export default {
'displayedAssetsEstimation',
'nbSelectedTasks',
'isAssetDescription',
'isAssetResolution',
'isBigThumbnails',
'isCurrentUserClient',
'isCurrentUserManager',
Expand Down Expand Up @@ -956,6 +1007,12 @@ td.estimation {
width: 60px;
}
td.resolution {
min-width: 110px;
max-width: 110px;
width: 110px;
}
th.ready-for,
td.ready-for {
max-width: 180px;
Expand Down Expand Up @@ -1037,6 +1094,7 @@ input[type='number'] {
// Metadata cell CSS
td.resolution,
td.metadata-descriptor {
height: 3.1rem;
max-width: 120px;
Expand Down
46 changes: 46 additions & 0 deletions src/components/lists/EpisodeList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,14 @@
{{ $t('main.status') }}
</th>

<th
scope="col"
class="resolution selectable"
v-if="!isCurrentUserClient && isShowInfos && isEpisodeResolution"
>
{{ $t('shots.fields.resolution') }}
</th>

<validation-header
:key="columnId"
:hidden-columns="hiddenColumns"
Expand Down Expand Up @@ -357,6 +365,37 @@
</span>
</td>

<td class="resolution" v-if="isEpisodeResolution && isShowInfos">
<input
:class="{
'input-editor': true,
error: !isValidResolution(episode)
}"
:value="
getMetadataFieldValue({ field_name: 'resolution' }, episode)
"
@input="
event =>
onMetadataFieldChanged(
episode,
{ field_name: 'resolution' },
event
)
"
@keyup.ctrl="
event =>
onInputKeyUp(event, getIndex(i, k), descriptorLength + 3)
"
v-if="isCurrentUserManager"
/>

<span class="metadata-value selectable" v-else>
{{
getMetadataFieldValue({ field_name: 'resolution' }, episode)
}}
</span>
</td>

<validation-cell
:ref="`validation-${i}-${
j + stickedDisplayedValidationColumns.length
Expand Down Expand Up @@ -541,6 +580,7 @@ export default {
'isSingleEpisode',
'isEpisodeDescription',
'isEpisodeEstimation',
'isEpisodeResolution',
'isEpisodeTime',
'isShowAssignations',
'isShowInfos',
Expand Down Expand Up @@ -865,4 +905,10 @@ td .select {
.metadata-value {
padding: 0.8rem;
}
.resolution {
min-width: 110px;
max-width: 110px;
width: 110px;
}
</style>
46 changes: 46 additions & 0 deletions src/components/lists/SequenceList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,14 @@
{{ $t('sequences.fields.description') }}
</th>

<th
scope="col"
class="resolution"
v-if="isSequenceResolution && isShowInfos"
>
{{ $t('shots.fields.resolution') }}
</th>

<metadata-header
:key="descriptor.id"
:descriptor="descriptor"
Expand Down Expand Up @@ -289,6 +297,37 @@
"
/>

<td class="resolution" v-if="isSequenceResolution && isShowInfos">
<input
:class="{
'input-editor': true,
error: !isValidResolution(sequence)
}"
:value="
getMetadataFieldValue({ field_name: 'resolution' }, sequence)
"
@input="
event =>
onMetadataFieldChanged(
sequence,
{ field_name: 'resolution' },
event
)
"
@keyup.ctrl="
event =>
onInputKeyUp(event, getIndex(i, k), descriptorLength + 3)
"
v-if="isCurrentUserManager"
/>

<span class="metadata-value selectable" v-else>
{{
getMetadataFieldValue({ field_name: 'resolution' }, sequence)
}}
</span>
</td>

<!-- other Metadata cells -->
<td
class="metadata-descriptor"
Expand Down Expand Up @@ -506,6 +545,7 @@ export default {
'isSingleSequence',
'isSequenceDescription',
'isSequenceEstimation',
'isSequenceResolution',
'isSequenceTime',
'isShowAssignations',
'isShowInfos',
Expand Down Expand Up @@ -695,6 +735,12 @@ th.actions {
width: 70px;
}
td.resolution {
min-width: 110px;
max-width: 110px;
width: 110px;
}
td.name {
font-size: 1.2em;
}
Expand Down
Loading

0 comments on commit eb0d620

Please sign in to comment.