lint: update type data and lint
parent
c87c852509
commit
6261592339
|
@ -61,7 +61,7 @@ export class PrivilegeService {
|
|||
}
|
||||
|
||||
async privilegeConfiguration(): Promise<UserPrivilegeConfigurationEntity> {
|
||||
const { module, menu, sub_menu, section } = this.moduleKey();
|
||||
const { module, menu } = this.moduleKey();
|
||||
return await this.repository.findOne({
|
||||
select: ['id', 'view', 'create', 'edit', 'delete', 'cancel', 'confirm'],
|
||||
where: {
|
||||
|
|
|
@ -25,7 +25,7 @@ export abstract class BaseBatchDeleteManager<Entity> extends BaseManager {
|
|||
async process(): Promise<void> {
|
||||
let totalFailed = 0;
|
||||
let totalSuccess = 0;
|
||||
let messages = [];
|
||||
const messages = [];
|
||||
|
||||
for (const id of this.dataIds) {
|
||||
try {
|
||||
|
|
|
@ -29,7 +29,7 @@ export abstract class BaseBatchUpdateStatusManager<Entity> extends BaseManager {
|
|||
async process(): Promise<void> {
|
||||
let totalFailed = 0;
|
||||
let totalSuccess = 0;
|
||||
let messages = [];
|
||||
const messages = [];
|
||||
|
||||
for (const id of this.dataIds) {
|
||||
try {
|
||||
|
|
|
@ -24,7 +24,7 @@ export interface validateRelations {
|
|||
|
||||
export interface columnUniques {
|
||||
column: string;
|
||||
query?: Object;
|
||||
query?: any;
|
||||
}
|
||||
|
||||
export interface IEvent<Entity = any> {
|
||||
|
|
|
@ -1,18 +1,29 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
import { MigrationInterface, QueryRunner } from 'typeorm';
|
||||
|
||||
export class UpdateTableTransaction1720436852936 implements MigrationInterface {
|
||||
name = 'UpdateTableTransaction1720436852936'
|
||||
name = 'UpdateTableTransaction1720436852936';
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "transaction_taxes" ADD "tax_total_value" numeric`);
|
||||
await queryRunner.query(`ALTER TABLE "transaction_taxes" DROP COLUMN "taxt_value"`);
|
||||
await queryRunner.query(`ALTER TABLE "transaction_taxes" ADD "taxt_value" numeric`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "transaction_taxes" DROP COLUMN "taxt_value"`);
|
||||
await queryRunner.query(`ALTER TABLE "transaction_taxes" ADD "taxt_value" character varying`);
|
||||
await queryRunner.query(`ALTER TABLE "transaction_taxes" DROP COLUMN "tax_total_value"`);
|
||||
}
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "transaction_taxes" ADD "tax_total_value" numeric`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "transaction_taxes" DROP COLUMN "taxt_value"`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "transaction_taxes" ADD "taxt_value" numeric`,
|
||||
);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "transaction_taxes" DROP COLUMN "taxt_value"`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "transaction_taxes" ADD "taxt_value" character varying`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "transaction_taxes" DROP COLUMN "tax_total_value"`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,8 +10,6 @@ import { PaymentMethodType } from 'src/modules/transaction/payment-method/consta
|
|||
@Controller('v1/constant')
|
||||
@Public(true)
|
||||
export class ConstantController {
|
||||
constructor() {}
|
||||
|
||||
@Get('master-data-status')
|
||||
async masterDataStatus(): Promise<any> {
|
||||
return [STATUS.ACTIVE, STATUS.DRAFT, STATUS.INACTIVE];
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
export class CronMidnightEvent {
|
||||
constructor(public readonly data: {}) {}
|
||||
// constructor(public readonly data: {}) {}
|
||||
}
|
||||
|
|
|
@ -16,6 +16,6 @@ export class MidnightCronManager {
|
|||
|
||||
console.log('Cron Event executed every 00:00 minutes.', now);
|
||||
|
||||
this.eventBus.publishAll([new CronMidnightEvent({})]);
|
||||
this.eventBus.publishAll([new CronMidnightEvent()]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,5 +6,7 @@ import { ErrorLogService } from '../../data/services/error-log.service';
|
|||
export class RecordErrorLogHandler implements IEventHandler<RecordErrorLog> {
|
||||
constructor(private dataservice: ErrorLogService) {}
|
||||
|
||||
async handle(event: RecordErrorLog) {}
|
||||
async handle(event: RecordErrorLog) {
|
||||
// TODO: Implement logic here
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,5 +3,7 @@ import { RecordLog } from '../entities/log.event';
|
|||
|
||||
@EventsHandler(RecordLog)
|
||||
export class RecordLogHandler implements IEventHandler<RecordLog> {
|
||||
async handle(event: RecordLog) {}
|
||||
async handle(event: RecordLog) {
|
||||
// TODO: Implement logic here
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,9 @@ export class CreateItemCategoryManager extends BaseCreateManager<ItemCategoryEnt
|
|||
return;
|
||||
}
|
||||
|
||||
async generateConfig(): Promise<void> {}
|
||||
async generateConfig(): Promise<void> {
|
||||
// TODO: Implement logic here
|
||||
}
|
||||
|
||||
get validateRelations(): validateRelations[] {
|
||||
return [];
|
||||
|
|
|
@ -19,7 +19,7 @@ export class IndexItemRateManager extends BaseIndexManager<ItemEntity> {
|
|||
|
||||
async afterProcess(): Promise<void> {
|
||||
this.result.data?.map((item) => {
|
||||
let prices = [];
|
||||
const prices = [];
|
||||
for (
|
||||
let d = new Date(this.filterParam.start_date);
|
||||
d <= new Date(this.filterParam.end_date);
|
||||
|
|
|
@ -21,7 +21,7 @@ export async function ValidateSeasonPeriodHelper(dataService, data) {
|
|||
=> akan tetapi dapat ditindih oleh season period 2024-08-15, 2024-08-28 days [Sabtu, Senin] (karena ini naik prio menjadi priority 2)
|
||||
*/
|
||||
const query = dataService.getRepository().createQueryBuilder('data');
|
||||
let priority: number = 3;
|
||||
let priority = 3;
|
||||
// libur / specific date
|
||||
if (
|
||||
data.holidays?.length > 0 ||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
import { BaseFilterEntity } from 'src/core/modules/domain/entities/base-filter.entity';
|
||||
|
||||
export interface FilterSeasonTypeEntity extends BaseFilterEntity {}
|
||||
export type FilterSeasonTypeEntity = BaseFilterEntity;
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
import { BaseFilterEntity } from 'src/core/modules/domain/entities/base-filter.entity';
|
||||
|
||||
export interface FilterVipCategoryEntity extends BaseFilterEntity {}
|
||||
export type FilterVipCategoryEntity = BaseFilterEntity;
|
||||
|
|
|
@ -19,7 +19,9 @@ export class CreateVipCategoryManager extends BaseCreateManager<VipCategoryEntit
|
|||
return;
|
||||
}
|
||||
|
||||
async generateConfig(): Promise<void> {}
|
||||
async generateConfig(): Promise<void> {
|
||||
// TODO: Implement logic here
|
||||
}
|
||||
|
||||
get validateRelations(): validateRelations[] {
|
||||
return [];
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
import { BaseFilterEntity } from 'src/core/modules/domain/entities/base-filter.entity';
|
||||
|
||||
export interface FilterVipCodeEntity extends BaseFilterEntity {}
|
||||
export type FilterVipCodeEntity = BaseFilterEntity;
|
||||
|
|
|
@ -30,7 +30,9 @@ export class CreateTenantManager extends BaseCreateManager<UserEntity> {
|
|||
return;
|
||||
}
|
||||
|
||||
async generateConfig(): Promise<void> {}
|
||||
async generateConfig(): Promise<void> {
|
||||
// TODO: Implement logic here
|
||||
}
|
||||
|
||||
get uniqueColumns(): columnUniques[] {
|
||||
return [
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
import { BaseFilterEntity } from 'src/core/modules/domain/entities/base-filter.entity';
|
||||
|
||||
export interface FilterUserPrivilegeEntity extends BaseFilterEntity {}
|
||||
export type FilterUserPrivilegeEntity = BaseFilterEntity;
|
||||
|
|
|
@ -24,7 +24,9 @@ export class CreateUserPrivilegeManager extends BaseCreateManager<UserPrivilegeE
|
|||
return;
|
||||
}
|
||||
|
||||
async generateConfig(): Promise<void> {}
|
||||
async generateConfig(): Promise<void> {
|
||||
// TODO: Implement logic here
|
||||
}
|
||||
|
||||
get uniqueColumns(): columnUniques[] {
|
||||
return [{ column: 'name' }];
|
||||
|
|
|
@ -31,7 +31,9 @@ export class CreateUserManager extends BaseCreateManager<UserEntity> {
|
|||
return;
|
||||
}
|
||||
|
||||
async generateConfig(): Promise<void> {}
|
||||
async generateConfig(): Promise<void> {
|
||||
// TODO: Implement logic here
|
||||
}
|
||||
|
||||
get validateRelations(): validateRelations[] {
|
||||
return [];
|
||||
|
|
Loading…
Reference in New Issue