Compare commits

...

3 Commits

Author SHA1 Message Date
shancheas 61d8f56385 Merge branch 'development' of ssh://git.eigen.co.id:2222/eigen/pos-be into development
continuous-integration/drone/tag Build was killed Details
2024-08-06 16:04:13 +07:00
shancheas 2a42d85814 chore: add vscode debug configuration 2024-08-06 16:03:55 +07:00
shancheas bacdb1773b fix: item rates not generated when create period season 2024-08-06 16:03:42 +07:00
3 changed files with 29 additions and 14 deletions

20
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,20 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Debug Nest Framework",
"runtimeExecutable": "npm",
"runtimeArgs": ["run", "start:debug", "--", "--inspect-brk"],
"autoAttachChildProcesses": true,
"restart": true,
"sourceMaps": true,
"stopOnEntry": false,
"console": "integratedTerminal"
}
]
}

View File

@ -28,19 +28,18 @@ export class SeasonPeriodHolidayHandler
holidayDate.creator_name = event.data.data.creator_name; holidayDate.creator_name = event.data.data.creator_name;
holidayDate.updated_at = event.data.data.updated_at; holidayDate.updated_at = event.data.data.updated_at;
holidayDate.season_type = event.data.data.season_type; holidayDate.season_type = event.data.data.season_type;
holidayDate.item_rates = event.data.data.item_rates; holidayDate.item_rates = event.data.data.item_rates.map((item) => {
delete item['id'];
return item;
});
holidayDate.priority = 1; holidayDate.priority = 1;
holidayDates.push(holidayDate); await this.dataService.createBatch(queryRunner, SeasonPeriodModel, [
holidayDate,
]);
} }
// create batch
await this.dataService.createBatch(
queryRunner,
SeasonPeriodModel,
holidayDates,
);
// delete data // delete data
await this.dataService.deleteById( await this.dataService.deleteById(
queryRunner, queryRunner,

View File

@ -1,8 +1,4 @@
import { import { Injectable } from '@nestjs/common';
HttpStatus,
Injectable,
UnprocessableEntityException,
} from '@nestjs/common';
import { import {
EventTopics, EventTopics,
columnUniques, columnUniques,