mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
update admin logic to be still intuitive
This commit is contained in:
parent
9dc7d08b3d
commit
5d22b5912d
@ -112,15 +112,10 @@ export default {
|
||||
combineResubmissionDateAndTime() {
|
||||
if (this.resubmissionDate) {
|
||||
const formattedDate = new Date(this.resubmissionDate)
|
||||
console.log('resubmission time: %s', this.resubmissionTime)
|
||||
const [hours, minutes] = this.resubmissionTime.split(':')
|
||||
console.log('hours: %s, minutes: %s', hours, minutes)
|
||||
formattedDate.setHours(parseInt(hours))
|
||||
console.log('set hours: %d', formattedDate.getHours())
|
||||
formattedDate.setMinutes(parseInt(minutes))
|
||||
console.log('set minutes: %d', formattedDate.getMinutes())
|
||||
console.log('IOS String: %s', formattedDate.toISOString())
|
||||
return formattedDate.toString()
|
||||
return formattedDate
|
||||
} else {
|
||||
return null
|
||||
}
|
||||
@ -136,14 +131,18 @@ export default {
|
||||
message: this.form.text,
|
||||
messageType: mType,
|
||||
resubmissionAt: this.showResubmissionDate
|
||||
? this.combineResubmissionDateAndTime()
|
||||
? this.combineResubmissionDateAndTime().toString()
|
||||
: null,
|
||||
},
|
||||
})
|
||||
.then((result) => {
|
||||
this.$emit('get-list-contribution-messages', this.contributionId)
|
||||
this.$emit('update-status', this.contributionId)
|
||||
this.form.text = ''
|
||||
if (this.showResubmissionDate && this.combineResubmissionDateAndTime() > new Date()) {
|
||||
this.$emit('update-contributions')
|
||||
} else {
|
||||
this.$emit('get-list-contribution-messages', this.contributionId)
|
||||
this.$emit('update-status', this.contributionId)
|
||||
}
|
||||
this.onReset()
|
||||
this.toastSuccess(this.$t('message.request'))
|
||||
this.loading = false
|
||||
})
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
@get-list-contribution-messages="$apollo.queries.Messages.refetch()"
|
||||
@update-status="updateStatus"
|
||||
@reload-contribution="reloadContribution"
|
||||
@update-contributions="updateContributions"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@ -79,6 +80,9 @@ export default {
|
||||
reloadContribution(id) {
|
||||
this.$emit('reload-contribution', id)
|
||||
},
|
||||
updateContributions() {
|
||||
this.$emit('update-contributions')
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -114,6 +114,7 @@
|
||||
:contributionMemo="row.item.memo"
|
||||
@update-status="updateStatus"
|
||||
@reload-contribution="reloadContribution"
|
||||
@update-contributions="updateContributions"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@ -176,6 +177,9 @@ export default {
|
||||
reloadContribution(id) {
|
||||
this.$emit('reload-contribution', id)
|
||||
},
|
||||
updateContributions() {
|
||||
this.$emit('update-contributions')
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -49,6 +49,7 @@ export default {
|
||||
// may be at some point we need a pagination here
|
||||
return {
|
||||
statusFilter: this.statusFilter,
|
||||
hideResubmission: true,
|
||||
}
|
||||
},
|
||||
update({ adminListContributions }) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user