2
0
mirror of https://github.com/frappe/books.git synced 2024-12-22 10:58:59 +00:00

chore: fix styling

This commit is contained in:
akshayitzme 2024-11-26 17:36:08 +05:30
parent 66cad7df7e
commit 9281448d1f
9 changed files with 140 additions and 161 deletions

View File

@ -1,17 +1,15 @@
<template>
<div
class="
px-2
w-36
flex
items-center
border
w-36
rounded
px-2
dark:border-gray-800
bg-gray-50
dark:bg-gray-890
dark:border-gray-800 dark:bg-gray-890 dark:focus-within:bg-gray-900
focus-within:bg-gray-100
dark:focus-within:bg-gray-900
"
>
<input

View File

@ -2,11 +2,11 @@
<div
class="
flex flex-col
gap-4
p-2
my-3
items-center
px-2
gap-4
my-3
px-4
py-2
rounded-t-md
text-black
w-full
@ -54,9 +54,9 @@
rounded-lg
w-full
h-full
flex
bg-gray-100
dark:bg-gray-850
flex
justify-center
items-center
"

View File

@ -2,33 +2,29 @@
<div class="flex gap-2">
<div
class="w-1/2 overflow-y-auto custom-scroll custom-scroll-thumb2"
style="height: calc(81vh)"
style="height: 81vh"
>
<Row
:ratio="ratio"
class="
border
dark:border-gray-800
flex
items-center
mt-2
px-2
rounded-t-md
text-gray-600
dark:text-gray-400
dark:border-gray-800 dark:text-gray-400
w-full
"
>
<div
v-for="df in tableFields"
:key="df.fieldname"
class="flex items-center px-2 py-2 text-lg"
class="flex items-center p-2 text-lg"
:class="{
'ms-auto': isNumeric(df as Field),
}"
:style="{
height: ``,
}"
>
{{ df.label }}
</div>
@ -40,17 +36,17 @@
:ratio="ratio"
:border="true"
class="
border-b border-l border-r
border-b border-x
dark:border-gray-800
flex
group
h-row-mid
hover:bg-gray-25
dark:bg-gray-890
items-center
justify-center
group
h-row-mid
px-2
w-full
hover:bg-gray-25
dark:bg-gray-890
"
@click="handleChange(row)"
>
@ -73,27 +69,23 @@
:ratio="ratio"
class="
border
dark:border-gray-800
flex
items-center
mt-2
px-2
rounded-t-md
text-gray-600
dark:text-gray-400
w-full
dark:border-gray-800 dark:text-gray-400
"
>
<div
v-for="df in tableFields"
:key="df.fieldname"
class="flex items-center px-2 py-2 text-lg"
class="flex items-center p-2 text-lg"
:class="{
'ms-auto': isNumeric(df as Field),
}"
:style="{
height: ``,
}"
>
{{ df.label }}
</div>
@ -104,17 +96,16 @@
:ratio="ratio"
:border="true"
class="
border-b border-l border-r
dark:border-gray-800
border-b border-x
flex
group
h-row-mid
hover:bg-gray-25
dark:bg-gray-890
items-center
justify-center
group
h-row-mid
px-2
w-full
hover:bg-gray-25
dark:bg-gray-890 dark:border-gray-800
"
@click="handleChange(row)"
>

View File

@ -76,7 +76,7 @@
<div></div>
<template v-if="isExapanded">
<div class="rounded-md grid grid-cols-4 my-3" style="width: calc(27vw)">
<div class="rounded-md grid grid-cols-4 my-3" style="width: 27vw">
<div class="px-4 col-span-2">
<Float
:df="{

View File

@ -7,16 +7,15 @@
mt-2
border
rounded-t
dark:border-gray-800
text-gray-600
dark:text-gray-400
dark:border-gray-800 dark:text-gray-400
"
>
<div
v-if="tableFields"
v-for="df in tableFields"
:key="df.fieldname"
class="text-lg flex mx-2 my-2"
class="text-lg flex m-2"
:class="{
'ms-auto': isNumeric(df as Field),
}"
@ -26,20 +25,18 @@
</Row>
<div
class="overflow-y-auto overflow-x-auto custom-scroll custom-scroll-thumb1"
class="overflow-auto custom-scroll custom-scroll-thumb1"
style="height: calc(90vh - 25rem)"
>
<Row
v-for="row in sinvDoc.items"
:ratio="ratio"
class="
p-2
border
dark:border-gray-800
w-full
px-2
py-2
hover:bg-gray-25
dark:bg-gray-890
dark:border-gray-800 dark:bg-gray-890
"
>
<ModernPOSSelectedItemRow
@ -60,8 +57,7 @@ import Row from 'src/components/Row.vue';
import RowEditForm from 'src/pages/CommonForm/RowEditForm.vue';
import ModernPOSSelectedItemRow from './ModernPOSSelectedItemRow.vue';
import { isNumeric } from 'src/utils';
import { inject } from 'vue';
import { defineComponent } from 'vue';
import { inject, defineComponent } from 'vue';
import { SalesInvoiceItem } from 'models/baseModels/SalesInvoiceItem/SalesInvoiceItem';
import { SalesInvoice } from 'models/baseModels/SalesInvoice/SalesInvoice';
import { Field } from 'schemas/types';

View File

@ -45,17 +45,16 @@
<AlertModal :open-modal="openAlertModal" @toggle-modal="toggleModal" />
<div
class="bg-gray-25 dark:bg-gray-875 gap-2 grid grid-cols-12 p-4"
class="bg-gray-25 dark:bg-gray-875 grid grid-cols-12 gap-2 p-4"
style="height: calc(100vh - var(--h-row-largest))"
>
<div
class="
bg-white
dark:bg-gray-850
border
dark:border-gray-800
col-span-5
bg-white
border
rounded-md
dark:border-gray-800 dark:bg-gray-850
"
>
<div class="rounded-md p-4 col-span-5">
@ -124,14 +123,13 @@
<div class="flex flex-col gap-3" style="height: calc(100vh - 6rem)">
<div
class="
p-4
bg-white
dark:bg-gray-850
border
dark:border-gray-800
rounded-md
grow
h-full
p-4
rounded-md
dark:border-gray-800 dark:bg-gray-850
"
>
<!-- Customer Search -->
@ -150,12 +148,11 @@
<div
class="
bg-white
dark:bg-gray-850
border
dark:border-gray-800
p-4
bg-white
border
rounded-md
dark:border-gray-800 dark:bg-gray-850
"
>
<div class="w-full grid grid-cols-2 gap-y-2 gap-x-3">

View File

@ -26,15 +26,15 @@
>
<button
class="
bg-gray-100
hover:bg-gray-200
dark:bg-gray-875 dark:hover:bg-gray-900
text-2xl
py-2.5
bg-gray-100
text-2xl
border-transparent
rounded-lg
transition-colors
duration-200
hover:bg-gray-200
dark:bg-gray-875 dark:hover:bg-gray-900
"
@click="appendValue('7')"
>
@ -42,15 +42,15 @@
</button>
<button
class="
bg-gray-100
hover:bg-gray-200
dark:bg-gray-875 dark:hover:bg-gray-900
text-2xl
py-2.5
bg-gray-100
text-2xl
border-transparent
rounded-lg
transition-colors
duration-200
hover:bg-gray-200
dark:bg-gray-875 dark:hover:bg-gray-900
"
@click="appendValue('8')"
>
@ -58,15 +58,15 @@
</button>
<button
class="
bg-gray-100
hover:bg-gray-200
dark:bg-gray-875 dark:hover:bg-gray-900
text-2xl
py-2.5
bg-gray-100
text-2xl
border-transparent
rounded-lg
transition-colors
duration-200
hover:bg-gray-200
dark:bg-gray-875 dark:hover:bg-gray-900
"
@click="appendValue('9')"
>
@ -74,15 +74,15 @@
</button>
<button
class="
bg-gray-100
hover:bg-gray-200
dark:bg-gray-875 dark:hover:bg-gray-900
text-2xl
py-2.5
bg-gray-100
text-2xl
border-transparent
rounded-lg
transition-colors
duration-200
hover:bg-gray-200
dark:bg-gray-875 dark:hover:bg-gray-900
"
@click="deleteLast()"
>
@ -91,15 +91,15 @@
<button
class="
bg-gray-100
hover:bg-gray-200
dark:bg-gray-875 dark:hover:bg-gray-900
text-2xl
py-2.5
bg-gray-100
text-2xl
border-transparent
rounded-lg
transition-colors
duration-200
hover:bg-gray-200
dark:bg-gray-875 dark:hover:bg-gray-900
"
@click="appendValue('4')"
>
@ -107,15 +107,15 @@
</button>
<button
class="
bg-gray-100
hover:bg-gray-200
dark:bg-gray-875 dark:hover:bg-gray-900
text-2xl
py-2.5
bg-gray-100
text-2xl
border-transparent
rounded-lg
transition-colors
duration-200
hover:bg-gray-200
dark:bg-gray-875 dark:hover:bg-gray-900
"
@click="appendValue('5')"
>
@ -123,15 +123,15 @@
</button>
<button
class="
bg-gray-100
hover:bg-gray-200
dark:bg-gray-875 dark:hover:bg-gray-900
text-2xl
py-2.5
bg-gray-100
text-2xl
border-transparent
rounded-lg
transition-colors
duration-200
hover:bg-gray-200
dark:bg-gray-875 dark:hover:bg-gray-900
"
@click="appendValue('6')"
>
@ -139,15 +139,15 @@
</button>
<button
class="
bg-gray-100
hover:bg-gray-200
dark:bg-gray-875 dark:hover:bg-gray-900
text-2xl
py-2.5
bg-gray-100
text-2xl
border-transparent
rounded-lg
transition-colors
duration-200
hover:bg-gray-200
dark:bg-gray-875 dark:hover:bg-gray-900
"
@click="appendValue('-')"
>
@ -156,15 +156,15 @@
<button
class="
bg-gray-100
hover:bg-gray-200
dark:bg-gray-875 dark:hover:bg-gray-900
text-2xl
py-2.5
bg-gray-100
text-2xl
border-transparent
rounded-lg
transition-colors
duration-200
hover:bg-gray-200
dark:bg-gray-875 dark:hover:bg-gray-900
"
@click="appendValue('1')"
>
@ -172,15 +172,15 @@
</button>
<button
class="
bg-gray-100
hover:bg-gray-200
dark:bg-gray-875 dark:hover:bg-gray-900
text-2xl
py-2.5
bg-gray-100
text-2xl
border-transparent
rounded-lg
transition-colors
duration-200
hover:bg-gray-200
dark:bg-gray-875 dark:hover:bg-gray-900
"
@click="appendValue('2')"
>
@ -188,15 +188,15 @@
</button>
<button
class="
bg-gray-100
hover:bg-gray-200
dark:bg-gray-875 dark:hover:bg-gray-900
text-2xl
py-2.5
bg-gray-100
text-2xl
border-transparent
rounded-lg
transition-colors
duration-200
hover:bg-gray-200
dark:bg-gray-875 dark:hover:bg-gray-900
"
@click="appendValue('3')"
>
@ -204,15 +204,15 @@
</button>
<button
class="
bg-gray-100
hover:bg-gray-200
dark:bg-gray-875 dark:hover:bg-gray-900
text-2xl
py-2.5
bg-gray-100
text-2xl
border-transparent
rounded-lg
transition-colors
duration-200
hover:bg-gray-200
dark:bg-gray-875 dark:hover:bg-gray-900
"
@click="appendValue('+')"
>
@ -221,15 +221,15 @@
<button
class="
bg-gray-100
hover:bg-gray-200
dark:bg-gray-875 dark:hover:bg-gray-900
text-2xl
py-2.5
bg-gray-100
text-2xl
border-transparent
rounded-lg
transition-colors
duration-200
hover:bg-gray-200
dark:bg-gray-875 dark:hover:bg-gray-900
"
@click="appendValue('.')"
>
@ -237,15 +237,15 @@
</button>
<button
class="
bg-gray-100
hover:bg-gray-200
dark:bg-gray-875 dark:hover:bg-gray-900
text-2xl
py-2.5
bg-gray-100
text-2xl
border-transparent
rounded-lg
transition-colors
duration-200
hover:bg-gray-200
dark:bg-gray-875 dark:hover:bg-gray-900
"
@click="appendValue('0')"
>
@ -254,15 +254,15 @@
<div class="grid col-span-2">
<button
class="
bg-gray-100
hover:bg-gray-200
dark:bg-gray-875 dark:hover:bg-gray-900
text-2xl
py-2.5
bg-gray-100
text-2xl
border-transparent
rounded-lg
transition-colors
duration-200
hover:bg-gray-200
dark:bg-gray-875 dark:hover:bg-gray-900
"
@click="reset()"
>
@ -273,7 +273,7 @@
</div>
<div class="px-5">
<div class="row-start-6 grid grid-cols-2 gap-4 mt-auto mb-3">
<div class="grid row-start-6 grid-cols-2 gap-4 mt-auto mb-3">
<div class="col-span-2">
<Button
class="w-full bg-green-500 dark:bg-green-700"
@ -289,7 +289,7 @@
</div>
</div>
<div class="row-start-6 grid grid-cols-2 gap-4 mt-auto mb-8">
<div class="grid row-start-6 grid-cols-2 gap-4 mt-auto mb-8">
<div class="col-span-2">
<Button
class="w-full bg-red-500 dark:bg-red-700"

View File

@ -59,15 +59,14 @@
<div class="grid grid-rows-5 w-full gap-3">
<div
class="
bg-white
dark:bg-gray-850
border
dark:border-gray-800
grow
row-span-5
h-full
p-4
grow
h-full
row-span-5
bg-white
border
rounded-md
dark:bg-gray-850 dark:border-gray-800
"
>
<!-- Customer Search -->
@ -88,12 +87,11 @@
<div
class="
bg-white
dark:bg-gray-850
border
dark:border-gray-800
p-4
bg-white
border
rounded-md
dark:bg-gray-850 dark:border-gray-800
"
>
<div class="grid grid-cols-2 gap-2">
@ -205,12 +203,11 @@
<div
class="
bg-white
dark:bg-gray-850
border
dark:border-gray-800
col-span-6
rounded-md
col-span-6
flex flex-col
dark:bg-gray-850 dark:border-gray-800
"
style="height: calc(100vh - 6rem)"
>

View File

@ -8,23 +8,23 @@
</div>
<span
class="
p-2
mb-2
w-20
absolute
bottom-full
left-1/2
transform
-translate-x-1/2
mb-2
bg-gray-100
dark:bg-gray-800 dark:text-white
text-black text-xs
rounded-md
p-2
w-20
text-center
opacity-0
group-hover:opacity-100
bg-gray-100
text-black text-xs
rounded-md
transition-opacity
duration-300
group-hover:opacity-100
dark:bg-gray-800 dark:text-white
"
>
{{ tableView ? 'Grid View' : 'List View' }}
@ -51,6 +51,9 @@
<span
class="
mb-2
p-2
w-28
absolute
bottom-full
left-1/2
@ -59,14 +62,11 @@
rounded-md
opacity-0
bg-gray-100
dark:bg-gray-800 dark:text-white
text-black text-xs text-center
mb-2
p-2
w-28
group-hover:opacity-100
transition-opacity
duration-300
group-hover:opacity-100
dark:bg-gray-800 dark:text-white
"
>
Sales Invoice List
@ -103,23 +103,23 @@
<span
class="
mb-2
p-2
w-28
absolute
bottom-full
left-1/2
transform
-translate-x-1/2
mb-2
bg-gray-100
dark:bg-gray-800 dark:text-white
text-black text-xs
rounded-md
p-2
w-28
text-center
opacity-0
group-hover:opacity-100
transition-opacity
duration-300
group-hover:opacity-100
dark:bg-gray-800 dark:text-white
"
>
Loyalty Program
@ -194,23 +194,23 @@
</div>
<span
class="
mb-2
p-2
w-28
absolute
bottom-full
left-1/2
transform
-translate-x-1/2
mb-2
bg-gray-100
dark:bg-gray-800 dark:text-white
text-black text-xs
rounded-md
p-2
w-28
text-center
opacity-0
group-hover:opacity-100
transition-opacity
duration-300
group-hover:opacity-100
dark:bg-gray-800 dark:text-white
"
>
Coupon Code
@ -218,24 +218,24 @@
<div
v-if="appliedCouponsCount !== 0"
class="
h-4
w-4
p-2
absolute
top-0
right-0
transform
translate-x-1/2
-translate-y-1/2
h-4
w-4
bg-green-400
text-green-900
border-red-500
rounded-full
flex
items-center
justify-center
text-xs
cursor-pointer
border-red-500
p-2
"
>
{{ appliedCouponsCount }}