@aldb2b/common 1.0.1035 → 1.0.1037

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.
@@ -5,10 +5,20 @@ const mongoose_1 = require("mongoose");
5
5
  const event_profile_status_enum_1 = require("../../../../../enums/event-profile-status.enum");
6
6
  const profile_item_type_enum_1 = require("../../../../../enums/profile-item-type.enum");
7
7
  const profile_item_custom_type_enum_1 = require("../../../../../enums/profile-item-custom-type.enum");
8
- const companies_1 = require("../../../companies");
9
8
  class CompanyProfileItem {
10
9
  }
11
10
  exports.CompanyProfileItem = CompanyProfileItem;
11
+ const CustomTypePossibleValueSchema = new mongoose_1.Schema({
12
+ identifier: {
13
+ type: Number,
14
+ required: true,
15
+ },
16
+ value: {
17
+ type: String,
18
+ trim: true,
19
+ required: true,
20
+ },
21
+ }, { _id: false });
12
22
  exports.CompanyProfileItemSchema = new mongoose_1.Schema({
13
23
  name: { type: String, trim: true, required: true },
14
24
  label: { type: String, trim: true },
@@ -39,7 +49,6 @@ exports.CompanyProfileItemSchema = new mongoose_1.Schema({
39
49
  profileItemType: {
40
50
  type: String,
41
51
  enum: profile_item_type_enum_1.ProfileItemType,
42
- required: true,
43
52
  default: profile_item_type_enum_1.ProfileItemType.MAIN,
44
53
  },
45
54
  customType: {
@@ -50,7 +59,7 @@ exports.CompanyProfileItemSchema = new mongoose_1.Schema({
50
59
  },
51
60
  },
52
61
  customTypePossibleValues: {
53
- type: [companies_1.CustomTypePossibleValue],
62
+ type: [CustomTypePossibleValueSchema],
54
63
  required: function () {
55
64
  return (this.profileItemType === profile_item_type_enum_1.ProfileItemType.CUSTOM &&
56
65
  [
@@ -1 +1 @@
1
- {"version":3,"file":"company-profile-item.entity.js","sourceRoot":"","sources":["../../../../../../src/entities/models/events/entities/eventProfile/company-profile-item.entity.ts"],"names":[],"mappings":";;;AAAA,uCAAkC;AAElC,8FAAoF;AACpF,wFAA4E;AAC5E,sGAAyF;AACzF,kDAA2D;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EAAE;QACxB,IAAI,EAAE,CAAC,mCAAuB,CAAC;QAC/B,QAAQ,EAAE;YACR,OAAO,CACH,IAAI,CAAC,eAAe,KAAK,wCAAe,CAAC,MAAM;gBAC/C;oBACE,qDAAqB,CAAC,UAAU;oBAChC,qDAAqB,CAAC,aAAa;iBACpC,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CACpC,CAAC;QACJ,CAAC;QACD,OAAO,EAAE,EAAE;KACZ;IACD,SAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,GAAG,EAAE;IAC5D,SAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,GAAG,EAAE;CAC7D,CAAC,CAAC"}
1
+ {"version":3,"file":"company-profile-item.entity.js","sourceRoot":"","sources":["../../../../../../src/entities/models/events/entities/eventProfile/company-profile-item.entity.ts"],"names":[],"mappings":";;;AAAA,uCAAkC;AAElC,8FAAoF;AACpF,wFAA4E;AAC5E,sGAAyF;AAKzF,MAAa,kBAAkB;CAa9B;AAbD,gDAaC;AAED,MAAM,6BAA6B,GAAG,IAAI,iBAAM,CAI5C;IACE,UAAU,EAAE;QACV,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACf;IACD,KAAK,EAAE;QACL,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACf;CACF,EACD,EAAE,GAAG,EAAE,KAAK,EAAE,CACjB,CAAA;AAEY,QAAA,wBAAwB,GAAG,IAAI,iBAAM,CAGhD;IACA,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE;IAClD,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE;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,OAAO,EAAE,EAAE;KACZ;IACD,SAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,GAAG,EAAE;IAC5D,SAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,GAAG,EAAE;CAC7D,CAAC,CAAC"}
@@ -1,6 +1,7 @@
1
1
  export declare enum ProfileItemCustomType {
2
2
  TEXT = "text",
3
3
  BOOLEAN = "boolean",
4
+ NUMBER = "number",
4
5
  CHECK_BOXS = "checkBox",
5
6
  RADIO_BUTTONS = "radioButton"
6
7
  }
@@ -5,6 +5,7 @@ var ProfileItemCustomType;
5
5
  (function (ProfileItemCustomType) {
6
6
  ProfileItemCustomType["TEXT"] = "text";
7
7
  ProfileItemCustomType["BOOLEAN"] = "boolean";
8
+ ProfileItemCustomType["NUMBER"] = "number";
8
9
  ProfileItemCustomType["CHECK_BOXS"] = "checkBox";
9
10
  ProfileItemCustomType["RADIO_BUTTONS"] = "radioButton";
10
11
  })(ProfileItemCustomType || (exports.ProfileItemCustomType = ProfileItemCustomType = {}));
@@ -1 +1 @@
1
- {"version":3,"file":"profile-item-custom-type.enum.js","sourceRoot":"","sources":["../../src/enums/profile-item-custom-type.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,qBAKX;AALD,WAAY,qBAAqB;IAC/B,sCAAa,CAAA;IACb,4CAAmB,CAAA;IACnB,gDAAuB,CAAA;IACvB,sDAA6B,CAAA;AAC/B,CAAC,EALW,qBAAqB,qCAArB,qBAAqB,QAKhC"}
1
+ {"version":3,"file":"profile-item-custom-type.enum.js","sourceRoot":"","sources":["../../src/enums/profile-item-custom-type.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,qBAMX;AAND,WAAY,qBAAqB;IAC/B,sCAAa,CAAA;IACb,4CAAmB,CAAA;IACnB,0CAAiB,CAAA;IACjB,gDAAuB,CAAA;IACvB,sDAA6B,CAAA;AAC/B,CAAC,EANW,qBAAqB,qCAArB,qBAAqB,QAMhC"}