sitero 0.0.14 → 0.0.16

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,12 +32,7 @@ function createOrderCompleteAdminEmail(ctx) {
32
32
  url,
33
33
  orderNumber: order.orderNumber ?? "",
34
34
  productItems: order.items.reduce(
35
- (prev, { productName, quantity, unitPriceAmount, subtotalAmount }) => prev + productItemHtml(
36
- productName ?? "",
37
- quantity,
38
- unitPriceAmount,
39
- subtotalAmount
40
- ),
35
+ (prev, { productName, quantity, unitPriceAmount }) => prev + productItemHtml(productName ?? "", quantity, unitPriceAmount),
41
36
  ""
42
37
  ),
43
38
  recipientName: order.recipientName ?? "",
@@ -71,12 +66,49 @@ function createOrderCompleteAdminEmail(ctx) {
71
66
  send
72
67
  };
73
68
  }
74
- const productItemHtml = (name, quantity, price, subtotalAmount) => `
75
- <tr>
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>
80
- </tr>`;
69
+ const productItemHtml = (name, quantity, price) => `
70
+ <tr>
71
+ <td
72
+ style="
73
+ border: 1px solid #ddd;
74
+ padding: 10px 8px;
75
+ width: 50%;
76
+ line-height: 20px;
77
+ text-align: left;
78
+ vertical-align: top;
79
+ "
80
+ >
81
+ ${name}
82
+ </td>
83
+ <td
84
+ style="
85
+ border: 1px solid #ddd;
86
+ padding: 10px 8px;
87
+ width: 15%;
88
+ line-height: 20px;
89
+ text-align: right;
90
+ vertical-align: top;
91
+ white-space: nowrap;
92
+ word-break: keep-all;
93
+ "
94
+ >
95
+ ${quantity}
96
+ </td>
97
+ <td
98
+ style="
99
+ border: 1px solid #ddd;
100
+ padding: 10px 8px;
101
+ width: 35%;
102
+ line-height: 20px;
103
+ text-align: right;
104
+ vertical-align: top;
105
+ white-space: nowrap;
106
+ word-break: keep-all;
107
+ "
108
+ >
109
+ NT $${price}
110
+ </td>
111
+ </tr>
112
+ `;
81
113
 
82
114
  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;EA0DlE"}
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;EAoDlE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sitero",
3
- "version": "0.0.14",
3
+ "version": "0.0.16",
4
4
  "author": "Yiming Liao",
5
5
  "license": "MIT",
6
6
  "type": "module",