fix(format) perbaikan formatting
parent
bc25b9d020
commit
0df0f30de5
|
@ -34,28 +34,16 @@ export class ConstantController {
|
|||
|
||||
@Get('transaction-user-type')
|
||||
async userType(): Promise<any> {
|
||||
return [
|
||||
'group',
|
||||
'vip'
|
||||
];
|
||||
return ['group', 'vip'];
|
||||
}
|
||||
|
||||
@Get('transaction-payment-type')
|
||||
async transactionPaymentType(): Promise<any> {
|
||||
return [
|
||||
'midtrans',
|
||||
'bank transfer',
|
||||
'qris',
|
||||
'counter',
|
||||
];
|
||||
return ['midtrans', 'bank transfer', 'qris', 'counter'];
|
||||
}
|
||||
|
||||
@Get('transaction-type')
|
||||
async transactionType(): Promise<any> {
|
||||
return [
|
||||
'counter',
|
||||
'admin',
|
||||
'online'
|
||||
]
|
||||
return ['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 { 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 { 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 { TransactionModel } from 'src/modules/transaction/transaction/data/models/transaction.model';
|
||||
import { TransactionTaxModel } from 'src/modules/transaction/transaction/data/models/transaction-tax.model';
|
||||
|
|
|
@ -6,6 +6,7 @@ import {
|
|||
Param,
|
||||
RelationParam,
|
||||
} from 'src/core/modules/domain/entities/base-filter.entity';
|
||||
import { STATUS } from 'src/core/strings/constants/base.constants';
|
||||
|
||||
@Injectable()
|
||||
export class CurrentSeasonPeriodManager extends BaseIndexManager<SeasonPeriodEntity> {
|
||||
|
@ -19,8 +20,8 @@ export class CurrentSeasonPeriodManager extends BaseIndexManager<SeasonPeriodEnt
|
|||
|
||||
async afterProcess(): Promise<void> {
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -76,6 +77,10 @@ export class CurrentSeasonPeriodManager extends BaseIndexManager<SeasonPeriodEnt
|
|||
},
|
||||
);
|
||||
|
||||
queryBuilder.andWhere(`${this.tableName}.status In (:...statuses)`, {
|
||||
statuses: [STATUS.ACTIVE],
|
||||
});
|
||||
|
||||
return queryBuilder;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,10 +42,13 @@ export class SeasonPeriodReadOrchestrator extends BaseReadOrchestrator<SeasonPer
|
|||
async currentPeriod(): Promise<SeasonPeriodEntity> {
|
||||
const params = new FilterSeasonPeriodDto();
|
||||
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();
|
||||
const data = this.currentPeriodManager.getResult();
|
||||
return data.data[0]
|
||||
return data.data[0];
|
||||
}
|
||||
|
||||
async indexItem(params): Promise<PaginationResponse<ItemRateEntity>> {
|
||||
|
|
Loading…
Reference in New Issue