mirror of
https://github.com/frappe/books.git
synced 2025-03-31 23:41:32 +00:00
chore: refactored styling
This commit is contained in:
parent
fa694f0a72
commit
c8f3d57c11
@ -336,11 +336,7 @@
|
|||||||
<Button
|
<Button
|
||||||
class="w-full bg-violet-500 dark:bg-violet-700 py-6"
|
class="w-full bg-violet-500 dark:bg-violet-700 py-6"
|
||||||
:disabled="!sinvDoc.party || !sinvDoc.items?.length"
|
:disabled="!sinvDoc.party || !sinvDoc.items?.length"
|
||||||
@click="
|
@click="handleSaveInvoiceAction"
|
||||||
sinvDoc.party && sinvDoc.items?.length
|
|
||||||
? saveOrder()
|
|
||||||
: null
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
<slot>
|
<slot>
|
||||||
<p class="uppercase text-lg text-white font-semibold">
|
<p class="uppercase text-lg text-white font-semibold">
|
||||||
@ -959,12 +955,18 @@ export default defineComponent({
|
|||||||
}, 1);
|
}, 1);
|
||||||
},
|
},
|
||||||
async routeToSinvList() {
|
async routeToSinvList() {
|
||||||
if (!this.sinvDoc.items.length) {
|
if (!this.sinvDoc.items?.length) {
|
||||||
return await routeTo('/list/SalesInvoice');
|
return await routeTo('/list/SalesInvoice');
|
||||||
}
|
}
|
||||||
|
|
||||||
this.openRouteToInvoiceListModal = true;
|
this.openRouteToInvoiceListModal = true;
|
||||||
},
|
},
|
||||||
|
async handleSaveInvoiceAction() {
|
||||||
|
if (!this.sinvDoc.party && !this.sinvDoc.items?.length) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await this.saveOrder();
|
||||||
|
},
|
||||||
routeTo,
|
routeTo,
|
||||||
getItem,
|
getItem,
|
||||||
},
|
},
|
||||||
|
@ -1,31 +1,27 @@
|
|||||||
<template>
|
<template>
|
||||||
<Modal class="h-auto w-auto px-10" :set-close-listener="false">
|
<Modal class="h-auto w-auto p-6" :set-close-listener="false">
|
||||||
<p class="text-center py-4">Saved Invoices</p>
|
<p class="text-center font-semibold">{{ t`Saved Invoices` }}</p>
|
||||||
|
|
||||||
<hr class="dark:border-gray-800" />
|
<hr class="mt-2 dark:border-gray-800" />
|
||||||
|
|
||||||
<Row
|
<Row
|
||||||
:ratio="ratio"
|
:ratio="ratio"
|
||||||
class="
|
class="
|
||||||
border
|
border
|
||||||
dark:border-gray-800
|
|
||||||
flex
|
flex
|
||||||
items-center
|
items-center
|
||||||
mt-4
|
mt-4
|
||||||
px-2
|
px-2
|
||||||
|
w-full
|
||||||
rounded-t-md
|
rounded-t-md
|
||||||
text-gray-600
|
text-gray-600
|
||||||
dark:text-gray-400
|
dark:border-gray-800 dark:text-gray-400
|
||||||
w-full
|
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
v-for="df in tableFields"
|
v-for="df in tableFields"
|
||||||
:key="df.fieldname"
|
:key="df.fieldname"
|
||||||
class="flex items-center px-2 py-2 text-lg"
|
class="flex items-center px-2 py-2 text-lg"
|
||||||
:style="{
|
|
||||||
height: ``,
|
|
||||||
}"
|
|
||||||
>
|
>
|
||||||
{{ df.label }}
|
{{ df.label }}
|
||||||
</div>
|
</div>
|
||||||
@ -33,7 +29,7 @@
|
|||||||
|
|
||||||
<div
|
<div
|
||||||
v-if="savedInvoices.length"
|
v-if="savedInvoices.length"
|
||||||
class="overflow-y-auto"
|
class="overflow-y-auto custom-scroll custom-scroll-thumb2"
|
||||||
style="height: 65vh; width: 60vh"
|
style="height: 65vh; width: 60vh"
|
||||||
>
|
>
|
||||||
<Row
|
<Row
|
||||||
@ -43,12 +39,11 @@
|
|||||||
:border="true"
|
:border="true"
|
||||||
class="
|
class="
|
||||||
border-b border-l border-r
|
border-b border-l border-r
|
||||||
dark:border-gray-800
|
dark:border-gray-800 dark:bg-gray-890
|
||||||
flex
|
flex
|
||||||
group
|
group
|
||||||
h-row-mid
|
h-row-mid
|
||||||
hover:bg-gray-25
|
hover:bg-gray-25
|
||||||
dark:bg-gray-890
|
|
||||||
items-center
|
items-center
|
||||||
justify-center
|
justify-center
|
||||||
px-2
|
px-2
|
||||||
@ -67,11 +62,10 @@
|
|||||||
</Row>
|
</Row>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row-start-6 grid grid-cols-2 gap-4 mt-auto p-10">
|
<div class="row-start-6 grid grid-cols-2 gap-4 mt-4">
|
||||||
<div class="col-span-2">
|
<div class="col-span-2">
|
||||||
<Button
|
<Button
|
||||||
class="w-full bg-red-500 dark:bg-red-700"
|
class="w-full p-5 bg-red-500 dark:bg-red-700"
|
||||||
style="padding: 1.35rem"
|
|
||||||
@click="$emit('toggleModal', 'SavedInvoice')"
|
@click="$emit('toggleModal', 'SavedInvoice')"
|
||||||
>
|
>
|
||||||
<slot>
|
<slot>
|
||||||
@ -88,12 +82,12 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Button from 'src/components/Button.vue';
|
import Button from 'src/components/Button.vue';
|
||||||
import Modal from 'src/components/Modal.vue';
|
import Modal from 'src/components/Modal.vue';
|
||||||
|
import Row from 'src/components/Row.vue';
|
||||||
|
import FormControl from 'src/components/Controls/FormControl.vue';
|
||||||
import { SalesInvoice } from 'models/baseModels/SalesInvoice/SalesInvoice';
|
import { SalesInvoice } from 'models/baseModels/SalesInvoice/SalesInvoice';
|
||||||
import { defineComponent, inject } from 'vue';
|
import { defineComponent, inject } from 'vue';
|
||||||
import { ModelNameEnum } from 'models/types';
|
import { ModelNameEnum } from 'models/types';
|
||||||
import { Field } from 'schemas/types';
|
import { Field } from 'schemas/types';
|
||||||
import Row from 'src/components/Row.vue';
|
|
||||||
import FormControl from 'src/components/Controls/FormControl.vue';
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'SavedInvoiceModal',
|
name: 'SavedInvoiceModal',
|
||||||
@ -179,12 +173,12 @@ export default defineComponent({
|
|||||||
)) as SalesInvoice[];
|
)) as SalesInvoice[];
|
||||||
},
|
},
|
||||||
async selectedInvoice(row: SalesInvoice) {
|
async selectedInvoice(row: SalesInvoice) {
|
||||||
let selectedInvoideDoc = (await this.fyo.doc.getDoc(
|
let selectedInvoiceDoc = (await this.fyo.doc.getDoc(
|
||||||
ModelNameEnum.SalesInvoice,
|
ModelNameEnum.SalesInvoice,
|
||||||
row.name
|
row.name
|
||||||
)) as SalesInvoice;
|
)) as SalesInvoice;
|
||||||
|
|
||||||
this.sinvDoc = selectedInvoideDoc;
|
this.sinvDoc = selectedInvoiceDoc;
|
||||||
this.$emit('toggleModal', 'SavedInvoice');
|
this.$emit('toggleModal', 'SavedInvoice');
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user