sitero 0.0.13 → 0.0.14

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.
@@ -32,7 +32,12 @@ function createOrderCompleteAdminEmail(ctx) {
32
32
  url,
33
33
  orderNumber: order.orderNumber ?? "",
34
34
  productItems: order.items.reduce(
35
- (prev, { productName, quantity, unitPriceAmount }) => prev + productItemHtml(productName ?? "", quantity, unitPriceAmount),
35
+ (prev, { productName, quantity, unitPriceAmount, subtotalAmount }) => prev + productItemHtml(
36
+ productName ?? "",
37
+ quantity,
38
+ unitPriceAmount,
39
+ subtotalAmount
40
+ ),
36
41
  ""
37
42
  ),
38
43
  recipientName: order.recipientName ?? "",
@@ -47,8 +52,13 @@ function createOrderCompleteAdminEmail(ctx) {
47
52
  subtotalAmount: String(order.subtotalAmount ?? 0),
48
53
  discountAmount: String(order.discountAmount ?? 0),
49
54
  shippingFeeAmount: String(order.shippingFeeAmount ?? 0),
50
- totalAmount: String(order.totalAmount ?? 0)
55
+ totalAmount: String(order.totalAmount ?? 0),
51
56
  // description: getDescription(order.paymentMethod ?? "BANK_TRANSFER", url),
57
+ paymentMerchantReference: order.paymentMerchantReference ?? "",
58
+ transferAccountNumber: order.text1 ?? "",
59
+ totalQuantity: String(
60
+ order.items.reduce((sum, item) => sum + item.quantity, 0)
61
+ )
52
62
  });
53
63
  return infrastructure.email.sendEmail({
54
64
  to: email,
@@ -61,25 +71,12 @@ function createOrderCompleteAdminEmail(ctx) {
61
71
  send
62
72
  };
63
73
  }
64
- const productItemHtml = (name, quantity, price) => `
74
+ const productItemHtml = (name, quantity, price, subtotalAmount) => `
65
75
  <tr>
66
- <td
67
- style="padding: 8px 0; font-size: 14px; color: #3e3a39"
68
- >
69
- ${name}
70
- </td>
71
- <td
72
- style="padding: 8px 0; font-size: 14px; color: #595757"
73
- align="center"
74
- >
75
- ${quantity}
76
- </td>
77
- <td
78
- style="padding: 8px 0; font-size: 14px; color: #595757"
79
- align="right"
80
- >
81
- NT $${price}
82
- </td>
76
+ <td style="width: 40%">${name}</td>
77
+ <td style="width: 20%">${quantity}</td>
78
+ <td style="width: 20%">${price}</td>
79
+ <td style="width: 20%">${subtotalAmount}</td>
83
80
  </tr>`;
84
81
 
85
82
  export { createOrderCompleteAdminEmail };
@@ -1 +1 @@
1
- {"version":3,"file":"create-order-complete-admin-email.d.ts","sourceRoot":"","sources":["../../../../../../../../src/web/server/applications/emails/order/create-order-complete-admin-email.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AASrD,UAAU,UAAU;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,SAAS,CAAC;CAClB;AAID,wBAAgB,6BAA6B,CAAC,GAAG,EAAE,YAAY;2BAUnD,MAAM,gBACA,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;8CAaiB,UAAU;EA+ClE"}
1
+ {"version":3,"file":"create-order-complete-admin-email.d.ts","sourceRoot":"","sources":["../../../../../../../../src/web/server/applications/emails/order/create-order-complete-admin-email.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AASrD,UAAU,UAAU;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,SAAS,CAAC;CAClB;AAID,wBAAgB,6BAA6B,CAAC,GAAG,EAAE,YAAY;2BAUnD,MAAM,gBACA,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;8CAaiB,UAAU;EA0DlE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sitero",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "author": "Yiming Liao",
5
5
  "license": "MIT",
6
6
  "type": "module",