Compare commits
8 Commits
1.6.23-alp
...
developmen
Author | SHA1 | Date |
---|---|---|
|
b96d24de1a | |
|
5d3f9d7bff | |
|
831593e743 | |
|
162bd0918f | |
|
13b5838393 | |
|
63bb55b04b | |
|
9d1c240b6b | |
|
83f3377465 |
|
@ -48,7 +48,7 @@ export class OtpCheckerGuard implements CanActivate {
|
|||
});
|
||||
}
|
||||
|
||||
console.log({ dataIdentity, otpCode, otpData });
|
||||
// console.log({ dataIdentity, otpCode, otpData });
|
||||
if (otpData && otpData?.verified_at) return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ export class BookingItemManager extends IndexItemManager {
|
|||
const hasRates = (this.filterParam.season_period_ids?.length ?? 0) > 0;
|
||||
const items = data.map((item) => {
|
||||
const currentRate = item.item_rates.find((rate) =>
|
||||
this.filterParam.season_period_ids.includes(rate.season_period_id),
|
||||
this.filterParam.season_period_ids?.includes(rate.season_period_id),
|
||||
);
|
||||
const { item_rates, ...rest } = item;
|
||||
const rate = currentRate?.['price'] ?? rest.base_price;
|
||||
|
@ -54,4 +54,14 @@ export class BookingItemManager extends IndexItemManager {
|
|||
});
|
||||
return { total, data: items };
|
||||
}
|
||||
|
||||
setQueryFilter(
|
||||
queryBuilder: SelectQueryBuilder<ItemEntity>,
|
||||
): SelectQueryBuilder<ItemEntity> {
|
||||
const query = super.setQueryFilter(queryBuilder);
|
||||
|
||||
query.andWhere(`${this.tableName}.status = 'active'`);
|
||||
|
||||
return query;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@ export class ItemController {
|
|||
): Promise<PaginationResponse<ItemEntity>> {
|
||||
params.limit = 1000;
|
||||
params.show_to_booking = true;
|
||||
params.all_item = true;
|
||||
this.indexManager.setFilterParam(params);
|
||||
this.indexManager.setService(this.serviceData, TABLE_NAME.ITEM);
|
||||
await this.indexManager.execute();
|
||||
|
|
|
@ -31,6 +31,10 @@ export class DetailRefundManager extends BaseDetailManager<RefundEntity> {
|
|||
'items.bundling_items',
|
||||
'items.refunds item_refunds',
|
||||
'item_refunds.refund item_refunds_refund',
|
||||
|
||||
'transaction.items transaction_items',
|
||||
'transaction_items.item transaction_items_item',
|
||||
'transaction_items_item.time_group transaction_items_item_time_group',
|
||||
],
|
||||
|
||||
// relation yang hanya ingin dihitung (akan return number)
|
||||
|
@ -65,6 +69,10 @@ export class DetailRefundManager extends BaseDetailManager<RefundEntity> {
|
|||
'item_refunds',
|
||||
'item_refunds_refund.id',
|
||||
'item_refunds_refund.status',
|
||||
|
||||
'transaction_items',
|
||||
'transaction_items_item',
|
||||
'transaction_items_item_time_group',
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -31,6 +31,9 @@ export class DetailTransactionManager extends BaseDetailManager<TransactionEntit
|
|||
'items.refunds item_refunds',
|
||||
'item_refunds.refund item_refunds_refund',
|
||||
'refunds',
|
||||
|
||||
'items.item items_item',
|
||||
'items_item.time_group items_item_time_group',
|
||||
],
|
||||
|
||||
// relation yang hanya ingin dihitung (akan return number)
|
||||
|
@ -92,6 +95,8 @@ export class DetailTransactionManager extends BaseDetailManager<TransactionEntit
|
|||
'item_refunds_refund.status',
|
||||
|
||||
'refunds',
|
||||
'items_item',
|
||||
'items_item_time_group',
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -43,6 +43,8 @@ export function mappingTransaction(data, refundId?: string) {
|
|||
if (refundId)
|
||||
refund = itemData.refunds?.find((item) => item.refund.id == refundId);
|
||||
|
||||
const timeGroup = itemData?.item?.time_group;
|
||||
|
||||
return {
|
||||
item: {
|
||||
id: itemData.item_id,
|
||||
|
@ -57,6 +59,7 @@ export function mappingTransaction(data, refundId?: string) {
|
|||
},
|
||||
breakdown_bundling: itemData.breakdown_bundling,
|
||||
bundling_items: itemData.bundling_items,
|
||||
time_group: timeGroup,
|
||||
},
|
||||
id: itemData.id,
|
||||
refund: refund,
|
||||
|
|
Loading…
Reference in New Issue