mirror of
https://github.com/frappe/books.git
synced 2024-11-13 00:46:28 +00:00
incr: unify row heights
- delete rando file
This commit is contained in:
parent
97d2885475
commit
1c0896553e
@ -5,16 +5,21 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Title Row -->
|
<!-- Title Row -->
|
||||||
<Row :ratio="ratio" class="border-b px-2 text-gray-600 w-full">
|
<Row
|
||||||
|
:ratio="ratio"
|
||||||
|
class="border-b px-2 text-gray-600 w-full flex items-center"
|
||||||
|
>
|
||||||
<div class="flex items-center pl-2">#</div>
|
<div class="flex items-center pl-2">#</div>
|
||||||
<div
|
<div
|
||||||
|
class="items-center flex px-2 h-row-mid"
|
||||||
:class="{
|
:class="{
|
||||||
'px-2 py-3': size === 'small',
|
'ml-auto': isNumeric(df),
|
||||||
'px-3 py-4': size !== 'small',
|
|
||||||
'text-right': isNumeric(df),
|
|
||||||
}"
|
}"
|
||||||
v-for="df in tableFields"
|
v-for="df in tableFields"
|
||||||
:key="df.fieldname"
|
:key="df.fieldname"
|
||||||
|
:style="{
|
||||||
|
height: ``,
|
||||||
|
}"
|
||||||
>
|
>
|
||||||
{{ df.label }}
|
{{ df.label }}
|
||||||
</div>
|
</div>
|
||||||
@ -40,29 +45,28 @@
|
|||||||
<!-- Add Row and Row Count -->
|
<!-- Add Row and Row Count -->
|
||||||
<Row
|
<Row
|
||||||
:ratio="ratio"
|
:ratio="ratio"
|
||||||
class="text-gray-500 cursor-pointer border-transparent px-2 w-full"
|
class="
|
||||||
|
text-gray-500
|
||||||
|
cursor-pointer
|
||||||
|
border-transparent
|
||||||
|
px-2
|
||||||
|
w-full
|
||||||
|
h-row-mid
|
||||||
|
flex
|
||||||
|
items-center
|
||||||
|
"
|
||||||
v-if="!isReadOnly"
|
v-if="!isReadOnly"
|
||||||
@click="addRow"
|
@click="addRow"
|
||||||
>
|
>
|
||||||
<div class="flex items-center pl-1">
|
<div class="flex items-center pl-1">
|
||||||
<feather-icon name="plus" class="w-4 h-4 text-gray-500" />
|
<feather-icon name="plus" class="w-4 h-4 text-gray-500" />
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div class="flex justify-between px-2">
|
||||||
class="flex justify-between"
|
|
||||||
:class="{
|
|
||||||
'px-2 py-3': size === 'small',
|
|
||||||
'px-3 py-4': size !== 'small',
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
{{ t`Add Row` }}
|
{{ t`Add Row` }}
|
||||||
</div>
|
</div>
|
||||||
<div v-for="i in ratio.slice(3).length" :key="i"></div>
|
<div v-for="i in ratio.slice(3).length" :key="i"></div>
|
||||||
<div
|
<div
|
||||||
class="text-right"
|
class="text-right px-2"
|
||||||
:class="{
|
|
||||||
'px-2 py-3': size === 'small',
|
|
||||||
'px-3 py-4': size !== 'small',
|
|
||||||
}"
|
|
||||||
v-if="
|
v-if="
|
||||||
value && maxRowsBeforeOverflow && value.length > maxRowsBeforeOverflow
|
value && maxRowsBeforeOverflow && value.length > maxRowsBeforeOverflow
|
||||||
"
|
"
|
||||||
@ -161,6 +165,11 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
height() {
|
||||||
|
if (this.size === 'small') {
|
||||||
|
}
|
||||||
|
return 2;
|
||||||
|
},
|
||||||
ratio() {
|
ratio() {
|
||||||
return [0.3].concat(this.tableFields.map(() => 1));
|
return [0.3].concat(this.tableFields.map(() => 1));
|
||||||
},
|
},
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<Row :ratio="ratio" class="w-full px-2 border-b hover:bg-brand-100 group">
|
<Row
|
||||||
|
:ratio="ratio"
|
||||||
|
class="w-full px-2 border-b hover:bg-brand-100 group flex items-center"
|
||||||
|
>
|
||||||
<!-- Index or Remove button -->
|
<!-- Index or Remove button -->
|
||||||
<div class="flex items-center pl-2 text-gray-600">
|
<div class="flex items-center pl-2 text-gray-600 h-row-mid">
|
||||||
<span class="hidden group-hover:inline-block">
|
<span class="hidden group-hover:inline-block">
|
||||||
<feather-icon
|
<feather-icon
|
||||||
name="x"
|
name="x"
|
||||||
@ -18,7 +21,7 @@
|
|||||||
<FormControl
|
<FormControl
|
||||||
v-for="df in tableFields"
|
v-for="df in tableFields"
|
||||||
:size="size"
|
:size="size"
|
||||||
class="py-2"
|
class="py-2 h-row-mid"
|
||||||
:read-only="readOnly"
|
:read-only="readOnly"
|
||||||
:input-class="{ 'text-right': isNumeric(df), 'bg-transparent': true }"
|
:input-class="{ 'text-right': isNumeric(df), 'bg-transparent': true }"
|
||||||
:key="df.fieldname"
|
:key="df.fieldname"
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="p-4 flex justify-between window-drag border-b items-center">
|
<div class="px-4 flex justify-between window-drag border-b items-center h-row-largest flex-shrink-0">
|
||||||
<h1 class="text-xl font-semibold select-none" v-if="title && !backLink">
|
<h1 class="text-xl font-semibold select-none" v-if="title && !backLink">
|
||||||
{{ title }}
|
{{ title }}
|
||||||
</h1>
|
</h1>
|
||||||
<BackLink v-if="backLink" class="window-no-drag"/>
|
<BackLink v-if="backLink" class="window-no-drag"/>
|
||||||
<div class="flex items-stretch window-no-drag gap-2">
|
<div class="flex items-stretch window-no-drag gap-2">
|
||||||
<slot />
|
<slot />
|
||||||
<SearchBar v-if="!hideSearch"/>
|
<SearchBar v-if="!hideSearch" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="my-3 grid grid-cols-3 text-gray-800 text-sm select-none">
|
<div
|
||||||
|
class="grid grid-cols-3 text-gray-800 text-sm select-none items-center"
|
||||||
|
style="height: 52px"
|
||||||
|
>
|
||||||
<!-- Length Display -->
|
<!-- Length Display -->
|
||||||
<div class="justify-self-start">
|
<div class="justify-self-start">
|
||||||
{{
|
{{
|
||||||
|
@ -1,93 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div id="importWizard" class="modal-body" style="overflow: hidden;">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-12">
|
|
||||||
<!-- <div v-for="(entry, i) in entries" :key="i">{{ entry['Date'] }}</div> -->
|
|
||||||
<table class="table table-sm">
|
|
||||||
<thead style="font-size: 13px">
|
|
||||||
<tr>
|
|
||||||
<th scope="col">
|
|
||||||
<input type="checkbox" checked="true" ref="all" @change="allSelected" />
|
|
||||||
</th>
|
|
||||||
<th
|
|
||||||
scope="col"
|
|
||||||
v-for="(fieldname, index) in Object.keys(entries[0])"
|
|
||||||
:key="index"
|
|
||||||
>{{ fieldname }}</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody style="font-size: 13px">
|
|
||||||
<tr v-for="(entry, index) in entries" :key="index">
|
|
||||||
<th scope="row">
|
|
||||||
<input type="checkbox" checked="true" :ref="'cb-'+index" @change="rowSelected" />
|
|
||||||
</th>
|
|
||||||
<td v-for="(fieldname, idx) in Object.keys(entry)" :key="idx">{{ entry[fieldname] }}</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-12 text-right">
|
|
||||||
<f-button primary @click="reconcile">{{ 'Reconcile' }}</f-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import luxon from 'luxon';
|
|
||||||
import { fyo } from 'src/initFyo';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
props: ['entries', 'afterReconcile'],
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
selectedEntries: []
|
|
||||||
};
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
allSelected() {
|
|
||||||
for (let i = 0; i < this.entries.length; i++) {
|
|
||||||
this.$refs['cb-' + i][0].checked = this.$refs['all'].checked;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
rowSelected() {
|
|
||||||
for (let i = 0; i < this.entries.length; i++) {
|
|
||||||
if (!this.$refs['cb-' + i][0].checked) {
|
|
||||||
this.$refs['all'].checked = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
close() {
|
|
||||||
this.$modal.hide();
|
|
||||||
},
|
|
||||||
async reconcile() {
|
|
||||||
for (let i = 0; i < this.entries.length; i++) {
|
|
||||||
if (this.$refs['cb-' + i][0].checked)
|
|
||||||
this.selectedEntries.push(this.entries[i]);
|
|
||||||
}
|
|
||||||
for (let entry of this.selectedEntries) {
|
|
||||||
const payment = await fyo.doc.getDoc('Payment', entry['Payment Entry']);
|
|
||||||
const clearanceDate =
|
|
||||||
luxon.DateTime.fromFormat(
|
|
||||||
entry['Clearance Date'],
|
|
||||||
'dd/MM/yy'
|
|
||||||
).toISO() ||
|
|
||||||
luxon.DateTime.fromFormat(
|
|
||||||
entry['Clearance Date'],
|
|
||||||
'dd/MM/yyyy'
|
|
||||||
).toISO();
|
|
||||||
payment.set({ clearanceDate });
|
|
||||||
await payment.sync();
|
|
||||||
}
|
|
||||||
this.close();
|
|
||||||
await this.afterReconcile();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style>
|
|
||||||
.modal-dialog {
|
|
||||||
max-width: 600px !important;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -76,6 +76,7 @@
|
|||||||
<hr />
|
<hr />
|
||||||
<Paginator
|
<Paginator
|
||||||
:item-count="report?.reportData?.length ?? 0"
|
:item-count="report?.reportData?.length ?? 0"
|
||||||
|
class="px-4"
|
||||||
@index-change="setPageIndices"
|
@index-change="setPageIndices"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -71,7 +71,7 @@
|
|||||||
<div
|
<div
|
||||||
v-if="si.group === 'Docs'"
|
v-if="si.group === 'Docs'"
|
||||||
class="flex w-full justify-between px-3 items-center"
|
class="flex w-full justify-between px-3 items-center"
|
||||||
style="height: 48px; margin-left: -2px"
|
style="height: var(--h-row-mid); margin-left: -2px"
|
||||||
>
|
>
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<p class="text-gray-900">
|
<p class="text-gray-900">
|
||||||
@ -93,7 +93,7 @@
|
|||||||
<div
|
<div
|
||||||
v-else
|
v-else
|
||||||
class="flex flex-row w-full justify-between px-3 items-center"
|
class="flex flex-row w-full justify-between px-3 items-center"
|
||||||
style="height: 48px; margin-left: -2px"
|
style="height: var(--h-row-mid); margin-left: -2px"
|
||||||
>
|
>
|
||||||
<p class="text-gray-900">
|
<p class="text-gray-900">
|
||||||
{{ si.label }}
|
{{ si.label }}
|
||||||
|
@ -20,6 +20,8 @@
|
|||||||
:key="`${df.fieldname}-inline`"
|
:key="`${df.fieldname}-inline`"
|
||||||
>
|
>
|
||||||
<TwoColumnForm
|
<TwoColumnForm
|
||||||
|
class="overflow-auto"
|
||||||
|
style="max-height: calc((var(--h-row-mid) + 1px) * 3 - 1px)"
|
||||||
ref="inlineEditForm"
|
ref="inlineEditForm"
|
||||||
:doc="inlineEditDoc"
|
:doc="inlineEditDoc"
|
||||||
:fields="getInlineEditFields(df)"
|
:fields="getInlineEditFields(df)"
|
||||||
@ -29,13 +31,16 @@
|
|||||||
:autosave="false"
|
:autosave="false"
|
||||||
@error="(msg) => $emit('error', msg)"
|
@error="(msg) => $emit('error', msg)"
|
||||||
/>
|
/>
|
||||||
<div class="flex px-4 pb-2 gap-2">
|
<div
|
||||||
<Button class="w-1/2 text-gray-900" @click="stopInlineEditing">
|
class="flex px-4 py-4 justify-between items-center"
|
||||||
|
style="max-height: calc(var(--h-row-mid) + 1px)"
|
||||||
|
>
|
||||||
|
<Button class="text-gray-900 w-20" @click="stopInlineEditing">
|
||||||
{{ t`Cancel` }}
|
{{ t`Cancel` }}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
type="primary"
|
type="primary"
|
||||||
class="w-1/2 text-white"
|
class="text-white w-20"
|
||||||
@click="saveInlineEditDoc(df)"
|
@click="saveInlineEditDoc(df)"
|
||||||
>
|
>
|
||||||
{{ t`Save` }}
|
{{ t`Save` }}
|
||||||
@ -49,12 +54,15 @@
|
|||||||
class="grid items-center"
|
class="grid items-center"
|
||||||
:class="{
|
:class="{
|
||||||
'border-b': !noBorder,
|
'border-b': !noBorder,
|
||||||
'h-12':
|
|
||||||
!['AttachImage', 'Text'].includes(df.fieldtype) &&
|
|
||||||
!errors[df.fieldname],
|
|
||||||
}"
|
}"
|
||||||
:key="`${df.fieldname}-regular`"
|
:key="`${df.fieldname}-regular`"
|
||||||
:style="style"
|
:style="{
|
||||||
|
...style,
|
||||||
|
|
||||||
|
height: !['AttachImage', 'Text'].includes(df.fieldtype)
|
||||||
|
? 'calc(var(--h-row-mid) + 1px)'
|
||||||
|
: 'calc(var(--h-row-mid) * 2 + 1px)',
|
||||||
|
}"
|
||||||
>
|
>
|
||||||
<div class="py-2 pl-4 flex text-gray-600">
|
<div class="py-2 pl-4 flex text-gray-600">
|
||||||
<div class="py-1">
|
<div class="py-1">
|
||||||
@ -299,6 +307,7 @@ export default {
|
|||||||
.join(' ');
|
.join(' ');
|
||||||
return {
|
return {
|
||||||
'grid-template-columns': templateColumns,
|
'grid-template-columns': templateColumns,
|
||||||
|
height: 'calc(var(--h-row-mid) + 1px)',
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
submitted() {
|
submitted() {
|
||||||
|
@ -1,12 +1,21 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="py-4" v-if="pendingInvoices.length">
|
<div v-if="pendingInvoices.length">
|
||||||
<div class="px-4 text-sm text-gray-600">
|
<div
|
||||||
|
class="
|
||||||
|
px-4
|
||||||
|
text-sm text-gray-600
|
||||||
|
border-b
|
||||||
|
flex
|
||||||
|
items-center
|
||||||
|
h-row-smallest
|
||||||
|
"
|
||||||
|
>
|
||||||
{{ t`Recent Invoices` }}
|
{{ t`Recent Invoices` }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Invoice List -->
|
<!-- Invoice List -->
|
||||||
<div
|
<div
|
||||||
class="px-4 py-3 border-b hover:bg-gray-100 cursor-pointer text-base"
|
class="px-4 py-4 border-b hover:bg-gray-100 cursor-pointer text-base"
|
||||||
v-for="invoice in pendingInvoices"
|
v-for="invoice in pendingInvoices"
|
||||||
:key="invoice.name"
|
:key="invoice.name"
|
||||||
@click="routeToForm(invoice)"
|
@click="routeToForm(invoice)"
|
||||||
|
@ -3,31 +3,33 @@
|
|||||||
<PageHeader :title="t`Chart of Accounts`" />
|
<PageHeader :title="t`Chart of Accounts`" />
|
||||||
|
|
||||||
<!-- Chart of Accounts -->
|
<!-- Chart of Accounts -->
|
||||||
<div class="flex-1 flex flex-col mx-4 overflow-y-auto mb-4" v-if="root">
|
<div class="flex-1 flex flex-col overflow-y-auto mb-4" v-if="root">
|
||||||
<!-- Chart of Accounts Indented List -->
|
<!-- Chart of Accounts Indented List -->
|
||||||
<template v-for="account in allAccounts" :key="account.name">
|
<template v-for="account in allAccounts" :key="account.name">
|
||||||
<!-- Account List Item -->
|
<!-- Account List Item -->
|
||||||
<div
|
<div
|
||||||
class="
|
class="
|
||||||
mt-2
|
|
||||||
py-2
|
py-2
|
||||||
cursor-pointer
|
cursor-pointer
|
||||||
hover:bg-gray-100
|
hover:bg-gray-100
|
||||||
group
|
group
|
||||||
flex
|
flex
|
||||||
items-center
|
items-center
|
||||||
|
border-b
|
||||||
|
flex-shrink-0
|
||||||
|
pr-4
|
||||||
"
|
"
|
||||||
:class="[
|
:class="[
|
||||||
account.level !== 0 ? 'text-base' : 'text-lg',
|
account.level !== 0 ? 'text-base' : 'text-lg',
|
||||||
isQuickEditOpen(account) ? 'bg-gray-200' : '',
|
isQuickEditOpen(account) ? 'bg-gray-200' : '',
|
||||||
`pl-${account.level * 8}`,
|
|
||||||
]"
|
]"
|
||||||
|
:style="`height: calc(var(--h-row-mid) + 1px); padding-left: calc(1rem + 2rem * ${account.level})`"
|
||||||
@click="onClick(account)"
|
@click="onClick(account)"
|
||||||
>
|
>
|
||||||
<component :is="getIconComponent(account)" class="ml-2" />
|
<component :is="getIconComponent(account)" />
|
||||||
<div class="flex items-baseline">
|
<div class="flex items-baseline">
|
||||||
<div
|
<div
|
||||||
class="ml-3"
|
class="ml-4"
|
||||||
:class="[!account.parentAccount && 'font-semibold']"
|
:class="[!account.parentAccount && 'font-semibold']"
|
||||||
>
|
>
|
||||||
{{ account.name }}
|
{{ account.name }}
|
||||||
|
@ -15,12 +15,19 @@
|
|||||||
>
|
>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<div
|
<div class="flex text-base w-full flex-col" v-if="!complete">
|
||||||
class="flex px-4 mt-2 text-base w-full flex-col gap-8"
|
|
||||||
v-if="!complete"
|
|
||||||
>
|
|
||||||
<!-- Type selector -->
|
<!-- Type selector -->
|
||||||
<div class="flex flex-row justify-start items-center w-full gap-2">
|
<div
|
||||||
|
class="
|
||||||
|
flex flex-row
|
||||||
|
justify-start
|
||||||
|
items-center
|
||||||
|
w-full
|
||||||
|
gap-2
|
||||||
|
border-b
|
||||||
|
p-4
|
||||||
|
"
|
||||||
|
>
|
||||||
<FormControl
|
<FormControl
|
||||||
:df="importableDf"
|
:df="importableDf"
|
||||||
input-class="bg-transparent text-gray-900 text-base"
|
input-class="bg-transparent text-gray-900 text-base"
|
||||||
@ -45,9 +52,9 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Settings -->
|
<!-- Settings -->
|
||||||
<div v-if="fileName" class="">
|
<div v-if="fileName" class="border-b p-4">
|
||||||
<h2 class="text-lg font-semibold">{{ t`Importer Settings` }}</h2>
|
<h2 class="text-lg font-semibold">{{ t`Importer Settings` }}</h2>
|
||||||
<div class="mt-4 flex gap-2">
|
<div class="mt-2 flex gap-2">
|
||||||
<div
|
<div
|
||||||
v-if="file && isSubmittable"
|
v-if="file && isSubmittable"
|
||||||
class="
|
class="
|
||||||
@ -124,11 +131,14 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Label Assigner -->
|
<!-- Label Assigner -->
|
||||||
<div v-if="fileName" class="pb-4">
|
<div v-if="fileName" class="p-4 border-b">
|
||||||
<h2 class="text-lg font-semibold">{{ t`Assign Imported Labels` }}</h2>
|
<div class="flex items-center gap-2">
|
||||||
<div
|
<h2 class="text-lg font-semibold">{{ t`Assign Imported Labels` }}</h2>
|
||||||
class="gap-2 mt-4 grid grid-flow-col overflow-x-auto no-scrollbar"
|
<p class="text-red-400 text-sm" v-if="isRequiredUnassigned">
|
||||||
>
|
{{ t`* required fields` }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="gap-2 mt-4 grid grid-flow-col overflow-x-auto no-scrollbar">
|
||||||
<div
|
<div
|
||||||
v-for="(f, k) in importer.assignableLabels"
|
v-for="(f, k) in importer.assignableLabels"
|
||||||
:key="'assigner-' + f + '-' + k"
|
:key="'assigner-' + f + '-' + k"
|
||||||
@ -151,24 +161,24 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p
|
|
||||||
class="text-red-400 text-sm mt-1 -mb-1 p-0 h-0"
|
|
||||||
v-if="isRequiredUnassigned"
|
|
||||||
>
|
|
||||||
{{ t`* required fields` }}
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Data Verifier -->
|
<!-- Data Verifier -->
|
||||||
<div v-if="fileName">
|
<div v-if="fileName">
|
||||||
<h2 class="-mt-4 text-lg font-semibold pb-1">
|
<div class="overflow-auto border-b">
|
||||||
{{ t`Verify Imported Data` }}
|
|
||||||
</h2>
|
|
||||||
|
|
||||||
<div class="overflow-auto mt-4 pb-4">
|
|
||||||
<!-- Column Name Rows -->
|
<!-- Column Name Rows -->
|
||||||
<div
|
<div
|
||||||
class="grid grid-flow-col pb-4 border-b gap-2 sticky top-0 bg-white"
|
class="
|
||||||
|
grid grid-flow-col
|
||||||
|
border-b
|
||||||
|
gap-2
|
||||||
|
sticky
|
||||||
|
top-0
|
||||||
|
bg-white
|
||||||
|
px-4
|
||||||
|
h-row-mid
|
||||||
|
items-center
|
||||||
|
"
|
||||||
style="width: fit-content"
|
style="width: fit-content"
|
||||||
v-if="importer.columnLabels.length > 0"
|
v-if="importer.columnLabels.length > 0"
|
||||||
>
|
>
|
||||||
@ -190,10 +200,17 @@
|
|||||||
<!-- Data Rows -->
|
<!-- Data Rows -->
|
||||||
<div
|
<div
|
||||||
v-if="importer.columnLabels.length > 0"
|
v-if="importer.columnLabels.length > 0"
|
||||||
style="max-height: 400px"
|
style="max-height: 500px"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="grid grid-flow-col mt-4 pb-4 border-b gap-2 items-center"
|
class="
|
||||||
|
grid grid-flow-col
|
||||||
|
border-b
|
||||||
|
gap-2
|
||||||
|
items-center
|
||||||
|
px-4
|
||||||
|
h-row-mid
|
||||||
|
"
|
||||||
style="width: fit-content"
|
style="width: fit-content"
|
||||||
v-for="(r, i) in assignedMatrix"
|
v-for="(r, i) in assignedMatrix"
|
||||||
:key="'matrix-row-' + i"
|
:key="'matrix-row-' + i"
|
||||||
@ -238,13 +255,18 @@
|
|||||||
:value="c"
|
:value="c"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Add Row button -->
|
||||||
<button
|
<button
|
||||||
class="
|
class="
|
||||||
text-gray-600
|
text-gray-600
|
||||||
hover:text-gray-900
|
hover:bg-gray-100
|
||||||
flex flex-row
|
flex flex-row
|
||||||
w-full
|
w-full
|
||||||
mt-4
|
px-4
|
||||||
|
h-row-mid
|
||||||
|
border-b
|
||||||
|
items-center
|
||||||
outline-none
|
outline-none
|
||||||
"
|
"
|
||||||
@click="
|
@click="
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
class="py-10 flex-1 bg-white flex justify-center items-center"
|
class="flex-1 flex justify-center items-center"
|
||||||
:class="{
|
:class="{
|
||||||
'pointer-events-none': loadingDatabase,
|
'pointer-events-none': loadingDatabase,
|
||||||
'window-drag': platform !== 'Windows',
|
'window-drag': platform !== 'Windows',
|
||||||
@ -11,7 +11,7 @@
|
|||||||
style="height: 700px"
|
style="height: 700px"
|
||||||
>
|
>
|
||||||
<!-- Welcome to Frappe Books -->
|
<!-- Welcome to Frappe Books -->
|
||||||
<div class="px-6 py-10">
|
<div class="px-4 py-4">
|
||||||
<h1 class="text-2xl font-semibold select-none">
|
<h1 class="text-2xl font-semibold select-none">
|
||||||
{{ t`Welcome to Frappe Books` }}
|
{{ t`Welcome to Frappe Books` }}
|
||||||
</h1>
|
</h1>
|
||||||
@ -27,7 +27,7 @@
|
|||||||
<!-- New File (Blue Icon) -->
|
<!-- New File (Blue Icon) -->
|
||||||
<div
|
<div
|
||||||
@click="newDatabase"
|
@click="newDatabase"
|
||||||
class="px-6 h-18 flex flex-row items-center gap-4 p-2"
|
class="px-4 h-row-largest flex flex-row items-center gap-4 p-2"
|
||||||
:class="creatingDemo ? '' : 'hover:bg-gray-100 cursor-pointer'"
|
:class="creatingDemo ? '' : 'hover:bg-gray-100 cursor-pointer'"
|
||||||
>
|
>
|
||||||
<div class="w-8 h-8 rounded-full bg-blue-500 relative flex-center">
|
<div class="w-8 h-8 rounded-full bg-blue-500 relative flex-center">
|
||||||
@ -47,7 +47,7 @@
|
|||||||
<!-- Existing File (Green Icon) -->
|
<!-- Existing File (Green Icon) -->
|
||||||
<div
|
<div
|
||||||
@click="existingDatabase"
|
@click="existingDatabase"
|
||||||
class="px-6 h-18 flex flex-row items-center gap-4 p-2"
|
class="px-4 h-row-largest flex flex-row items-center gap-4 p-2"
|
||||||
:class="creatingDemo ? '' : 'hover:bg-gray-100 cursor-pointer'"
|
:class="creatingDemo ? '' : 'hover:bg-gray-100 cursor-pointer'"
|
||||||
>
|
>
|
||||||
<div class="w-8 h-8 rounded-full bg-green-500 relative flex-center">
|
<div class="w-8 h-8 rounded-full bg-green-500 relative flex-center">
|
||||||
@ -67,7 +67,7 @@
|
|||||||
<!-- File List -->
|
<!-- File List -->
|
||||||
<div class="overflow-y-auto" style="max-height: 340px">
|
<div class="overflow-y-auto" style="max-height: 340px">
|
||||||
<div
|
<div
|
||||||
class="h-18 px-6 flex gap-4 items-center"
|
class="h-row-largest px-4 flex gap-4 items-center"
|
||||||
:class="creatingDemo ? '' : 'hover:bg-gray-100 cursor-pointer'"
|
:class="creatingDemo ? '' : 'hover:bg-gray-100 cursor-pointer'"
|
||||||
v-for="(file, i) in files"
|
v-for="(file, i) in files"
|
||||||
:key="file.dbPath"
|
:key="file.dbPath"
|
||||||
@ -137,8 +137,7 @@
|
|||||||
justify-between
|
justify-between
|
||||||
items-center
|
items-center
|
||||||
absolute
|
absolute
|
||||||
px-6
|
p-4
|
||||||
py-6
|
|
||||||
text-gray-900
|
text-gray-900
|
||||||
"
|
"
|
||||||
style="top: 100%; transform: translateY(-100%)"
|
style="top: 100%; transform: translateY(-100%)"
|
||||||
|
@ -1,26 +1,21 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="flex flex-col overflow-y-hidden">
|
<div class="flex flex-col overflow-y-hidden">
|
||||||
<PageHeader :title="t`Setup Your Workspace`" />
|
<PageHeader :title="t`Setup Your Workspace`" />
|
||||||
<div class="flex-1 mx-4 overflow-y-auto overflow-x-hidden">
|
<div class="flex-1 overflow-y-auto overflow-x-hidden">
|
||||||
<div class="my-4" v-for="section in sections" :key="section.label">
|
<div
|
||||||
|
class="p-4 border-b"
|
||||||
|
v-for="section in sections"
|
||||||
|
:key="section.label"
|
||||||
|
>
|
||||||
<h2 class="font-medium">{{ section.label }}</h2>
|
<h2 class="font-medium">{{ section.label }}</h2>
|
||||||
<div class="flex mt-4 -mx-2">
|
<div class="flex mt-4 gap-4">
|
||||||
<div
|
<div
|
||||||
class="flex-shrink-0 w-full px-2 md:w-1/3 sm:w-1/2"
|
class="w-full md:w-1/3 sm:w-1/2"
|
||||||
v-for="item in section.items"
|
v-for="item in section.items"
|
||||||
:key="item.label"
|
:key="item.label"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="
|
class="flex flex-col justify-between h-40 p-4 border rounded-lg"
|
||||||
flex flex-col
|
|
||||||
justify-between
|
|
||||||
h-40
|
|
||||||
p-4
|
|
||||||
border
|
|
||||||
rounded-lg
|
|
||||||
cursor-pointer
|
|
||||||
hover:shadow-md
|
|
||||||
"
|
|
||||||
@mouseenter="() => (activeCard = item.key)"
|
@mouseenter="() => (activeCard = item.key)"
|
||||||
@mouseleave="() => (activeCard = null)"
|
@mouseleave="() => (activeCard = null)"
|
||||||
>
|
>
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
<!-- Invoice Form -->
|
<!-- Invoice Form -->
|
||||||
<template #body v-if="doc">
|
<template #body v-if="doc">
|
||||||
<div class="p-4 text-2xl font-semibold flex justify-between">
|
<div class="px-4 text-xl font-semibold flex justify-between h-row-large items-center">
|
||||||
<h1>
|
<h1>
|
||||||
{{ doc.notInserted ? t`New Entry` : doc.name }}
|
{{ doc.notInserted ? t`New Entry` : doc.name }}
|
||||||
</h1>
|
</h1>
|
||||||
@ -102,7 +102,7 @@
|
|||||||
|
|
||||||
<div v-if="doc.items?.length ?? 0" class="mt-auto">
|
<div v-if="doc.items?.length ?? 0" class="mt-auto">
|
||||||
<hr />
|
<hr />
|
||||||
<div class="flex justify-between text-base m-6 gap-12">
|
<div class="flex justify-between text-base m-4 gap-12">
|
||||||
<!-- Form Terms-->
|
<!-- Form Terms-->
|
||||||
<FormControl
|
<FormControl
|
||||||
class="w-1/2 self-end"
|
class="w-1/2 self-end"
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
<!-- Journal Entry Form -->
|
<!-- Journal Entry Form -->
|
||||||
<template #body v-if="doc">
|
<template #body v-if="doc">
|
||||||
<div class="p-4 text-2xl font-semibold flex justify-between">
|
<div class="px-4 text-xl font-semibold flex justify-between h-row-large items-center">
|
||||||
<h1>
|
<h1>
|
||||||
{{ doc.notInserted ? t`New Entry` : doc.name }}
|
{{ doc.notInserted ? t`New Entry` : doc.name }}
|
||||||
</h1>
|
</h1>
|
||||||
@ -98,7 +98,7 @@
|
|||||||
<!-- Footer -->
|
<!-- Footer -->
|
||||||
<div v-if="doc.accounts?.length ?? 0" class="mt-auto">
|
<div v-if="doc.accounts?.length ?? 0" class="mt-auto">
|
||||||
<hr />
|
<hr />
|
||||||
<div class="flex justify-between text-base m-6 gap-12">
|
<div class="flex justify-between text-base m-4 gap-12">
|
||||||
<!-- User Remark -->
|
<!-- User Remark -->
|
||||||
<FormControl
|
<FormControl
|
||||||
v-if="!doc.submitted || doc.userRemark"
|
v-if="!doc.submitted || doc.userRemark"
|
||||||
|
@ -4,16 +4,16 @@
|
|||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<p class="w-8 text-right mr-4 text-gray-700">#</p>
|
<p class="w-8 text-right mr-4 text-gray-700">#</p>
|
||||||
<Row
|
<Row
|
||||||
class="flex-1 text-gray-700 border-none"
|
class="flex-1 text-gray-700 border-none h-row-mid"
|
||||||
:columnCount="columns.length"
|
:columnCount="columns.length"
|
||||||
gap="1rem"
|
gap="1rem"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
v-for="(column, i) in columns"
|
v-for="(column, i) in columns"
|
||||||
:key="column.label"
|
:key="column.label"
|
||||||
class="py-4 overflow-x-auto no-scrollbar whitespace-nowrap"
|
class="overflow-x-auto no-scrollbar whitespace-nowrap h-row items-center flex"
|
||||||
:class="{
|
:class="{
|
||||||
'text-right': isNumeric(column.fieldtype),
|
'ml-auto': isNumeric(column.fieldtype),
|
||||||
'pr-4': i === columns.length - 1,
|
'pr-4': i === columns.length - 1,
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
@ -33,7 +33,7 @@
|
|||||||
</p>
|
</p>
|
||||||
<Row
|
<Row
|
||||||
gap="1rem"
|
gap="1rem"
|
||||||
class="cursor-pointer text-gray-900 flex-1 border-none"
|
class="cursor-pointer text-gray-900 flex-1 border-none h-row-mid"
|
||||||
@click="openForm(doc)"
|
@click="openForm(doc)"
|
||||||
:columnCount="columns.length"
|
:columnCount="columns.length"
|
||||||
>
|
>
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="py-4 flex items-center truncate" :class="cellClass">
|
<div class="flex items-center truncate" :class="cellClass">
|
||||||
<span class="truncate" v-if="!customRenderer">{{ columnValue }}</span>
|
<span class="truncate" v-if="!customRenderer">{{ columnValue }}</span>
|
||||||
<component v-else :is="customRenderer" />
|
<component v-else :is="customRenderer" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { fyo } from 'src/initFyo';
|
import { fyo } from 'src/initFyo';
|
||||||
|
import { isNumeric } from 'src/utils';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ListCell',
|
name: 'ListCell',
|
||||||
@ -21,9 +22,7 @@ export default {
|
|||||||
return this.column.render(this.doc);
|
return this.column.render(this.doc);
|
||||||
},
|
},
|
||||||
cellClass() {
|
cellClass() {
|
||||||
return ['Int', 'Float', 'Currency'].includes(this.column.fieldtype)
|
return isNumeric(this.column.fieldtype) ? 'justify-end' : '';
|
||||||
? 'justify-end'
|
|
||||||
: '';
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -39,13 +39,13 @@
|
|||||||
|
|
||||||
<!-- Printview Customizer -->
|
<!-- Printview Customizer -->
|
||||||
<div class="border-l w-80" v-if="showCustomiser">
|
<div class="border-l w-80" v-if="showCustomiser">
|
||||||
<div class="mt-4 px-4 flex items-center justify-between">
|
<div class="px-4 flex items-center justify-between h-row-largest border-b">
|
||||||
<h2 class="font-semibold">{{ t`Customise` }}</h2>
|
<h2 class="font-semibold">{{ t`Customise` }}</h2>
|
||||||
<Button :icon="true" @click="showCustomiser = false">
|
<Button :icon="true" @click="showCustomiser = false">
|
||||||
<feather-icon name="x" class="w-4 h-4" />
|
<feather-icon name="x" class="w-4 h-4" />
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<TwoColumnForm class="mt-4" :doc="printSettings" :autosave="true" />
|
<TwoColumnForm :doc="printSettings" :autosave="true" class="border-none"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="border-l h-full overflow-auto">
|
<div class="border-l h-full overflow-auto">
|
||||||
<!-- Quick edit Tool bar -->
|
<!-- Quick edit Tool bar -->
|
||||||
<div class="flex items-center justify-between px-4 pt-4">
|
<div class="flex items-center justify-between px-4 border-b h-row-largest">
|
||||||
<!-- Close Button and Status Text -->
|
<!-- Close Button and Status Text -->
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<Button :icon="true" @click="routeToPrevious">
|
<Button :icon="true" @click="routeToPrevious">
|
||||||
@ -43,7 +43,11 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Name and image -->
|
<!-- Name and image -->
|
||||||
<div class="p-4 gap-2 flex-center flex flex-col items-center" v-if="doc">
|
<div
|
||||||
|
class="px-4 flex-center flex flex-col items-center gap-1.5"
|
||||||
|
style="height: calc(var(--h-row-mid) * 2 + 1px)"
|
||||||
|
v-if="doc"
|
||||||
|
>
|
||||||
<FormControl
|
<FormControl
|
||||||
v-if="imageField"
|
v-if="imageField"
|
||||||
:df="imageField"
|
:df="imageField"
|
||||||
@ -53,7 +57,7 @@
|
|||||||
:letter-placeholder="doc[titleField.fieldname]?.[0] ?? null"
|
:letter-placeholder="doc[titleField.fieldname]?.[0] ?? null"
|
||||||
/>
|
/>
|
||||||
<FormControl
|
<FormControl
|
||||||
input-class="text-center"
|
input-class="text-center h-8"
|
||||||
ref="titleControl"
|
ref="titleControl"
|
||||||
v-if="titleField"
|
v-if="titleField"
|
||||||
:df="titleField"
|
:df="titleField"
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<FormContainer :title="t`Settings`">
|
<FormContainer :title="t`Settings`">
|
||||||
<template #body>
|
<template #body>
|
||||||
<!-- Icon Tab Bar -->
|
<!-- Icon Tab Bar -->
|
||||||
<div class="flex justify-around mb-4 mt-6">
|
<div class="flex justify-around mb-2 mt-4">
|
||||||
<div
|
<div
|
||||||
v-for="(tab, i) in tabs"
|
v-for="(tab, i) in tabs"
|
||||||
:key="tab.label"
|
:key="tab.label"
|
||||||
|
@ -61,9 +61,7 @@ export default {
|
|||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
this.doc = await fyo.doc.getDoc('PrintSettings');
|
this.doc = await fyo.doc.getDoc('PrintSettings');
|
||||||
this.companyName = (
|
this.companyName = (await fyo.doc.getDoc('AccountingSettings')).companyName;
|
||||||
await fyo.doc.getDoc('AccountingSettings')
|
|
||||||
).companyName;
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
fields() {
|
fields() {
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
@change="forwardChangeEvent"
|
@change="forwardChangeEvent"
|
||||||
/>
|
/>
|
||||||
<LanguageSelector
|
<LanguageSelector
|
||||||
class="text-sm w-28 bg-gray-100 rounded-md mb-6 ml-6"
|
class="text-sm w-28 bg-gray-100 rounded-md mb-4 ml-4"
|
||||||
input-class="py-1.5 bg-transparent"
|
input-class="py-1.5 bg-transparent"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div class="flex-1 bg-white flex justify-center items-center window-drag">
|
||||||
class="py-10 flex-1 bg-white flex justify-center items-center window-drag"
|
|
||||||
>
|
|
||||||
<!-- 0: Language Selection Slide -->
|
<!-- 0: Language Selection Slide -->
|
||||||
<Slide
|
<Slide
|
||||||
@primary-clicked="handlePrimary"
|
@primary-clicked="handlePrimary"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="w-form shadow rounded-lg border relative" style="height: 700px">
|
<div class="w-form shadow rounded-lg border relative" style="height: 700px">
|
||||||
<!-- Slide Title -->
|
<!-- Slide Title -->
|
||||||
<div class="px-6 py-10">
|
<div class="p-4">
|
||||||
<h1 class="text-2xl font-semibold select-none">
|
<h1 class="text-2xl font-semibold select-none">
|
||||||
<slot name="title"></slot>
|
<slot name="title"></slot>
|
||||||
</h1>
|
</h1>
|
||||||
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
<!-- Slide Buttons -->
|
<!-- Slide Buttons -->
|
||||||
<div
|
<div
|
||||||
class="flex justify-between px-6 pb-6 window-no-drag absolute w-form"
|
class="flex justify-between px-4 pb-4 window-no-drag absolute w-form"
|
||||||
style="top: 100%; transform: translateY(-100%)"
|
style="top: 100%; transform: translateY(-100%)"
|
||||||
>
|
>
|
||||||
<Button
|
<Button
|
||||||
|
@ -53,6 +53,20 @@ html {
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:root {
|
||||||
|
--w-sidebar: 12rem;
|
||||||
|
--w-desk: calc(100vw - 12rem);
|
||||||
|
--w-scrollbar: 0.5rem;
|
||||||
|
|
||||||
|
|
||||||
|
/* Row Heights */
|
||||||
|
--h-row-smallest: 2rem;
|
||||||
|
--h-row-small: 2.5rem;
|
||||||
|
--h-row-mid: 3rem;
|
||||||
|
--h-row-large: 3.5rem;
|
||||||
|
--h-row-largest: 4rem;
|
||||||
|
}
|
||||||
|
|
||||||
.w-form {
|
.w-form {
|
||||||
width: 600px;
|
width: 600px;
|
||||||
}
|
}
|
||||||
@ -61,10 +75,24 @@ html {
|
|||||||
height: 800px;
|
height: 800px;
|
||||||
}
|
}
|
||||||
|
|
||||||
:root {
|
.h-row-smallest {
|
||||||
--w-sidebar: 12rem;
|
height: var(--h-row-smallest);
|
||||||
--w-desk: calc(100vw - 12rem);
|
}
|
||||||
--w-scrollbar: 8px;
|
|
||||||
|
.h-row-small {
|
||||||
|
height: var(--h-row-small);
|
||||||
|
}
|
||||||
|
|
||||||
|
.h-row-mid {
|
||||||
|
height: var(--h-row-mid);
|
||||||
|
}
|
||||||
|
|
||||||
|
.h-row-large {
|
||||||
|
height: var(--h-row-large);
|
||||||
|
}
|
||||||
|
|
||||||
|
.h-row-largest {
|
||||||
|
height: var(--h-row-largest);
|
||||||
}
|
}
|
||||||
|
|
||||||
.w-sidebar {
|
.w-sidebar {
|
||||||
|
Loading…
Reference in New Issue
Block a user