Skip to content

Commit

Permalink
Merge pull request #1105 from frankrousseau/master
Browse files Browse the repository at this point in the history
Various fixes
  • Loading branch information
frankrousseau authored Jun 6, 2023
2 parents 616f1e3 + 3ee3a7f commit ae8f5d7
Show file tree
Hide file tree
Showing 29 changed files with 506 additions and 118 deletions.
5 changes: 5 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1892,6 +1892,11 @@ th.validation-cell {
}
}
.input.date-input {
border-radius: 10px;
}
.date-input::placeholder {
border-radius: 10px;
color: $light-grey;
Expand Down
6 changes: 6 additions & 0 deletions src/components/lists/AssetList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
v-if="
isCurrentUserManager &&
isShowInfos &&
!isAssetsOnly &&
metadataDisplayHeaders.readyFor
"
>
Expand Down Expand Up @@ -327,6 +328,7 @@
v-if="
isCurrentUserManager &&
isShowInfos &&
!isAssetsOnly &&
metadataDisplayHeaders.readyFor
"
>
Expand Down Expand Up @@ -676,6 +678,10 @@ export default {
},
...sortTaskTypes(this.productionShotTaskTypes, this.currentProduction)
]
},
isAssetsOnly () {
return this.currentProduction.production_type === 'assets'
}
},
Expand Down
12 changes: 8 additions & 4 deletions src/components/lists/TaskList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,14 @@
@click="selectTask($event, index, task)"
v-for="(task, index) in taskGroup.tasks"
>
<entity-thumbnail
<entity-preview
class="flexrow-item"
:entity="getEntity(task.entity.id)"
:width="200"
:height="133"
:width="200"
:empty-width="200"
:empty-height="133"
:show-movie="false"
no-preview
v-if="task.entity"
/>
Expand Down Expand Up @@ -241,13 +242,14 @@
@click="selectTask($event, index, task)"
v-for="(task, index) in displayedTasks"
>
<entity-thumbnail
<entity-preview
class="flexrow-item"
:entity="getEntity(task.entity.id)"
:width="200"
:height="133"
:width="200"
:empty-width="200"
:empty-height="133"
:show-movie="false"
no-preview
v-if="task.entity"
/>
Expand Down Expand Up @@ -300,6 +302,7 @@ import { formatListMixin } from '@/components/mixins/format'
import { domMixin } from '@/components/mixins/dom'
import DateField from '@/components/widgets/DateField'
import EntityPreview from '@/components/widgets/EntityPreview'
import EntityThumbnail from '@/components/widgets/EntityThumbnail'
import PeopleAvatarWithMenu from '@/components/widgets/PeopleAvatarWithMenu'
import TableInfo from '@/components/widgets/TableInfo'
Expand All @@ -312,6 +315,7 @@ export default {
components: {
DateField,
EntityPreview,
EntityThumbnail,
PeopleAvatarWithMenu,
TableInfo,
Expand Down
2 changes: 1 addition & 1 deletion src/components/lists/TodosList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@
:task-test="entry"
:is-border="false"
:is-assignees="false"
:selectable="!done"
:clickable="false"
:selected="
selectionGrid && selectionGrid[i] ? selectionGrid[i][0] : false
Expand Down Expand Up @@ -446,6 +445,7 @@ export default {
},
onTaskSelected(validationInfo) {
validationInfo.done = this.done
if (validationInfo.isShiftKey) {
if (this.lastSelection) {
let startX = this.lastSelection.x
Expand Down
2 changes: 1 addition & 1 deletion src/components/mixins/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,7 @@ export const playerMixin = {
},

setPlayerSpeed(rate) {
this.rawPlayer.setSpeed(rate)
if (this.rawPlayer) this.rawPlayer.setSpeed(rate)
if (this.rawPlayerComparison) this.rawPlayerComparison.setSpeed(rate)
},

Expand Down
50 changes: 50 additions & 0 deletions src/components/modals/BuildFilterModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,21 @@
v-model="hasThumbnail.value"
/>

<h3
class="subtitle flexrow-item mt2"
v-if="isAssets && !isAssetsOnly"
>
{{ $t('assets.fields.ready_for') }}
</h3>
<div class="flexrow" v-if="isAssets && !isAssetsOnly">
<combobox-task-type
class="flexrow-item"
:task-type-list="readyForTaskTypeList"
open-top
v-model="readyFor.taskTypeId"
/>
</div>

<h3 class="subtitle flexrow-item mt2" v-if="isShots">
{{ $t('entities.build_filter.is_assets_ready') }}
</h3>
Expand Down Expand Up @@ -308,6 +323,9 @@ export default {
{ label: 'without_thumbnail', value: '-withthumbnail' }
]
},
readyFor: {
taskTypeId: '',
},
isAssetsReady: {
value: 'nofilter',
taskTypeId: '',
Expand Down Expand Up @@ -351,6 +369,7 @@ export default {
'productionAssetTypes',
'productionTaskStatuses',
'productionTaskTypes',
'productionShotTaskTypes',
'sequenceSearchText',
'sequenceMetadataDescriptors',
'sequenceValidationColumns',
Expand All @@ -368,6 +387,10 @@ export default {
return this.entityType === 'shot'
},
isAssetsOnly () {
return this.currentProduction.production_type === 'assets'
},
assetTypeOptions() {
return [
{ label: this.$t('entities.build_filter.all_types'), value: '-' },
Expand All @@ -388,6 +411,16 @@ export default {
)
},
readyForTaskTypeList() {
return [
{
id: '',
color: '#999',
name: this.$t('news.all')
}
].concat(this.productionShotTaskTypes)
},
team() {
return this.currentProduction.team.map(pId => this.personMap.get(pId))
},
Expand Down Expand Up @@ -422,6 +455,7 @@ export default {
query = this.applyAssignationChoice(query)
query = this.applyThumbnailChoice(query)
query = this.applyUnionChoice(query)
query = this.applyReadyForChoice(query)
query = this.applyAssetsReadyChoice(query)
return query.trim()
},
Expand Down Expand Up @@ -499,6 +533,15 @@ export default {
return query
},
applyReadyForChoice(query) {
if (this.readyFor.taskTypeId !== '') {
const taskType = this.taskTypeMap.get(this.readyFor.taskTypeId)
console.log(this.readyFor.taskTypeId, taskType)
query = ` readyfor=[${taskType.name.toLowerCase()}]`
}
return query
},
applyAssetsReadyChoice(query) {
if (this.isAssetsReady.value !== 'nofilter') {
if (this.isAssetsReady.taskTypeId.length === 0) {
Expand Down Expand Up @@ -637,6 +680,8 @@ export default {
this.setFiltersFromAssignedToQuery(filter)
} else if (filter.type === 'thumbnail') {
this.setFiltersFromThumbnailQuery(filter)
} else if (filter.type === 'readyfor') {
this.setFiltersFromReadyForQuery(filter)
} else if (filter.type === 'assetsready') {
this.setFiltersFromAssetsReadyQuery(filter)
}
Expand Down Expand Up @@ -721,6 +766,10 @@ export default {
}
},
setFiltersFromReadyForQuery(filter) {
this.readyFor.taskTypeId = filter.value
},
setFiltersFromAssetsReadyQuery(filter) {
this.isAssetsReady.taskTypeId = filter.value
this.isAssetsReady.value = filter.excluding
Expand Down Expand Up @@ -758,6 +807,7 @@ export default {
this.reset()
this.assignation.taskTypeId =
this.taskTypeList.length > 0 ? this.taskTypeList[0].id : ''
this.readyFor.taskTypeId = ''
this.setFiltersFromCurrentQuery()
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/components/modals/EditAssetModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@ export default {
}
},
mounted() {
this.resetForm()
this.assetSuccessText = ''
},
computed: {
...mapGetters([
'assets',
Expand Down Expand Up @@ -184,11 +189,6 @@ export default {
}
},
mounted() {
this.resetForm()
this.assetSuccessText = ''
},
methods: {
...mapActions([]),
Expand Down
6 changes: 3 additions & 3 deletions src/components/modals/EditPersonModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
v-model="form.phone"
/>

<div class="departments">
<div class="departments field">
<label class="label">{{ $t('people.fields.departments') }}</label>
<div
class="department-element mb1"
class="department-element mb1 mt05"
:key="departmentId"
@click="removeDepartment(departmentId)"
v-for="departmentId in form.departments"
Expand All @@ -66,7 +66,7 @@
v-if="selectableDepartments.length > 0"
/>
<button
class="button is-success flexrow-item mb2"
class="button is-success flexrow-item"
:class="{
'is-disabled': selectedDepartment === null
}"
Expand Down
25 changes: 21 additions & 4 deletions src/components/modals/EditPlaylistModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,18 +122,31 @@ export default {
},
computed: {
...mapGetters(['currentEpisode', 'productionTaskTypes']),
...mapGetters([
'currentEpisode',
'currentProduction',
'productionTaskTypes'
]),
isEditing() {
return this.playlistToEdit && this.playlistToEdit.id
},
forEntityOptions() {
if (
this.currentEpisode &&
['main', 'all'].includes(this.currentEpisode.id)
(
this.currentEpisode &&
['main', 'all'].includes(this.currentEpisode.id)
) ||
this.currentProduction.production_type === 'assets'
) {
return [{ label: this.$t('assets.title'), value: 'asset' }]
} else if (
this.currentProduction.production_type === 'shots'
){
return [
{ label: this.$t('shots.title'), value: 'shot' }
]
} else {
return [
{ label: this.$t('assets.title'), value: 'asset' },
Expand All @@ -143,9 +156,13 @@ export default {
},
defaultForEntity() {
const isOnlyAssets = this.currentProduction.production_type === 'assets'
const isOnlyShots = this.currentProduction.production_type === 'shots'
const isAssetEpisode =
this.currentEpisode && ['all', 'main'].includes(this.currentEpisode.id)
return isAssetEpisode ? 'asset' : 'shot'
return (isAssetEpisode || isOnlyAssets) && !isOnlyShots
? 'asset'
: 'shot'
},
taskTypeList() {
Expand Down
29 changes: 20 additions & 9 deletions src/components/pages/Breakdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -457,15 +457,23 @@ export default {
]),
castingTypeOptions() {
const options = [
{
label: this.$t('assets.title'),
value: 'asset'
}
]
const isAssetsOnly = this.currentProduction.production_type === 'assets'
const isShotsOnly = this.currentProduction.production_type === 'shots'
const options = []
if (!isShotsOnly) {
options.push(
{
label: this.$t('assets.title'),
value: 'asset'
}
)
}
if (
!this.isTVShow ||
(this.currentEpisode && this.currentEpisode.id !== 'main')
!isAssetsOnly &&
(
!this.isTVShow ||
(this.currentEpisode && this.currentEpisode.id !== 'main')
)
) {
options.unshift({
label: this.$t('shots.title'),
Expand Down Expand Up @@ -696,7 +704,10 @@ export default {
this.setCastingSequence(this.sequenceId || 'all')
}
this.resetSelection()
if (this.currentEpisode && this.currentEpisode.id === 'main') {
if (
(this.currentEpisode && this.currentEpisode.id === 'main') ||
this.currentProduction.production_type === 'assets'
) {
this.castingType = 'asset'
}
})
Expand Down
Loading

0 comments on commit ae8f5d7

Please sign in to comment.