mirror of
https://github.com/frappe/books.git
synced 2025-02-02 12:08:27 +00:00
Merge pull request #715 from frappe/fix-terms
fix: minor UI/UX fixes and improvements
This commit is contained in:
commit
457559d8de
@ -56,6 +56,7 @@ export async function setupDummyInstance(
|
||||
ModelNameEnum.SystemSettings,
|
||||
'instanceId'
|
||||
)) as string;
|
||||
await fyo.singles.SystemSettings?.setAndSync('hideGetStarted', true);
|
||||
|
||||
fyo.store.skipTelemetryLogging = false;
|
||||
return { companyName: options.companyName, instanceId };
|
||||
|
@ -478,23 +478,12 @@ export abstract class InvoiceItem extends Doc {
|
||||
|
||||
static filters: FiltersMap = {
|
||||
item: (doc: Doc) => {
|
||||
const itemList = doc.parentdoc!.items as Doc[];
|
||||
const items = itemList.map((d) => d.item as string).filter(Boolean);
|
||||
|
||||
let itemNotFor = 'Sales';
|
||||
if (doc.isSales) {
|
||||
itemNotFor = 'Purchases';
|
||||
}
|
||||
|
||||
const baseFilter = { for: ['not in', [itemNotFor]] };
|
||||
if (items.length <= 0) {
|
||||
return baseFilter;
|
||||
}
|
||||
|
||||
return {
|
||||
name: ['not in', items],
|
||||
...baseFilter,
|
||||
};
|
||||
return { for: ['not in', [itemNotFor]] };
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -170,7 +170,7 @@ export function getMakeReturnDocAction(fyo: Fyo): Action {
|
||||
doc.isSubmitted &&
|
||||
!doc.isReturn,
|
||||
action: async (doc: Doc) => {
|
||||
const returnDoc = await (doc as StockTransfer).getReturnDoc();
|
||||
const returnDoc = await (doc as StockTransfer)?.getReturnDoc();
|
||||
if (!returnDoc || !returnDoc.name) {
|
||||
return;
|
||||
}
|
||||
|
@ -30,13 +30,6 @@
|
||||
"fieldtype": "Data",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"fieldname": "state",
|
||||
"label": "State",
|
||||
"placeholder": "State",
|
||||
"options": [],
|
||||
"fieldtype": "AutoComplete"
|
||||
},
|
||||
{
|
||||
"fieldname": "country",
|
||||
"label": "Country",
|
||||
@ -45,6 +38,13 @@
|
||||
"options": [],
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"fieldname": "state",
|
||||
"label": "State",
|
||||
"placeholder": "State",
|
||||
"options": [],
|
||||
"fieldtype": "AutoComplete"
|
||||
},
|
||||
{
|
||||
"fieldname": "postalCode",
|
||||
"label": "Postal Code",
|
||||
@ -83,8 +83,8 @@
|
||||
"addressLine1",
|
||||
"addressLine2",
|
||||
"city",
|
||||
"state",
|
||||
"country",
|
||||
"state",
|
||||
"postalCode"
|
||||
],
|
||||
"linkDisplayField": "addressDisplay"
|
||||
|
@ -20,12 +20,8 @@
|
||||
"section": "Default"
|
||||
},
|
||||
{
|
||||
"abstract": true,
|
||||
"fieldname": "party",
|
||||
"label": "Party",
|
||||
"fieldtype": "Link",
|
||||
"target": "Party",
|
||||
"create": true,
|
||||
"required": true,
|
||||
"section": "Default"
|
||||
},
|
||||
{
|
||||
@ -167,10 +163,8 @@
|
||||
"section": "Outstanding"
|
||||
},
|
||||
{
|
||||
"abstract": true,
|
||||
"fieldname": "stockNotTransferred",
|
||||
"label": "Stock Not Transferred",
|
||||
"fieldtype": "Float",
|
||||
"readOnly": true,
|
||||
"section": "Outstanding"
|
||||
},
|
||||
{
|
||||
|
@ -20,7 +20,7 @@
|
||||
},
|
||||
{
|
||||
"fieldname": "for",
|
||||
"label": "For",
|
||||
"label": "Purpose",
|
||||
"fieldtype": "Select",
|
||||
"options": [
|
||||
{
|
||||
@ -126,7 +126,7 @@
|
||||
},
|
||||
{
|
||||
"fieldname": "trackItem",
|
||||
"label": "Track Item",
|
||||
"label": "Track Inventory",
|
||||
"fieldtype": "Check",
|
||||
"section": "Inventory",
|
||||
"default": false
|
||||
|
@ -15,6 +15,15 @@
|
||||
"default": "PINV-",
|
||||
"section": "Default"
|
||||
},
|
||||
{
|
||||
"fieldname": "party",
|
||||
"label": "Supplier",
|
||||
"fieldtype": "Link",
|
||||
"target": "Party",
|
||||
"create": true,
|
||||
"required": true,
|
||||
"section": "Default"
|
||||
},
|
||||
{
|
||||
"fieldname": "backReference",
|
||||
"label": "Back Reference",
|
||||
@ -38,6 +47,13 @@
|
||||
"required": true,
|
||||
"edit": true,
|
||||
"section": "Items"
|
||||
},
|
||||
{
|
||||
"fieldname": "stockNotTransferred",
|
||||
"label": "Stock Not Received",
|
||||
"fieldtype": "Float",
|
||||
"readOnly": true,
|
||||
"section": "Outstanding"
|
||||
}
|
||||
],
|
||||
"keywordFields": ["name", "party"]
|
||||
|
@ -15,6 +15,15 @@
|
||||
"default": "SINV-",
|
||||
"section": "Default"
|
||||
},
|
||||
{
|
||||
"fieldname": "party",
|
||||
"label": "Customer",
|
||||
"fieldtype": "Link",
|
||||
"target": "Party",
|
||||
"create": true,
|
||||
"required": true,
|
||||
"section": "Default"
|
||||
},
|
||||
{
|
||||
"fieldname": "backReference",
|
||||
"label": "Back Reference",
|
||||
@ -38,6 +47,13 @@
|
||||
"required": true,
|
||||
"edit": true,
|
||||
"section": "Items"
|
||||
},
|
||||
{
|
||||
"fieldname": "stockNotTransferred",
|
||||
"label": "Stock Not Shipped",
|
||||
"fieldtype": "Float",
|
||||
"readOnly": true,
|
||||
"section": "Outstanding"
|
||||
}
|
||||
],
|
||||
"keywordFields": ["name", "party"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Tax",
|
||||
"label": "Tax",
|
||||
"label": "Tax Template",
|
||||
"naming": "manual",
|
||||
"isSingle": false,
|
||||
"isChild": false,
|
||||
|
@ -13,8 +13,8 @@
|
||||
"addressLine1",
|
||||
"addressLine2",
|
||||
"city",
|
||||
"state",
|
||||
"country",
|
||||
"state",
|
||||
"postalCode",
|
||||
"pos"
|
||||
]
|
||||
|
@ -18,6 +18,7 @@
|
||||
rounded-lg
|
||||
border
|
||||
"
|
||||
:class="[config.containerBorder]"
|
||||
style="pointer-events: auto"
|
||||
>
|
||||
<feather-icon
|
||||
@ -51,11 +52,10 @@
|
||||
</Teleport>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { getColorClass } from 'src/utils/colors';
|
||||
import { getIconConfig } from 'src/utils/interactive';
|
||||
import { ToastDuration, ToastType } from 'src/utils/types';
|
||||
import { toastDurationMap } from 'src/utils/ui';
|
||||
import { defineComponent, nextTick, PropType } from 'vue';
|
||||
import { PropType, defineComponent, nextTick } from 'vue';
|
||||
import FeatherIcon from './FeatherIcon.vue';
|
||||
|
||||
export default defineComponent({
|
||||
|
@ -359,6 +359,7 @@ export default defineComponent({
|
||||
await this.setFiles();
|
||||
this.fyo.telemetry.log(Verb.Created, 'dummy-instance');
|
||||
this.creatingDemo = false;
|
||||
this.$emit('file-selected', filePath);
|
||||
},
|
||||
async setFiles() {
|
||||
const dbList = await ipc.getDbList();
|
||||
|
@ -34,7 +34,11 @@ export function getBgColorClass(color: string) {
|
||||
return `bg-${vcolor}-200`;
|
||||
}
|
||||
|
||||
export function getColorClass(color: string, type: 'bg' | 'text', value = 300) {
|
||||
export function getColorClass(
|
||||
color: string,
|
||||
type: 'bg' | 'text' | 'border',
|
||||
value = 300
|
||||
) {
|
||||
return `${type}-${getValidColor(color)}-${value}`;
|
||||
}
|
||||
|
||||
|
@ -70,6 +70,8 @@ export function getIconConfig(type: ToastType) {
|
||||
}[type];
|
||||
|
||||
const iconColor = getColorClass(color ?? 'gray', 'text', 400);
|
||||
const containerBackground = getColorClass(color ?? 'gray', 'bg', 100);
|
||||
const containerBorder = getColorClass(color ?? 'gray', 'border', 300);
|
||||
|
||||
return { iconName, color, iconColor };
|
||||
return { iconName, color, iconColor, containerBorder, containerBackground };
|
||||
}
|
||||
|
@ -269,7 +269,7 @@ function getCompleteSidebar(): SidebarConfig {
|
||||
route: '/chart-of-accounts',
|
||||
},
|
||||
{
|
||||
label: t`Taxes`,
|
||||
label: t`Tax Templates`,
|
||||
name: 'taxes',
|
||||
route: '/list/Tax',
|
||||
schemaName: 'Tax',
|
||||
|
Loading…
x
Reference in New Issue
Block a user