Compare commits

..

No commits in common. "7ff0040f9e6c1d23496a857fb9ed428c412e2caf" and "b476c92b7016cfc46b5e53b83872c9619f0fd47d" have entirely different histories.

2 changed files with 8 additions and 18 deletions

View File

@ -1,5 +1,5 @@
import { Controller, Get, Query } from '@nestjs/common';
import { ApiTags } from '@nestjs/swagger';
import { ApiBearerAuth, ApiTags } from '@nestjs/swagger';
import { Public } from 'src/core/guards';
import { PaginationResponse } from 'src/core/response/domain/ok-response.interface';
import { TABLE_NAME } from 'src/core/strings/constants/table.constants';

View File

@ -145,25 +145,10 @@ export class BookingOrderController {
items,
} = data;
let timeGroup = null;
const usageItems = items.map((item) => {
const itemData = item.item;
const timeGroupData = itemData.time_group;
const {
id: groupId,
name,
start_time,
end_time,
max_usage_time,
} = timeGroupData;
timeGroup = {
id: groupId,
name,
start_time,
end_time,
max_usage_time,
};
const { id: groupId, name, start_time, end_time } = timeGroupData;
const {
id,
item_id,
@ -185,6 +170,12 @@ export class BookingOrderController {
total_net_price,
qty,
qty_remaining,
time_group: {
id: groupId,
name,
start_time,
end_time,
},
};
});
@ -203,7 +194,6 @@ export class BookingOrderController {
status,
id,
items: usageItems,
time_group: timeGroup,
};
}