Lines 1-7
Link Here
|
1 |
<template> |
1 |
<template> |
2 |
<div class="alert alert-info" v-if="message" v-html="message"></div> |
2 |
<div class="alert alert-info" v-if="message" v-html="message"></div> |
3 |
<div class="alert alert-warning" v-if="error" v-html="error"></div> |
3 |
<div class="alert alert-warning" v-if="error" v-html="error"></div> |
4 |
<div class="modal" role="dialog" v-if="warning"> |
4 |
<div class="modal" role="dialog" v-if="warning" id="warning"> |
5 |
<div class="modal-dialog"> |
5 |
<div class="modal-dialog"> |
6 |
<div class="modal-content modal-lg"> |
6 |
<div class="modal-content modal-lg"> |
7 |
<div class="modal-header"> |
7 |
<div class="modal-header"> |
Lines 22-28
Link Here
|
22 |
</div> |
22 |
</div> |
23 |
</div> |
23 |
</div> |
24 |
</div> |
24 |
</div> |
25 |
<div class="confirmation modal" role="dialog" v-if="confirmation"> |
25 |
<div |
|
|
26 |
class="confirmation modal" |
27 |
role="dialog" |
28 |
v-if="confirmation" |
29 |
id="confirmation" |
30 |
> |
26 |
<div class="modal-dialog"> |
31 |
<div class="modal-dialog"> |
27 |
<div class="modal-content modal-lg"> |
32 |
<div class="modal-content modal-lg"> |
28 |
<div class="modal-header alert-warning confirmation"> |
33 |
<div class="modal-header alert-warning confirmation"> |
Lines 111-117
Link Here
|
111 |
</template> |
116 |
</template> |
112 |
|
117 |
|
113 |
<script> |
118 |
<script> |
114 |
import { inject } from "vue" |
119 |
import { inject, watch, nextTick } from "vue" |
115 |
import { storeToRefs } from "pinia" |
120 |
import { storeToRefs } from "pinia" |
116 |
import flatPickr from "vue-flatpickr-component" |
121 |
import flatPickr from "vue-flatpickr-component" |
117 |
export default { |
122 |
export default { |
Lines 132-138
export default {
Link Here
|
132 |
) { |
137 |
) { |
133 |
this.$refs.confirmationform.reportValidity() |
138 |
this.$refs.confirmationform.reportValidity() |
134 |
} else { |
139 |
} else { |
135 |
this.accept_callback() |
140 |
this.accept_callback().then(() => { |
|
|
141 |
nextTick(() => { |
142 |
$("#confirmation.modal").modal("hide") |
143 |
}) |
144 |
}) |
136 |
} |
145 |
} |
137 |
}, |
146 |
}, |
138 |
}, |
147 |
}, |
Lines 148-153
export default {
Link Here
|
148 |
is_loading, |
157 |
is_loading, |
149 |
} = storeToRefs(mainStore) |
158 |
} = storeToRefs(mainStore) |
150 |
const { removeMessages, removeConfirmationMessages } = mainStore |
159 |
const { removeMessages, removeConfirmationMessages } = mainStore |
|
|
160 |
|
161 |
watch(warning, newWarning => { |
162 |
if (!newWarning) { |
163 |
$("#warning.modal").modal("hide") |
164 |
return |
165 |
} |
166 |
nextTick(() => { |
167 |
$("#warning.modal").modal("show") |
168 |
}) |
169 |
}) |
170 |
|
171 |
watch(confirmation, newConfirmation => { |
172 |
if (!newConfirmation) { |
173 |
$("#confirmation.modal").modal("hide") |
174 |
return |
175 |
} |
176 |
nextTick(() => { |
177 |
$("#confirmation.modal").modal("show") |
178 |
}) |
179 |
}) |
180 |
|
151 |
return { |
181 |
return { |
152 |
message, |
182 |
message, |
153 |
error, |
183 |
error, |