rez_core 5.0.60 → 5.0.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rez_core",
3
- "version": "5.0.60",
3
+ "version": "5.0.62",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -977,12 +977,9 @@ export class FilterService {
977
977
 
978
978
  const dayBefore = (() => {
979
979
  const d = new Date();
980
- d.setDate(d.getDate() - (numVal));
981
-
982
- // Format as YYYY-MM-DD in IST
983
- return d.toLocaleDateString('en-CA', { timeZone: 'Asia/Kolkata' });
980
+ d.setDate(d.getDate() - (numVal + 1));
981
+ return d.toISOString().split('T')[0];
984
982
  })();
985
-
986
983
 
987
984
  return {
988
985
  query: `${dateColumn} < :${key}`,
@@ -158,7 +158,7 @@ export class PopulateWorkflowService extends EntityServiceImpl {
158
158
  if (!workflowLevelMappingRepo) continue;
159
159
 
160
160
  await workflowLevelMappingRepo.create({
161
- workflow_id: newWf.id,
161
+ workflow_id: Number(newWf.id),
162
162
  mapped_level_id: organization_id.toString(),
163
163
  mapped_level_type: 'ORG',
164
164
  });
@@ -1,7 +1,6 @@
1
- import { get } from 'http';
2
1
  import { BadRequestException, Inject, Injectable } from '@nestjs/common';
3
2
  import { EntityServiceImpl } from 'src/module/meta/service/entity-service-impl.service';
4
- import { DataSource, In } from 'typeorm';
3
+ import { DataSource } from 'typeorm';
5
4
  import { WorkflowRepository } from '../repository/workflow.repository';
6
5
  import { BaseEntity } from 'src/module/meta/entity/base-entity.entity';
7
6
  import { UserData } from 'src/module/user/entity/user.entity';
@@ -39,11 +38,12 @@ export class WorkflowService extends EntityServiceImpl {
39
38
  }
40
39
 
41
40
  async getWorkflowById(id: number) {
42
- const result = await this.dataSource.query(
43
- `SELECT * FROM frm_wf_master WHERE id = $1`,
44
- [id],
45
- );
46
- return result[0] || null;
41
+ const workflowMasterRepo = this.reflectionHelper.getRepoService('Workflow');
42
+ return await workflowMasterRepo.findOne({
43
+ where: {
44
+ id: id
45
+ }
46
+ });
47
47
  }
48
48
 
49
49
  //update entity