@infrab4a/connect 0.9.12 → 0.9.13
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/bundles/infrab4a-connect.umd.js +10 -3
- package/bundles/infrab4a-connect.umd.js.map +1 -1
- package/esm2015/lib/infra/firebase/firestore/repositories/shopping/coupon-firestore.repository.js +12 -5
- package/fesm2015/infrab4a-connect.js +10 -3
- package/fesm2015/infrab4a-connect.js.map +1 -1
- package/package.json +1 -1
|
@@ -1879,13 +1879,20 @@
|
|
|
1879
1879
|
return _this;
|
|
1880
1880
|
}
|
|
1881
1881
|
CouponFirestoreRepository.prototype.buildModelInstance = function () {
|
|
1882
|
+
var _a = _super.prototype.buildModelInstance.call(this), fromFirestore = _a.fromFirestore, toFirestore = _a.toFirestore;
|
|
1882
1883
|
return {
|
|
1883
1884
|
toFirestore: function (data) {
|
|
1884
|
-
var plain = data
|
|
1885
|
-
|
|
1885
|
+
var plain = toFirestore(data);
|
|
1886
|
+
if (!!data.expiresIn)
|
|
1887
|
+
plain.expiresIn = data.expiresIn.getTime();
|
|
1886
1888
|
return plain;
|
|
1887
1889
|
},
|
|
1888
|
-
fromFirestore: function (snap) {
|
|
1890
|
+
fromFirestore: function (snap) {
|
|
1891
|
+
var instance = fromFirestore(snap);
|
|
1892
|
+
if (!lodash.isNil(instance.expiresIn))
|
|
1893
|
+
instance.expiresIn = new Date(snap.data().expiresIn);
|
|
1894
|
+
return instance;
|
|
1895
|
+
},
|
|
1889
1896
|
};
|
|
1890
1897
|
};
|
|
1891
1898
|
return CouponFirestoreRepository;
|