mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 12:20:31 +00:00
feat: models default views
This commit is contained in:
@@ -13,7 +13,7 @@ export const ERRORS = {
|
||||
};
|
||||
|
||||
export const DEFAULT_VIEW_COLUMNS = [];
|
||||
export const DEFAULT_VIEWS = [
|
||||
export const CreditNoteDefaultViews = [
|
||||
{
|
||||
name: 'credit_note.view.draft',
|
||||
slug: 'draft',
|
||||
@@ -71,7 +71,7 @@ export const defaultCreditNoteBrandingAttributes = {
|
||||
// # Colors
|
||||
primaryColor: '',
|
||||
secondaryColor: '',
|
||||
|
||||
|
||||
// # Company logo
|
||||
showCompanyLogo: true,
|
||||
companyLogoKey: '',
|
||||
|
||||
@@ -10,10 +10,13 @@ import { ItemEntry } from '@/modules/TransactionItemEntry/models/ItemEntry';
|
||||
import { Warehouse } from '@/modules/Warehouses/models/Warehouse.model';
|
||||
import { mixin, Model, raw } from 'objection';
|
||||
import { CreditNoteMeta } from './CreditNote.meta';
|
||||
import { InjectModelDefaultViews } from '@/modules/Views/decorators/InjectModelDefaultViews.decorator';
|
||||
import { CreditNoteDefaultViews } from '../constants';
|
||||
|
||||
@ExportableModel()
|
||||
@ImportableModel()
|
||||
@InjectModelMeta(CreditNoteMeta)
|
||||
@InjectModelDefaultViews(CreditNoteDefaultViews)
|
||||
export class CreditNote extends TenantBaseModel {
|
||||
public amount: number;
|
||||
public exchangeRate: number;
|
||||
@@ -402,20 +405,6 @@ export class CreditNote extends TenantBaseModel {
|
||||
};
|
||||
}
|
||||
|
||||
// /**
|
||||
// * Sale invoice meta.
|
||||
// */
|
||||
// static get meta() {
|
||||
// return CreditNoteMeta;
|
||||
// }
|
||||
|
||||
// /**
|
||||
// * Retrieve the default custom views, roles and columns.
|
||||
// */
|
||||
// static get defaultViews() {
|
||||
// return DEFAULT_VIEWS;
|
||||
// }
|
||||
|
||||
/**
|
||||
* Model searchable.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user