@chevre/domain 21.19.0-alpha.1 → 21.19.0-alpha.2
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/lib/chevre/repo/offer.js +4 -4
- package/package.json +1 -1
package/lib/chevre/repo/offer.js
CHANGED
|
@@ -781,17 +781,17 @@ class MongoRepository {
|
|
|
781
781
|
// let savedUnitPriceOffer: factory.unitPriceOffer.IUnitPriceOffer;
|
|
782
782
|
if (typeof params.id !== 'string' || params.id.length === 0) {
|
|
783
783
|
const uniqid = yield Promise.resolve().then(() => require('uniqid'));
|
|
784
|
-
const
|
|
785
|
-
aggregateOfferId =
|
|
784
|
+
const newId = uniqid();
|
|
785
|
+
aggregateOfferId = newId;
|
|
786
786
|
// サブオファー最適化(2023-12-22~)
|
|
787
787
|
// savedUnitPriceOffer = { ...paramsWithoutUnset, id };
|
|
788
|
-
const { project } = paramsWithoutUnset, savedUnitPriceOffer = __rest(paramsWithoutUnset, ["project"]);
|
|
788
|
+
const { id, project } = paramsWithoutUnset, savedUnitPriceOffer = __rest(paramsWithoutUnset, ["id", "project"]);
|
|
789
789
|
const aggregateOffer = {
|
|
790
790
|
typeOf: factory.offerType.AggregateOffer,
|
|
791
791
|
project: params.project,
|
|
792
792
|
offers: [savedUnitPriceOffer]
|
|
793
793
|
};
|
|
794
|
-
doc = yield this.aggregateOfferModel.create(Object.assign(Object.assign({}, aggregateOffer), { _id:
|
|
794
|
+
doc = yield this.aggregateOfferModel.create(Object.assign(Object.assign({}, aggregateOffer), { _id: newId }));
|
|
795
795
|
}
|
|
796
796
|
else {
|
|
797
797
|
aggregateOfferId = params.id;
|
package/package.json
CHANGED