fix(format) perbaikan formatting
parent
bc25b9d020
commit
0df0f30de5
|
@ -34,28 +34,16 @@ export class ConstantController {
|
||||||
|
|
||||||
@Get('transaction-user-type')
|
@Get('transaction-user-type')
|
||||||
async userType(): Promise<any> {
|
async userType(): Promise<any> {
|
||||||
return [
|
return ['group', 'vip'];
|
||||||
'group',
|
|
||||||
'vip'
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Get('transaction-payment-type')
|
@Get('transaction-payment-type')
|
||||||
async transactionPaymentType(): Promise<any> {
|
async transactionPaymentType(): Promise<any> {
|
||||||
return [
|
return ['midtrans', 'bank transfer', 'qris', 'counter'];
|
||||||
'midtrans',
|
|
||||||
'bank transfer',
|
|
||||||
'qris',
|
|
||||||
'counter',
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Get('transaction-type')
|
@Get('transaction-type')
|
||||||
async transactionType(): Promise<any> {
|
async transactionType(): Promise<any> {
|
||||||
return [
|
return ['counter', 'admin', 'online'];
|
||||||
'counter',
|
|
||||||
'admin',
|
|
||||||
'online'
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,10 @@ import { ItemModel } from 'src/modules/item-related/item/data/models/item.model'
|
||||||
import { UserModel } from 'src/modules/user-related/user/data/models/user.model';
|
import { UserModel } from 'src/modules/user-related/user/data/models/user.model';
|
||||||
import { UserDataService } from 'src/modules/user-related/user/data/services/user-data.service';
|
import { UserDataService } from 'src/modules/user-related/user/data/services/user-data.service';
|
||||||
import { ItemDataService } from 'src/modules/item-related/item/data/services/item-data.service';
|
import { ItemDataService } from 'src/modules/item-related/item/data/services/item-data.service';
|
||||||
import { BookingDeletedEvent, BookingHandler } from './domain/managers/booking.handler';
|
import {
|
||||||
|
BookingDeletedEvent,
|
||||||
|
BookingHandler,
|
||||||
|
} from './domain/managers/booking.handler';
|
||||||
import { TransactionDataService } from 'src/modules/transaction/transaction/data/services/transaction-data.service';
|
import { TransactionDataService } from 'src/modules/transaction/transaction/data/services/transaction-data.service';
|
||||||
import { TransactionModel } from 'src/modules/transaction/transaction/data/models/transaction.model';
|
import { TransactionModel } from 'src/modules/transaction/transaction/data/models/transaction.model';
|
||||||
import { TransactionTaxModel } from 'src/modules/transaction/transaction/data/models/transaction-tax.model';
|
import { TransactionTaxModel } from 'src/modules/transaction/transaction/data/models/transaction-tax.model';
|
||||||
|
|
|
@ -6,6 +6,7 @@ import {
|
||||||
Param,
|
Param,
|
||||||
RelationParam,
|
RelationParam,
|
||||||
} from 'src/core/modules/domain/entities/base-filter.entity';
|
} from 'src/core/modules/domain/entities/base-filter.entity';
|
||||||
|
import { STATUS } from 'src/core/strings/constants/base.constants';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class CurrentSeasonPeriodManager extends BaseIndexManager<SeasonPeriodEntity> {
|
export class CurrentSeasonPeriodManager extends BaseIndexManager<SeasonPeriodEntity> {
|
||||||
|
@ -19,8 +20,8 @@ export class CurrentSeasonPeriodManager extends BaseIndexManager<SeasonPeriodEnt
|
||||||
|
|
||||||
async afterProcess(): Promise<void> {
|
async afterProcess(): Promise<void> {
|
||||||
Object.assign(this.result, {
|
Object.assign(this.result, {
|
||||||
data: this.result.data.sort((a, b) => a.priority - b.priority)
|
data: this.result.data.sort((a, b) => a.priority - b.priority),
|
||||||
})
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,6 +77,10 @@ export class CurrentSeasonPeriodManager extends BaseIndexManager<SeasonPeriodEnt
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
queryBuilder.andWhere(`${this.tableName}.status In (:...statuses)`, {
|
||||||
|
statuses: [STATUS.ACTIVE],
|
||||||
|
});
|
||||||
|
|
||||||
return queryBuilder;
|
return queryBuilder;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,10 +42,13 @@ export class SeasonPeriodReadOrchestrator extends BaseReadOrchestrator<SeasonPer
|
||||||
async currentPeriod(): Promise<SeasonPeriodEntity> {
|
async currentPeriod(): Promise<SeasonPeriodEntity> {
|
||||||
const params = new FilterSeasonPeriodDto();
|
const params = new FilterSeasonPeriodDto();
|
||||||
this.currentPeriodManager.setFilterParam(params);
|
this.currentPeriodManager.setFilterParam(params);
|
||||||
this.currentPeriodManager.setService(this.serviceData, TABLE_NAME.SEASON_PERIOD);
|
this.currentPeriodManager.setService(
|
||||||
|
this.serviceData,
|
||||||
|
TABLE_NAME.SEASON_PERIOD,
|
||||||
|
);
|
||||||
await this.currentPeriodManager.execute();
|
await this.currentPeriodManager.execute();
|
||||||
const data = this.currentPeriodManager.getResult();
|
const data = this.currentPeriodManager.getResult();
|
||||||
return data.data[0]
|
return data.data[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
async indexItem(params): Promise<PaginationResponse<ItemRateEntity>> {
|
async indexItem(params): Promise<PaginationResponse<ItemRateEntity>> {
|
||||||
|
|
Loading…
Reference in New Issue