mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-23 12:43:48 -04:00
(bug)(admin) fix timesheets ('transferMethod is readonly')
This commit is contained in:
parent
f795186d81
commit
6046815f05
@ -87,6 +87,7 @@
|
||||
</div>
|
||||
|
||||
<section>
|
||||
<Debug :v="transferMethod"/>
|
||||
<p>
|
||||
<strong>Transfer method:</strong>
|
||||
<span v-for="(label, value) in transferMethods" class="form-check form-check-inline">
|
||||
@ -187,12 +188,29 @@ export default {
|
||||
months: MONTHS,
|
||||
transferMethods: TRANSFER_METHODS,
|
||||
|
||||
timesheet: this.buildTimesheet(this.persistent),
|
||||
transferMethod: this.persistent?.transfer || '',
|
||||
transferDetails: {
|
||||
bank_name: this.persistent?.details?.bank_name || '',
|
||||
bank_iban: this.persistent?.details?.bank_iban || '',
|
||||
bank_bic: this.persistent?.details?.bank_bic || '',
|
||||
paypal_email: this.persistent?.details?.paypal_email || '',
|
||||
charity_name: this.persistent?.details?.charity_name || '',
|
||||
charity_url: this.persistent?.details?.charity_url || '',
|
||||
notes: this.persistent?.details?.notes || '',
|
||||
},
|
||||
|
||||
focusMonth: null,
|
||||
focusArea: null,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
timesheet() {
|
||||
watch: {
|
||||
year() {
|
||||
this.$refs['cell-1-0'][0].focus();
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
buildTimesheet(persistent) {
|
||||
const timesheet = {};
|
||||
for (let y = min.year; y <= max.year; y++) {
|
||||
timesheet[y] = {};
|
||||
@ -202,33 +220,12 @@ export default {
|
||||
}
|
||||
timesheet[y][m] = {};
|
||||
for (const area of AREAS) {
|
||||
timesheet[y][m][area] = this.persistent?.timesheet?.[y]?.[m]?.[area] || 0;
|
||||
timesheet[y][m][area] = persistent?.timesheet?.[y]?.[m]?.[area] || 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
return timesheet;
|
||||
},
|
||||
transferMethod() {
|
||||
return this.persistent?.transfer || '';
|
||||
},
|
||||
transferDetails() {
|
||||
return {
|
||||
bank_name: this.persistent?.details?.bank_name || '',
|
||||
bank_iban: this.persistent?.details?.bank_iban || '',
|
||||
bank_bic: this.persistent?.details?.bank_bic || '',
|
||||
paypal_email: this.persistent?.details?.paypal_email || '',
|
||||
charity_name: this.persistent?.details?.charity_name || '',
|
||||
charity_url: this.persistent?.details?.charity_url || '',
|
||||
notes: this.persistent?.details?.notes || '',
|
||||
};
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
year() {
|
||||
this.$refs['cell-1-0'][0].focus();
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
dt(year, month) {
|
||||
return DateTime.local(parseInt(year), parseInt(month), 1);
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user