mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
Update: Vue 2 to Vue 3 with Typescript, node 14 to node 22, Jenkinsfile, Dockerfile, vapor.yml (Post PROD Deployment)
This commit is contained in:
@@ -85,6 +85,7 @@ const submitForm = async () => {
|
|||||||
successHandler: () => {
|
successHandler: () => {
|
||||||
closeModal();
|
closeModal();
|
||||||
formHandler();
|
formHandler();
|
||||||
|
queueStore.reloadList({ name: "bookingDetailSection" });
|
||||||
},
|
},
|
||||||
errorHandler: (response: any) => {
|
errorHandler: (response: any) => {
|
||||||
formHandler(response.message);
|
formHandler(response.message);
|
||||||
|
|||||||
+12
-3
@@ -15,7 +15,7 @@
|
|||||||
<div class="btn btn-sm btn-success btn-block b-rad-none" data-dismiss="modal">Cancel</div>
|
<div class="btn btn-sm btn-success btn-block b-rad-none" data-dismiss="modal">Cancel</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col p-l-5">
|
<div class="col p-l-5">
|
||||||
<div class="btn btn-sm btn-danger btn-block b-rad-none" @click="submit(route('api.transaction.bill.status', item.id, 'pending'), 'put', section, true, true)">Confirm</div>
|
<div class="btn btn-sm btn-danger btn-block b-rad-none" @click="submit(route('api.transaction.bill.status', item.id, 'pending'), 'put', section, true, true, null, { successHandler })">Confirm</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -27,10 +27,13 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import { useUiStore } from '@/stores/ui';
|
import { useUiStore } from '@/stores/ui';
|
||||||
import { useRequest } from '@/composables/useRequest';
|
import { useFormHandler } from '@/composables/useFormHandler';
|
||||||
|
import { useQueueStore } from '@/stores/queue';
|
||||||
import { useComponentHandler } from '@/composables/useComponentHandler';
|
import { useComponentHandler } from '@/composables/useComponentHandler';
|
||||||
import route from '@/general/functions/router';
|
import route from '@/general/functions/router';
|
||||||
|
|
||||||
|
|
||||||
|
const queueStore = useQueueStore();
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
data: any;
|
data: any;
|
||||||
section: string;
|
section: string;
|
||||||
@@ -38,6 +41,12 @@ const props = defineProps<{
|
|||||||
|
|
||||||
const uiStore = useUiStore();
|
const uiStore = useUiStore();
|
||||||
const isLoading = computed(() => uiStore.isLoading(props.section));
|
const isLoading = computed(() => uiStore.isLoading(props.section));
|
||||||
const { submit } = useRequest();
|
const { submit, closeModal } = useFormHandler(props);
|
||||||
const { item } = useComponentHandler(props);
|
const { item } = useComponentHandler(props);
|
||||||
|
|
||||||
|
const successHandler = (response: any) => {
|
||||||
|
closeModal();
|
||||||
|
queueStore.reloadList({ name: "bookingDetailSection" });
|
||||||
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user