@social-mail/social-mail-web-server 1.4.908 → 1.4.910

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": "@social-mail/social-mail-web-server",
3
- "version": "1.4.908",
3
+ "version": "1.4.910",
4
4
  "description": "## Phase 1",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -34,6 +34,9 @@ export default class Store {
34
34
  @Column({ dataType: "Char", length: 200})
35
35
  public name: string;
36
36
 
37
+ @Column({ dataType: "Char", length: 5, default: () => "USD"})
38
+ public currency: string;
39
+
37
40
  @Column({ dataType: "BigInt", default: () => 1})
38
41
  @RelateTo(Contact, {
39
42
  property: (x) => x.seller,
@@ -17,8 +17,11 @@ export default class StoreItemPriceEvents extends AuthenticatedEvents<StoreItemP
17
17
  const host = page.request.host;
18
18
 
19
19
  const db = ServiceProvider.resolve(this, SocialMailContext);
20
- const q = db.storeItemPrices.where({ host }, (p) => (x) => x.active === true
20
+ const now = DateTime.now;
21
+ const q = db.storeItemPrices.where({ host, now }, (p) => (x) => x.active === true
21
22
  && x.storeItem.active === true
23
+ && x.startDate <= p.now
24
+ && x.endDate > p.now
22
25
  && x.storeItem.store.storeWebsites.some((w) => w.website.hosts.some((h) => h.host === p.host)));
23
26
  return q;
24
27
  }
@@ -198,6 +198,10 @@ export default class SnapshotService {
198
198
 
199
199
  dest.children = [];
200
200
 
201
+ if (!source.children) {
202
+ return;
203
+ }
204
+
201
205
  for (const srcChild of source.children) {
202
206
 
203
207
  if(!copyMedia) {