@gls_spain/gps-common 32.5.0 → 33.0.1

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.
@@ -2,12 +2,8 @@
2
2
  <project version="4">
3
3
  <component name="ChangeListManager">
4
4
  <list default="true" id="c2833e40-3178-44f3-9bc5-203849985c7f" name="Default Changelist" comment="">
5
- <change afterPath="$PROJECT_DIR$/errors/NetworkCannotBeUpdatedError.js" afterDir="false" />
6
- <change afterPath="$PROJECT_DIR$/errors/ShopCannotBeUpdatedError.js" afterDir="false" />
7
- <change beforePath="$PROJECT_DIR$/errors/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/errors/index.js" afterDir="false" />
8
5
  <change beforePath="$PROJECT_DIR$/open-api-spec/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/open-api-spec/index.js" afterDir="false" />
9
- <change beforePath="$PROJECT_DIR$/schemas/definitions/networks.js" beforeDir="false" afterPath="$PROJECT_DIR$/schemas/definitions/networks.js" afterDir="false" />
10
- <change beforePath="$PROJECT_DIR$/schemas/definitions/shops.js" beforeDir="false" afterPath="$PROJECT_DIR$/schemas/definitions/shops.js" afterDir="false" />
6
+ <change beforePath="$PROJECT_DIR$/schemas/definitions/defaults.js" beforeDir="false" afterPath="$PROJECT_DIR$/schemas/definitions/defaults.js" afterDir="false" />
11
7
  </list>
12
8
  <option name="SHOW_DIALOG" value="false" />
13
9
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -39,6 +35,7 @@
39
35
  <option name="showLibraryContents" value="true" />
40
36
  </component>
41
37
  <component name="PropertiesComponent">
38
+ <property name="ASKED_ADD_EXTERNAL_FILES" value="true" />
42
39
  <property name="ASKED_SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
43
40
  <property name="NewWatcherDialog.advanced.open" value="true" />
44
41
  <property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
@@ -46,7 +43,7 @@
46
43
  <property name="TERMINAL_CUSTOM_COMMANDS_GOT_IT" value="true" />
47
44
  <property name="WebServerToolWindowFactoryState" value="false" />
48
45
  <property name="javascript.nodejs.core.library.configured.version" value="10.15.3" />
49
- <property name="last_opened_file_path" value="$PROJECT_DIR$/errors" />
46
+ <property name="last_opened_file_path" value="$PROJECT_DIR$" />
50
47
  <property name="node.js.detected.package.eslint" value="true" />
51
48
  <property name="node.js.detected.package.standard" value="true" />
52
49
  <property name="node.js.path.for.package.eslint" value="project" />
@@ -63,13 +60,6 @@
63
60
  <property name="ts.external.directory.path" value="$APPLICATION_HOME_DIR$/plugins/JavaScriptLanguage/jsLanguageServicesImpl/external" />
64
61
  </component>
65
62
  <component name="RecentsManager">
66
- <key name="CopyFile.RECENT_KEYS">
67
- <recent name="$PROJECT_DIR$/errors" />
68
- <recent name="$PROJECT_DIR$/schemas/definitions" />
69
- <recent name="$PROJECT_DIR$" />
70
- <recent name="$PROJECT_DIR$/schemas" />
71
- <recent name="$PROJECT_DIR$/lib/scripts" />
72
- </key>
73
63
  <key name="MoveFile.RECENT_KEYS">
74
64
  <recent name="$PROJECT_DIR$/open-api" />
75
65
  <recent name="$PROJECT_DIR$" />
@@ -77,6 +67,13 @@
77
67
  <recent name="$PROJECT_DIR$/open-api-spec" />
78
68
  <recent name="$PROJECT_DIR$/errors" />
79
69
  </key>
70
+ <key name="CopyFile.RECENT_KEYS">
71
+ <recent name="$PROJECT_DIR$/errors" />
72
+ <recent name="$PROJECT_DIR$/schemas/definitions" />
73
+ <recent name="$PROJECT_DIR$" />
74
+ <recent name="$PROJECT_DIR$/schemas" />
75
+ <recent name="$PROJECT_DIR$/lib/scripts" />
76
+ </key>
80
77
  </component>
81
78
  <component name="RunManager" selected="JavaScript Debug.documentation.html (1)">
82
79
  <configuration name="#errors" type="JavaScriptTestRunnerJest" temporary="true" nameIsGenerated="true">
@@ -569,7 +566,26 @@
569
566
  <workItem from="1591865082734" duration="29000" />
570
567
  <workItem from="1594828405112" duration="147000" />
571
568
  <workItem from="1594885748220" duration="6957000" />
572
- <workItem from="1594925133162" duration="587000" />
569
+ <workItem from="1594925133162" duration="691000" />
570
+ <workItem from="1594970859158" duration="231000" />
571
+ <workItem from="1594991230403" duration="1319000" />
572
+ <workItem from="1595066783978" duration="398000" />
573
+ <workItem from="1595086122575" duration="439000" />
574
+ <workItem from="1595147433019" duration="997000" />
575
+ <workItem from="1595166660006" duration="1020000" />
576
+ <workItem from="1595228568194" duration="1068000" />
577
+ <workItem from="1595315571333" duration="4250000" />
578
+ <workItem from="1595399515075" duration="8658000" />
579
+ <workItem from="1595415093002" duration="230000" />
580
+ <workItem from="1595499698311" duration="586000" />
581
+ <workItem from="1595514903787" duration="534000" />
582
+ <workItem from="1595518362300" duration="94000" />
583
+ <workItem from="1595519042896" duration="228000" />
584
+ <workItem from="1595531893690" duration="4660000" />
585
+ <workItem from="1595572792857" duration="2475000" />
586
+ <workItem from="1595668967544" duration="116000" />
587
+ <workItem from="1595832239784" duration="11480000" />
588
+ <workItem from="1595858491503" duration="3712000" />
573
589
  </task>
574
590
  <servers />
575
591
  </component>
@@ -608,21 +624,29 @@
608
624
  <option name="oldMeFiltersMigrated" value="true" />
609
625
  </component>
610
626
  <component name="WindowStateProjectService">
611
- <state width="2006" height="269" key="GridCell.Tab.0.bottom" timestamp="1594925626891">
627
+ <state x="762" y="341" key="#com.intellij.refactoring.safeDelete.UnsafeUsagesDialog" timestamp="1595577705727">
628
+ <screen x="0" y="23" width="2048" height="1129" />
629
+ </state>
630
+ <state x="762" y="341" key="#com.intellij.refactoring.safeDelete.UnsafeUsagesDialog/0.23.2048.1129@0.23.2048.1129" timestamp="1595577705727" />
631
+ <state width="2006" height="269" key="GridCell.Tab.0.bottom" timestamp="1595862472962">
632
+ <screen x="0" y="23" width="2048" height="1129" />
633
+ </state>
634
+ <state width="2006" height="269" key="GridCell.Tab.0.bottom/0.23.2048.1129@0.23.2048.1129" timestamp="1595862472962" />
635
+ <state width="2006" height="269" key="GridCell.Tab.0.center" timestamp="1595862472962">
612
636
  <screen x="0" y="23" width="2048" height="1129" />
613
637
  </state>
614
- <state width="2006" height="269" key="GridCell.Tab.0.bottom/0.23.2048.1129@0.23.2048.1129" timestamp="1594925626891" />
615
- <state width="2006" height="269" key="GridCell.Tab.0.center" timestamp="1594925626891">
638
+ <state width="2006" height="269" key="GridCell.Tab.0.center/0.23.2048.1129@0.23.2048.1129" timestamp="1595862472962" />
639
+ <state width="2006" height="269" key="GridCell.Tab.0.left" timestamp="1595862472962">
616
640
  <screen x="0" y="23" width="2048" height="1129" />
617
641
  </state>
618
- <state width="2006" height="269" key="GridCell.Tab.0.center/0.23.2048.1129@0.23.2048.1129" timestamp="1594925626891" />
619
- <state width="2006" height="269" key="GridCell.Tab.0.left" timestamp="1594925626890">
642
+ <state width="2006" height="269" key="GridCell.Tab.0.left/0.23.2048.1129@0.23.2048.1129" timestamp="1595862472962" />
643
+ <state width="2006" height="269" key="GridCell.Tab.0.right" timestamp="1595862472962">
620
644
  <screen x="0" y="23" width="2048" height="1129" />
621
645
  </state>
622
- <state width="2006" height="269" key="GridCell.Tab.0.left/0.23.2048.1129@0.23.2048.1129" timestamp="1594925626890" />
623
- <state width="2006" height="269" key="GridCell.Tab.0.right" timestamp="1594925626891">
646
+ <state width="2006" height="269" key="GridCell.Tab.0.right/0.23.2048.1129@0.23.2048.1129" timestamp="1595862472962" />
647
+ <state x="689" y="276" width="670" height="676" key="search.everywhere.popup" timestamp="1595579270021">
624
648
  <screen x="0" y="23" width="2048" height="1129" />
625
649
  </state>
626
- <state width="2006" height="269" key="GridCell.Tab.0.right/0.23.2048.1129@0.23.2048.1129" timestamp="1594925626891" />
650
+ <state x="689" y="276" width="670" height="676" key="search.everywhere.popup/0.23.2048.1129@0.23.2048.1129" timestamp="1595579270021" />
627
651
  </component>
628
652
  </project>
package/CHANGELOG.md CHANGED
@@ -1,3 +1,28 @@
1
+ ## [33.0.1](https://github.com/GLS-Spain/gps-common/compare/v33.0.0...v33.0.1) (2020-07-27)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * rework the defaults sales settings because the old structure did not work for some combinations ([7e36141](https://github.com/GLS-Spain/gps-common/commit/7e36141e227a6bb74be4886c9144916fc6d63d25))
7
+
8
+ # [33.0.0](https://github.com/GLS-Spain/gps-common/compare/v32.5.0...v33.0.0) (2020-07-27)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * add sale to expedition ([ed0b4ac](https://github.com/GLS-Spain/gps-common/commit/ed0b4ace008e2580c67f4f1d7c700965bf342d24))
14
+ * remove required from sale.sender.fiscal ([9b34e55](https://github.com/GLS-Spain/gps-common/commit/9b34e55509f1ff393ccb52cebee60fd0c1e65bfd))
15
+
16
+
17
+ ### Features
18
+
19
+ * add sales ([d26b235](https://github.com/GLS-Spain/gps-common/commit/d26b235170972e5b4992d3d5add0b18b046d59eb))
20
+
21
+
22
+ ### BREAKING CHANGES
23
+
24
+ * defaults and networks have new salesSettings fields, init has been removed
25
+
1
26
  # [32.5.0](https://github.com/GLS-Spain/gps-common/compare/v32.4.0...v32.5.0) (2020-07-16)
2
27
 
3
28
 
@@ -0,0 +1,11 @@
1
+ const { DatabaseError } = require('@gls_spain/mongodb');
2
+
3
+ class InconsistentSalesSettingsError extends DatabaseError {
4
+ constructor(message = 'Sale settings are inconsistent.') {
5
+ // noinspection JSCheckFunctionSignatures
6
+ super(message);
7
+ this.name = 'InconsistentSalesSettingsError';
8
+ }
9
+ }
10
+
11
+ module.exports = InconsistentSalesSettingsError;
@@ -0,0 +1,11 @@
1
+ const { DatabaseError } = require('@gls_spain/mongodb');
2
+
3
+ class InvalidSaleDestinationError extends DatabaseError {
4
+ constructor(message = 'Sale destination is invalid.') {
5
+ // noinspection JSCheckFunctionSignatures
6
+ super(message);
7
+ this.name = 'InvalidSaleDestinationError';
8
+ }
9
+ }
10
+
11
+ module.exports = InvalidSaleDestinationError;
@@ -0,0 +1,11 @@
1
+ const { DatabaseError } = require('@gls_spain/mongodb');
2
+
3
+ class SaleAlreadyExistsError extends DatabaseError {
4
+ constructor(message = 'Sale already exists.') {
5
+ // noinspection JSCheckFunctionSignatures
6
+ super(message);
7
+ this.name = 'SaleAlreadyExistsError';
8
+ }
9
+ }
10
+
11
+ module.exports = SaleAlreadyExistsError;
package/errors/index.js CHANGED
@@ -27,6 +27,9 @@ const RepresentativeCannotBeDeletedError = require('./RepresentativeCannotBeDele
27
27
  const ZoneDoesNotExistError = require('./ZoneDoesNotExistError');
28
28
  const ZoneAlreadyExistsError = require('./ZoneAlreadyExistsError');
29
29
  const ZoneCannotBeDeletedError = require('./ZoneCannotBeDeletedError');
30
+ const SaleAlreadyExistsError = require('./SaleAlreadyExistsError');
31
+ const InconsistentSalesSettingsError = require('./InconsistentSalesSettingsError');
32
+ const InvalidSaleDestinationError = require('./InvalidSaleDestinationError');
30
33
 
31
34
  const errorsNames = {
32
35
  DatabaseNotEmptyError: 'DatabaseNotEmptyError',
@@ -58,6 +61,9 @@ const errorsNames = {
58
61
  ZoneDoesNotExistError: 'ZoneDoesNotExistError',
59
62
  ZoneAlreadyExistsError: 'ZoneAlreadyExistsError',
60
63
  ZoneCannotBeDeletedError: 'ZoneCannotBeDeletedError',
64
+ SaleAlreadyExistsError: 'SaleAlreadyExistsError',
65
+ InconsistentSalesSettingsError: 'InconsistentSalesSettingsError',
66
+ InvalidSaleDestinationError: 'InvalidSaleDestinationError',
61
67
  };
62
68
 
63
69
  module.exports = {
@@ -90,5 +96,8 @@ module.exports = {
90
96
  ZoneDoesNotExistError,
91
97
  ZoneAlreadyExistsError,
92
98
  ZoneCannotBeDeletedError,
99
+ SaleAlreadyExistsError,
100
+ InconsistentSalesSettingsError,
101
+ InvalidSaleDestinationError,
93
102
  errorsNames,
94
103
  };