mirror of
https://github.com/frappe/books.git
synced 2024-12-23 03:19:01 +00:00
incr: added pos open & close modal
This commit is contained in:
parent
79ef11bb23
commit
e7486db8ad
@ -3,7 +3,7 @@
|
|||||||
<PageHeader :title="t`NeuPOS`">
|
<PageHeader :title="t`NeuPOS`">
|
||||||
<slot>
|
<slot>
|
||||||
<div class="flex justify-end">
|
<div class="flex justify-end">
|
||||||
<Button class="bg-red-500">
|
<Button class="bg-red-500" @click="toggleModal('ShiftClose')">
|
||||||
<span class="text-white font-medium">{{
|
<span class="text-white font-medium">{{
|
||||||
t`Close POS Shift `
|
t`Close POS Shift `
|
||||||
}}</span>
|
}}</span>
|
||||||
@ -12,37 +12,53 @@
|
|||||||
</slot>
|
</slot>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<OpenPOSShift
|
<OpenPOSShiftModal
|
||||||
:open-modal="!isPosShiftOpen"
|
:open-modal="!isPosShiftOpen"
|
||||||
@toggle-shift-open-modal="toggleShiftOpenModal"
|
@toggle-modal="toggleModal"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<ClosePOSShiftModal
|
||||||
|
:open-modal="openShiftCloseModal"
|
||||||
|
@toggle-modal="toggleModal"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<PaymentModal />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Button from 'src/components/Button.vue';
|
import Button from 'src/components/Button.vue';
|
||||||
import OpenPOSShift from './OpenPOSShift.vue';
|
import ClosePOSShiftModal from './ClosePOSShiftModal.vue';
|
||||||
|
import OpenPOSShiftModal from './OpenPOSShiftModal.vue';
|
||||||
import PageHeader from 'src/components/PageHeader.vue';
|
import PageHeader from 'src/components/PageHeader.vue';
|
||||||
import { defineComponent } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
import { fyo } from 'src/initFyo';
|
import { fyo } from 'src/initFyo';
|
||||||
|
import PaymentModal from './PaymentModal.vue';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'NeuPOS',
|
name: 'NeuPOS',
|
||||||
components: { Button, OpenPOSShift, PageHeader },
|
components: {
|
||||||
|
Button,
|
||||||
|
ClosePOSShiftModal,
|
||||||
|
OpenPOSShiftModal,
|
||||||
|
PageHeader,
|
||||||
|
PaymentModal,
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
openShiftOpenModal: false,
|
openShiftOpenModal: false,
|
||||||
|
openShiftCloseModal: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
isPosShiftOpen: () => !!fyo.singles.POSShift?.isShiftOpen,
|
isPosShiftOpen: () => !!fyo.singles.POSShift?.isShiftOpen,
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toggleShiftOpenModal(value?: boolean): boolean {
|
toggleModal(modal: 'ShiftOpen' | 'ShiftClose', value?: boolean) {
|
||||||
if (value) {
|
if (value) {
|
||||||
return (this.openShiftOpenModal = value);
|
return (this[`open${modal}Modal`] = value);
|
||||||
}
|
}
|
||||||
return (this.openShiftOpenModal = !this.openShiftOpenModal);
|
return (this[`open${modal}Modal`] = !this[`open${modal}Modal`]);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user