This commit is contained in:
2024-11-13 15:34:28 +01:00
parent 636c5ba88f
commit c56e8a4968
6 changed files with 48 additions and 1 deletions
@@ -10,6 +10,7 @@ import type { IRegistration } from '@/shared/model/registration.model';
import RegistrationService from '@/entities/registration/registration.service';
import UserService from '@/entities/user/user.service';
import type AccountService from '@/account/account.service';
// import type EventService from '@/account/account.service';
export default defineComponent({
compatConfig: { MODE: 3 },
@@ -105,6 +106,7 @@ export default defineComponent({
alertService,
hasAnyAuthorityValues,
accountService,
eventService,
event,
...dataUtils,
formatDateShort,
@@ -127,5 +129,21 @@ export default defineComponent({
});
return this.hasAnyAuthorityValues[authorities] ?? false;
},
settle(): void {
this.isSaving = true;
if (this.event.id) {
this.eventService()
.settle(this.event)
.then(param => {
this.isSaving = false;
// this.previousState();
this.alertService.showInfo(`The event has been settled up`);
})
.catch(error => {
this.isSaving = false;
this.alertService.showHttpError(error.response);
});
}
},
},
});