Compare commits
7 Commits
b48a469720
...
e8baaa12d2
Author | SHA1 | Date |
---|---|---|
|
e8baaa12d2 | |
|
6ca74ad6f7 | |
|
955f00cc9d | |
|
61d8f56385 | |
|
2a42d85814 | |
|
bacdb1773b | |
|
33014394d1 |
|
@ -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"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -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,
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
import {
|
import { Injectable } from '@nestjs/common';
|
||||||
HttpStatus,
|
|
||||||
Injectable,
|
|
||||||
UnprocessableEntityException,
|
|
||||||
} from '@nestjs/common';
|
|
||||||
import {
|
import {
|
||||||
EventTopics,
|
EventTopics,
|
||||||
columnUniques,
|
columnUniques,
|
||||||
|
|
|
@ -6,7 +6,6 @@ import {
|
||||||
Patch,
|
Patch,
|
||||||
Post,
|
Post,
|
||||||
Put,
|
Put,
|
||||||
Get,
|
|
||||||
} from '@nestjs/common';
|
} from '@nestjs/common';
|
||||||
import { SeasonPeriodDataOrchestrator } from '../domain/usecases/season-period-data.orchestrator';
|
import { SeasonPeriodDataOrchestrator } from '../domain/usecases/season-period-data.orchestrator';
|
||||||
import { SeasonPeriodDto } from './dto/season-period.dto';
|
import { SeasonPeriodDto } from './dto/season-period.dto';
|
||||||
|
|
|
@ -10,7 +10,7 @@ import { TransactionModel } from '../../../data/models/transaction.model';
|
||||||
import { mappingRevertTransaction } from '../managers/helpers/mapping-transaction.helper';
|
import { mappingRevertTransaction } from '../managers/helpers/mapping-transaction.helper';
|
||||||
import { apm } from '../../../../../../core/apm';
|
import { apm } from '../../../../../../core/apm';
|
||||||
|
|
||||||
@EventsHandler(ChangeDocEvent)
|
// @EventsHandler(ChangeDocEvent)
|
||||||
export class PosTransactionHandler implements IEventHandler<ChangeDocEvent> {
|
export class PosTransactionHandler implements IEventHandler<ChangeDocEvent> {
|
||||||
constructor(
|
constructor(
|
||||||
private dataService: TransactionDataService,
|
private dataService: TransactionDataService,
|
||||||
|
|
Loading…
Reference in New Issue