add new event and attendance table with automatic now timestamp
All checks were successful
Build Quasar SPA and Go Backend for memberApp / build-spa (push) Successful in 2m34s
Build Quasar SPA and Go Backend for memberApp / build-backend (amd64, .exe, windows) (push) Successful in 5m39s
Build Quasar SPA and Go Backend for memberApp / build-backend (amd64, , linux) (push) Successful in 5m46s
Build Quasar SPA and Go Backend for memberApp / build-backend (arm, 6, , linux) (push) Successful in 5m32s
Build Quasar SPA and Go Backend for memberApp / build-backend (arm64, , linux) (push) Successful in 5m35s
All checks were successful
Build Quasar SPA and Go Backend for memberApp / build-spa (push) Successful in 2m34s
Build Quasar SPA and Go Backend for memberApp / build-backend (amd64, .exe, windows) (push) Successful in 5m39s
Build Quasar SPA and Go Backend for memberApp / build-backend (amd64, , linux) (push) Successful in 5m46s
Build Quasar SPA and Go Backend for memberApp / build-backend (arm, 6, , linux) (push) Successful in 5m32s
Build Quasar SPA and Go Backend for memberApp / build-backend (arm64, , linux) (push) Successful in 5m35s
This commit is contained in:
@@ -90,7 +90,7 @@
|
||||
</div>
|
||||
</q-form>
|
||||
<div class="row justify-center">
|
||||
<q-btn class="q-ma-md" color="primary" no-caps @click="save">Save</q-btn>
|
||||
<q-btn class="q-ma-md" color="primary" no-caps @click="save">{{ $t('save') }}</q-btn>
|
||||
</div>
|
||||
</DialogFrame>
|
||||
</template>
|
||||
@@ -101,6 +101,7 @@ import { ref } from 'vue';
|
||||
import { appApi } from 'src/boot/axios';
|
||||
import type { Member } from 'src/vueLib/models/member';
|
||||
import { useNotify } from 'src/vueLib/general/useNotify';
|
||||
import { i18n } from 'src/boot/lang';
|
||||
|
||||
const { NotifyResponse } = useNotify();
|
||||
const dialog = ref();
|
||||
@@ -158,18 +159,21 @@ function open(member: Member | null) {
|
||||
|
||||
async function save() {
|
||||
const valid = await form.value.validate();
|
||||
if (!valid) {
|
||||
NotifyResponse(i18n.global.t('notAllRequiredFieldsFilled'), 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
if (!valid) return;
|
||||
|
||||
let query = 'members/edit?id=' + localMember.value.id;
|
||||
let query = 'members/edit';
|
||||
if (newMember.value) {
|
||||
query = 'members/add';
|
||||
}
|
||||
|
||||
appApi
|
||||
.post(query, JSON.stringify(localMember.value))
|
||||
await appApi
|
||||
.post(query, JSON.stringify([localMember.value]))
|
||||
.then(() => {
|
||||
emit('update-member');
|
||||
NotifyResponse(i18n.global.t('memberUpdated'));
|
||||
dialog.value.close();
|
||||
})
|
||||
.catch((err) => NotifyResponse(err, 'error'));
|
||||
|
||||
Reference in New Issue
Block a user