@pisell/private-materials 6.12.346 → 6.12.348

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.
@@ -34,14 +34,8 @@ const CalenDateWeek = (props) => {
34
34
  * @Date: 2024-02-07 15:13
35
35
  */
36
36
  const initCurrentWeekData = (dateText) => {
37
- let startOfWeek = dayjs(dateText).startOf("week");
38
- if (startOfWeek.day() !== 0) startOfWeek.subtract(startOfWeek.day(), "days");
39
- let weekDates = [];
40
- for (let i = 0; i < 7; i++) {
41
- let date = startOfWeek.clone().add(i, "days");
42
- weekDates.push(date.format("YYYY-MM-DD"));
43
- }
44
- return weekDates;
37
+ const startOfWeek = dayjs(dateText).day(0);
38
+ return Array.from({ length: 7 }, (_, index) => startOfWeek.add(index, "day").format("YYYY-MM-DD"));
45
39
  };
46
40
  /**
47
41
  * @title: 构造初始化周数据
@@ -89,7 +83,8 @@ const CalenDateWeek = (props) => {
89
83
  const minimumViewDate = minViewDate || minSelectableDate;
90
84
  const minDate = minimumViewDate ? dayjs(minimumViewDate).startOf("day") : null;
91
85
  const nextDate = dayjs(weekAnchorDate).add(direction * 7, "day");
92
- if (direction > 0 && maxViewDate && nextDate.startOf("week").isAfter(dayjs(maxViewDate), "day")) return null;
86
+ const nextWeekStart = initCurrentWeekData(nextDate.format("YYYY-MM-DD"))[0];
87
+ if (direction > 0 && maxViewDate && nextWeekStart && nextWeekStart > maxViewDate) return null;
93
88
  const nextAnchorDate = direction < 0 && minDate && nextDate.isBefore(minDate, "day") ? minDate.format("YYYY-MM-DD") : nextDate.format("YYYY-MM-DD");
94
89
  const nextWeekList = initCurrentWeekData(nextAnchorDate);
95
90
  if (nextWeekList[0] === weekList[0]) return null;
@@ -31,6 +31,7 @@ var locales_default = {
31
31
  "pisell2.scan.order.products.empty.tip": "Please select products",
32
32
  "pisell2.scan.order.check.cart.empty.tip": "Please go back to add products",
33
33
  "pisell2.scan.order.submit.disabled.default": "Order submission is currently disabled.",
34
+ "pisell2.scan.order.submit.failed": "Failed to submit order",
34
35
  "pisell2.scan.order.multiple.orders.tip": "There are multiple active orders for this table. Please contact staff for add-on orders.",
35
36
  "pisell2.scan.order.multiple.orders.confirm": "I Got It",
36
37
  "pisell2.scan.order.settled.cannot.add.tip": "This order has already been settled and you cannot add more items. Please scan again to create a new order or contact staff.",
@@ -95,6 +96,7 @@ var locales_default = {
95
96
  "pisell2.scan.order.products.empty.tip": "请选择商品",
96
97
  "pisell2.scan.order.check.cart.empty.tip": "请返回添加商品",
97
98
  "pisell2.scan.order.submit.disabled.default": "当前暂不可下单",
99
+ "pisell2.scan.order.submit.failed": "订单提交失败",
98
100
  "pisell2.scan.order.multiple.orders.tip": "当前桌台存在多个进行中的订单,请联系店员处理加餐。",
99
101
  "pisell2.scan.order.multiple.orders.confirm": "我知道了",
100
102
  "pisell2.scan.order.settled.cannot.add.tip": "当前订单已结账,无法继续加餐。请重新扫码创建新订单或联系店员。",
@@ -159,6 +161,7 @@ var locales_default = {
159
161
  "pisell2.scan.order.products.empty.tip": "請選擇商品",
160
162
  "pisell2.scan.order.check.cart.empty.tip": "請返回添加商品",
161
163
  "pisell2.scan.order.submit.disabled.default": "當前暫不可下單",
164
+ "pisell2.scan.order.submit.failed": "訂單提交失敗",
162
165
  "pisell2.scan.order.multiple.orders.tip": "當前桌台存在多個進行中的訂單,請聯繫店員處理加餐。",
163
166
  "pisell2.scan.order.multiple.orders.confirm": "我知道了",
164
167
  "pisell2.scan.order.settled.cannot.add.tip": "當前訂單已結賬,無法繼續加餐。請重新掃碼創建新訂單或聯繫店員。",
@@ -223,6 +226,7 @@ var locales_default = {
223
226
  "pisell2.scan.order.products.empty.tip": "商品を選択してください",
224
227
  "pisell2.scan.order.check.cart.empty.tip": "商品を追加するには、前の画面に戻ってください",
225
228
  "pisell2.scan.order.submit.disabled.default": "現在、注文を送信できません。",
229
+ "pisell2.scan.order.submit.failed": "注文の送信に失敗しました",
226
230
  "pisell2.scan.order.multiple.orders.tip": "現在のテーブルには進行中の注文が複数あります。追加注文についてはスタッフにお問い合わせください。",
227
231
  "pisell2.scan.order.multiple.orders.confirm": "了解しました",
228
232
  "pisell2.scan.order.settled.cannot.add.tip": "現在の注文はすでに会計済みのため、追加注文できません。再度QRコードをスキャンして新しい注文を作成するか、スタッフにお問い合わせください。",
@@ -287,6 +291,7 @@ var locales_default = {
287
291
  "pisell2.scan.order.products.empty.tip": "Selecione produtos",
288
292
  "pisell2.scan.order.check.cart.empty.tip": "Volte para adicionar produtos",
289
293
  "pisell2.scan.order.submit.disabled.default": "No momento, não é possível enviar pedidos.",
294
+ "pisell2.scan.order.submit.failed": "Falha ao enviar o pedido",
290
295
  "pisell2.scan.order.multiple.orders.tip": "Há vários pedidos ativos nesta mesa. Entre em contato com a equipe para adicionar itens.",
291
296
  "pisell2.scan.order.multiple.orders.confirm": "Entendi",
292
297
  "pisell2.scan.order.settled.cannot.add.tip": "Este pedido já foi finalizado e não é possível adicionar mais itens. Escaneie novamente para criar um novo pedido ou entre em contato com a equipe.",
@@ -0,0 +1,51 @@
1
+ @forms-prefix: pisell-sale-detail-forms;
2
+
3
+ .pisell-sale-detail-forms-main {
4
+ padding: 8px 10px;
5
+ }
6
+
7
+ .@{forms-prefix} {
8
+ display: flex;
9
+ flex-direction: column;
10
+ gap: 8px;
11
+ width: 100%;
12
+ min-height: 0;
13
+ overflow: auto;
14
+
15
+ &__card {
16
+ padding: 12px;
17
+ border: 1px solid rgba(93, 112, 157, 0.72);
18
+ border-radius: 8px;
19
+ background: #080d18;
20
+ }
21
+
22
+ &__header {
23
+ display: flex;
24
+ align-items: center;
25
+ gap: 8px;
26
+ min-width: 0;
27
+ margin-bottom: 10px;
28
+ color: #f5f7ff;
29
+ }
30
+
31
+ &__booking-id {
32
+ flex: none;
33
+ font-size: 14px;
34
+ font-weight: 800;
35
+ }
36
+
37
+ &__resource {
38
+ overflow: hidden;
39
+ color: rgba(234, 240, 255, 0.72);
40
+ font-size: 13px;
41
+ text-overflow: ellipsis;
42
+ white-space: nowrap;
43
+ }
44
+
45
+ &__empty {
46
+ display: flex;
47
+ align-items: center;
48
+ justify-content: center;
49
+ min-height: 220px;
50
+ }
51
+ }
@@ -37,14 +37,8 @@ const CalenDateWeek = (props) => {
37
37
  * @Date: 2024-02-07 15:13
38
38
  */
39
39
  const initCurrentWeekData = (dateText) => {
40
- let startOfWeek = (0, dayjs.default)(dateText).startOf("week");
41
- if (startOfWeek.day() !== 0) startOfWeek.subtract(startOfWeek.day(), "days");
42
- let weekDates = [];
43
- for (let i = 0; i < 7; i++) {
44
- let date = startOfWeek.clone().add(i, "days");
45
- weekDates.push(date.format("YYYY-MM-DD"));
46
- }
47
- return weekDates;
40
+ const startOfWeek = (0, dayjs.default)(dateText).day(0);
41
+ return Array.from({ length: 7 }, (_, index) => startOfWeek.add(index, "day").format("YYYY-MM-DD"));
48
42
  };
49
43
  /**
50
44
  * @title: 构造初始化周数据
@@ -92,7 +86,8 @@ const CalenDateWeek = (props) => {
92
86
  const minimumViewDate = minViewDate || minSelectableDate;
93
87
  const minDate = minimumViewDate ? (0, dayjs.default)(minimumViewDate).startOf("day") : null;
94
88
  const nextDate = (0, dayjs.default)(weekAnchorDate).add(direction * 7, "day");
95
- if (direction > 0 && maxViewDate && nextDate.startOf("week").isAfter((0, dayjs.default)(maxViewDate), "day")) return null;
89
+ const nextWeekStart = initCurrentWeekData(nextDate.format("YYYY-MM-DD"))[0];
90
+ if (direction > 0 && maxViewDate && nextWeekStart && nextWeekStart > maxViewDate) return null;
96
91
  const nextAnchorDate = direction < 0 && minDate && nextDate.isBefore(minDate, "day") ? minDate.format("YYYY-MM-DD") : nextDate.format("YYYY-MM-DD");
97
92
  const nextWeekList = initCurrentWeekData(nextAnchorDate);
98
93
  if (nextWeekList[0] === weekList[0]) return null;
@@ -31,6 +31,7 @@ var locales_default = {
31
31
  "pisell2.scan.order.products.empty.tip": "Please select products",
32
32
  "pisell2.scan.order.check.cart.empty.tip": "Please go back to add products",
33
33
  "pisell2.scan.order.submit.disabled.default": "Order submission is currently disabled.",
34
+ "pisell2.scan.order.submit.failed": "Failed to submit order",
34
35
  "pisell2.scan.order.multiple.orders.tip": "There are multiple active orders for this table. Please contact staff for add-on orders.",
35
36
  "pisell2.scan.order.multiple.orders.confirm": "I Got It",
36
37
  "pisell2.scan.order.settled.cannot.add.tip": "This order has already been settled and you cannot add more items. Please scan again to create a new order or contact staff.",
@@ -95,6 +96,7 @@ var locales_default = {
95
96
  "pisell2.scan.order.products.empty.tip": "请选择商品",
96
97
  "pisell2.scan.order.check.cart.empty.tip": "请返回添加商品",
97
98
  "pisell2.scan.order.submit.disabled.default": "当前暂不可下单",
99
+ "pisell2.scan.order.submit.failed": "订单提交失败",
98
100
  "pisell2.scan.order.multiple.orders.tip": "当前桌台存在多个进行中的订单,请联系店员处理加餐。",
99
101
  "pisell2.scan.order.multiple.orders.confirm": "我知道了",
100
102
  "pisell2.scan.order.settled.cannot.add.tip": "当前订单已结账,无法继续加餐。请重新扫码创建新订单或联系店员。",
@@ -159,6 +161,7 @@ var locales_default = {
159
161
  "pisell2.scan.order.products.empty.tip": "請選擇商品",
160
162
  "pisell2.scan.order.check.cart.empty.tip": "請返回添加商品",
161
163
  "pisell2.scan.order.submit.disabled.default": "當前暫不可下單",
164
+ "pisell2.scan.order.submit.failed": "訂單提交失敗",
162
165
  "pisell2.scan.order.multiple.orders.tip": "當前桌台存在多個進行中的訂單,請聯繫店員處理加餐。",
163
166
  "pisell2.scan.order.multiple.orders.confirm": "我知道了",
164
167
  "pisell2.scan.order.settled.cannot.add.tip": "當前訂單已結賬,無法繼續加餐。請重新掃碼創建新訂單或聯繫店員。",
@@ -223,6 +226,7 @@ var locales_default = {
223
226
  "pisell2.scan.order.products.empty.tip": "商品を選択してください",
224
227
  "pisell2.scan.order.check.cart.empty.tip": "商品を追加するには、前の画面に戻ってください",
225
228
  "pisell2.scan.order.submit.disabled.default": "現在、注文を送信できません。",
229
+ "pisell2.scan.order.submit.failed": "注文の送信に失敗しました",
226
230
  "pisell2.scan.order.multiple.orders.tip": "現在のテーブルには進行中の注文が複数あります。追加注文についてはスタッフにお問い合わせください。",
227
231
  "pisell2.scan.order.multiple.orders.confirm": "了解しました",
228
232
  "pisell2.scan.order.settled.cannot.add.tip": "現在の注文はすでに会計済みのため、追加注文できません。再度QRコードをスキャンして新しい注文を作成するか、スタッフにお問い合わせください。",
@@ -287,6 +291,7 @@ var locales_default = {
287
291
  "pisell2.scan.order.products.empty.tip": "Selecione produtos",
288
292
  "pisell2.scan.order.check.cart.empty.tip": "Volte para adicionar produtos",
289
293
  "pisell2.scan.order.submit.disabled.default": "No momento, não é possível enviar pedidos.",
294
+ "pisell2.scan.order.submit.failed": "Falha ao enviar o pedido",
290
295
  "pisell2.scan.order.multiple.orders.tip": "Há vários pedidos ativos nesta mesa. Entre em contato com a equipe para adicionar itens.",
291
296
  "pisell2.scan.order.multiple.orders.confirm": "Entendi",
292
297
  "pisell2.scan.order.settled.cannot.add.tip": "Este pedido já foi finalizado e não é possível adicionar mais itens. Escaneie novamente para criar um novo pedido ou entre em contato com a equipe.",
@@ -0,0 +1,51 @@
1
+ @forms-prefix: pisell-sale-detail-forms;
2
+
3
+ .pisell-sale-detail-forms-main {
4
+ padding: 8px 10px;
5
+ }
6
+
7
+ .@{forms-prefix} {
8
+ display: flex;
9
+ flex-direction: column;
10
+ gap: 8px;
11
+ width: 100%;
12
+ min-height: 0;
13
+ overflow: auto;
14
+
15
+ &__card {
16
+ padding: 12px;
17
+ border: 1px solid rgba(93, 112, 157, 0.72);
18
+ border-radius: 8px;
19
+ background: #080d18;
20
+ }
21
+
22
+ &__header {
23
+ display: flex;
24
+ align-items: center;
25
+ gap: 8px;
26
+ min-width: 0;
27
+ margin-bottom: 10px;
28
+ color: #f5f7ff;
29
+ }
30
+
31
+ &__booking-id {
32
+ flex: none;
33
+ font-size: 14px;
34
+ font-weight: 800;
35
+ }
36
+
37
+ &__resource {
38
+ overflow: hidden;
39
+ color: rgba(234, 240, 255, 0.72);
40
+ font-size: 13px;
41
+ text-overflow: ellipsis;
42
+ white-space: nowrap;
43
+ }
44
+
45
+ &__empty {
46
+ display: flex;
47
+ align-items: center;
48
+ justify-content: center;
49
+ min-height: 220px;
50
+ }
51
+ }