mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-21 07:10:33 +00:00
feat: replace all src/ imports to @ alias
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import { ApiProperty } from '@nestjs/swagger';
|
import { ApiProperty } from '@nestjs/swagger';
|
||||||
import { Knex } from 'knex';
|
import { Knex } from 'knex';
|
||||||
import { Item } from 'src/modules/Items/models/Item';
|
import { Item } from '@/modules/Items/models/Item';
|
||||||
// import { AbilitySubject } from '@/interfaces';
|
// import { AbilitySubject } from '@/interfaces';
|
||||||
// import { IFilterRole } from '@/interfaces/DynamicFilter';
|
// import { IFilterRole } from '@/interfaces/DynamicFilter';
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import DependencyGraph from '@/libs/dependency-graph';
|
|||||||
import {
|
import {
|
||||||
ACCOUNT_TYPES,
|
ACCOUNT_TYPES,
|
||||||
getAccountsSupportsMultiCurrency,
|
getAccountsSupportsMultiCurrency,
|
||||||
} from 'src/constants/accounts';
|
} from '@/constants/accounts';
|
||||||
import { TenantModel } from '@/modules/System/models/TenantModel';
|
import { TenantModel } from '@/modules/System/models/TenantModel';
|
||||||
import { SearchableModel } from '@/modules/Search/SearchableMdel';
|
import { SearchableModel } from '@/modules/Search/SearchableMdel';
|
||||||
import { CustomViewBaseModel } from '@/modules/CustomViews/CustomViewBaseModel';
|
import { CustomViewBaseModel } from '@/modules/CustomViews/CustomViewBaseModel';
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import { EventEmitter2 } from '@nestjs/event-emitter';
|
|||||||
import {
|
import {
|
||||||
IItemEventDeletedPayload,
|
IItemEventDeletedPayload,
|
||||||
IItemEventDeletingPayload,
|
IItemEventDeletingPayload,
|
||||||
} from 'src/interfaces/Item';
|
} from '@/interfaces/Item';
|
||||||
import { events } from 'src/common/events/events';
|
import { events } from '@/common/events/events';
|
||||||
import { Item } from './models/Item';
|
import { Item } from './models/Item';
|
||||||
import { ERRORS } from './Items.constants';
|
import { ERRORS } from './Items.constants';
|
||||||
import { UnitOfWork } from '../Tenancy/TenancyDB/UnitOfWork.service';
|
import { UnitOfWork } from '../Tenancy/TenancyDB/UnitOfWork.service';
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { Knex } from 'knex';
|
import { Knex } from 'knex';
|
||||||
import { Injectable, Inject } from '@nestjs/common';
|
import { Injectable, Inject } from '@nestjs/common';
|
||||||
import { EventEmitter2 } from '@nestjs/event-emitter';
|
import { EventEmitter2 } from '@nestjs/event-emitter';
|
||||||
import { IItemDTO, IItemEventEditedPayload } from 'src/interfaces/Item';
|
import { IItemDTO, IItemEventEditedPayload } from '@/interfaces/Item';
|
||||||
import { events } from 'src/common/events/events';
|
import { events } from '@/common/events/events';
|
||||||
import { ItemsValidators } from './ItemValidator.service';
|
import { ItemsValidators } from './ItemValidator.service';
|
||||||
import { Item } from './models/Item';
|
import { Item } from './models/Item';
|
||||||
import { UnitOfWork } from '../Tenancy/TenancyDB/UnitOfWork.service';
|
import { UnitOfWork } from '../Tenancy/TenancyDB/UnitOfWork.service';
|
||||||
|
|||||||
@@ -5,10 +5,9 @@ import {
|
|||||||
Param,
|
Param,
|
||||||
Post,
|
Post,
|
||||||
UsePipes,
|
UsePipes,
|
||||||
UseInterceptors,
|
|
||||||
UseGuards,
|
UseGuards,
|
||||||
} from '@nestjs/common';
|
} from '@nestjs/common';
|
||||||
import { ZodValidationPipe } from 'src/common/pipes/ZodValidation.pipe';
|
import { ZodValidationPipe } from '@/common/pipes/ZodValidation.pipe';
|
||||||
import { createItemSchema } from './Item.schema';
|
import { createItemSchema } from './Item.schema';
|
||||||
import { CreateItemService } from './CreateItem.service';
|
import { CreateItemService } from './CreateItem.service';
|
||||||
import { Item } from './models/Item';
|
import { Item } from './models/Item';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { DATATYPES_LENGTH } from 'src/constants/data-types';
|
import { DATATYPES_LENGTH } from '@/constants/data-types';
|
||||||
import z from 'zod';
|
import z from 'zod';
|
||||||
|
|
||||||
export const createItemSchema = z
|
export const createItemSchema = z
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ import {
|
|||||||
ACCOUNT_PARENT_TYPE,
|
ACCOUNT_PARENT_TYPE,
|
||||||
ACCOUNT_ROOT_TYPE,
|
ACCOUNT_ROOT_TYPE,
|
||||||
ACCOUNT_TYPE,
|
ACCOUNT_TYPE,
|
||||||
} from 'src/constants/accounts';
|
} from '@/constants/accounts';
|
||||||
import { ServiceError } from './ServiceError';
|
import { ServiceError } from './ServiceError';
|
||||||
import { IItem, IItemDTO } from 'src/interfaces/Item';
|
import { IItem, IItemDTO } from '@/interfaces/Item';
|
||||||
import { ERRORS } from './Items.constants';
|
import { ERRORS } from './Items.constants';
|
||||||
import { Item } from './models/Item';
|
import { Item } from './models/Item';
|
||||||
import { Account } from '../Accounts/models/Account';
|
import { Account } from '../Accounts/models/Account';
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
import { BaseModel } from 'src/models/Model';
|
import { BaseModel } from '@/models/Model';
|
||||||
|
|
||||||
export class SystemModel extends BaseModel {}
|
export class SystemModel extends BaseModel {}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { BaseModel } from 'src/models/Model';
|
import { BaseModel } from '@/models/Model';
|
||||||
|
|
||||||
export class SystemUser extends BaseModel {
|
export class SystemUser extends BaseModel {
|
||||||
public readonly firstName: string;
|
public readonly firstName: string;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { BaseModel } from 'src/models/Model';
|
import { BaseModel } from '@/models/Model';
|
||||||
|
|
||||||
export class TenantModel extends BaseModel {
|
export class TenantModel extends BaseModel {
|
||||||
public readonly organizationId: string;
|
public readonly organizationId: string;
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
"forceConsistentCasingInFileNames": false,
|
"forceConsistentCasingInFileNames": false,
|
||||||
"noFallthroughCasesInSwitch": false,
|
"noFallthroughCasesInSwitch": false,
|
||||||
"paths": {
|
"paths": {
|
||||||
"@/*": ["src/*"],
|
"@/*": ["./src/*"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user