Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@
},
computed: {
showRequiredLabel() {
if (this.audioVideoUpload) {
return false;
}
return (
this.selectedDuration !== DurationDropdownMap.EXACT_TIME &&
this.selectedCompletion === CompletionDropdownMap.completeDuration
Expand All @@ -121,7 +124,7 @@
return this.convertToMinutes(this.value);
},
set(value) {
this.handleValidateMinutes(value);
this.handleUpdatedInput(value);
},
},
maxRange() {
Expand Down Expand Up @@ -152,20 +155,17 @@
},
},
created() {
this.handleValidateMinutes = debounce(this.validateMinutes, 500);
this.handleUpdatedInput = debounce(this.handleInput, 500);
},
methods: {
convertToMinutes(seconds) {
return Math.floor(seconds / 60);
},
validateMinutes(value) {
if (this.selectedDuration === DurationDropdownMap.EXACT_TIME) {
this.$emit('input', value * 60);
} else {
if (value >= this.minRange && value <= this.maxRange) {
this.$emit('input', value * 60);
}
}
convertToSeconds(minutes) {
return minutes * 60;
},
handleInput(value) {
this.$emit('input', this.convertToSeconds(value));
},
},
$trs: {
Expand Down
Loading