sitero 0.0.17 → 0.0.19

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.
@@ -53,7 +53,10 @@ function createOrderCompleteAdminEmail(ctx) {
53
53
  transferAccountNumber: order.text1 ?? "",
54
54
  totalQuantity: String(
55
55
  order.items.reduce((sum, item) => sum + item.quantity, 0)
56
- )
56
+ ),
57
+ /// added
58
+ taxHtml: order.text2 ? extraHtml("\u7D71\u4E00\u7DE8\u865F", order.text2) : "",
59
+ noteHtml: order.note ? extraHtml("\u5099\u8A3B", order.note) : ""
57
60
  });
58
61
  return infrastructure.email.sendEmail({
59
62
  to: email,
@@ -67,48 +70,31 @@ function createOrderCompleteAdminEmail(ctx) {
67
70
  };
68
71
  }
69
72
  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>
73
+ <tr style="text-align: right">
74
+ <td style="border-bottom: 1px solid #ddd; padding: 2px 6px">
75
+ ${name}
76
+ </td>
77
+ <td style="border-bottom: 1px solid #ddd; padding: 2px 6px">${quantity}</td>
78
+ <td style="border-bottom: 1px solid #ddd; padding: 2px 6px">NT $${price}</td>
79
+ </tr>
80
+ `;
81
+ const extraHtml = (title, content) => `
82
+ <tr>
83
+ <th
84
+ style="
85
+ border: 1px solid #c5c5c5;
86
+ background-color: #f5f5f5;
87
+ font-weight: normal;
88
+ padding: 2px 6px;
89
+ width: 100px;
90
+ "
91
+ >
92
+ ${title}
93
+ </th>
94
+ <td style="border-bottom: 1px solid #ddd; padding: 2px 6px">
95
+ ${content}
96
+ </td>
97
+ </tr>
112
98
  `;
113
99
 
114
100
  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;EAoDlE"}
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;EAuDlE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sitero",
3
- "version": "0.0.17",
3
+ "version": "0.0.19",
4
4
  "author": "Yiming Liao",
5
5
  "license": "MIT",
6
6
  "type": "module",