@movvjs/svelte-schedule-view 0.2.2 → 0.2.3-revert-terminal

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.
Files changed (46) hide show
  1. package/.svelte-kit/__package__/i18n/locales/en.json +1 -3
  2. package/.svelte-kit/__package__/i18n/locales/ko.json +1 -3
  3. package/.svelte-kit/__package__/i18n/locales/vi.json +1 -3
  4. package/.svelte-kit/__package__/i18n/locales/zh-cn.json +1 -3
  5. package/.svelte-kit/__package__/i18n/locales/zh-tw.json +1 -3
  6. package/.svelte-kit/__package__/schedule-view/BookingInfo.svelte +14 -47
  7. package/.svelte-kit/__package__/schedule-view/Schedule.svelte +30 -22
  8. package/.svelte-kit/__package__/schedule-view/api/common/index.d.ts +0 -1
  9. package/.svelte-kit/__package__/schedule-view/api/common/index.js +0 -9
  10. package/.svelte-kit/__package__/schedule-view/assets/scss/indie_booking.scss +1 -58
  11. package/.svelte-kit/__package__/schedule-view/components/flight-search/FlightSearch.svelte +120 -193
  12. package/.svelte-kit/__package__/schedule-view/components/flight-search/FlightSearch.svelte.d.ts +2 -10
  13. package/.svelte-kit/__package__/schedule-view/stores/booking.d.ts +0 -2
  14. package/.svelte-kit/__package__/schedule-view/stores/booking.js +0 -2
  15. package/.svelte-kit/__package__/schedule-view/types/flight.d.ts +1 -1
  16. package/.svelte-kit/generated/server/internal.js +1 -1
  17. package/dist/i18n/locales/en.json +1 -3
  18. package/dist/i18n/locales/ko.json +1 -3
  19. package/dist/i18n/locales/vi.json +1 -3
  20. package/dist/i18n/locales/zh-cn.json +1 -3
  21. package/dist/i18n/locales/zh-tw.json +1 -3
  22. package/dist/schedule-view/BookingInfo.svelte +14 -47
  23. package/dist/schedule-view/Schedule.svelte +30 -22
  24. package/dist/schedule-view/api/common/index.d.ts +0 -1
  25. package/dist/schedule-view/api/common/index.js +0 -9
  26. package/dist/schedule-view/assets/scss/indie_booking.scss +1 -58
  27. package/dist/schedule-view/components/flight-search/FlightSearch.svelte +120 -193
  28. package/dist/schedule-view/components/flight-search/FlightSearch.svelte.d.ts +2 -10
  29. package/dist/schedule-view/stores/booking.d.ts +0 -2
  30. package/dist/schedule-view/stores/booking.js +0 -2
  31. package/dist/schedule-view/types/flight.d.ts +1 -1
  32. package/package.json +1 -1
  33. package/src/lib/i18n/locales/en.json +1 -3
  34. package/src/lib/i18n/locales/ko.json +1 -3
  35. package/src/lib/i18n/locales/vi.json +1 -3
  36. package/src/lib/i18n/locales/zh-cn.json +1 -3
  37. package/src/lib/i18n/locales/zh-tw.json +1 -3
  38. package/src/lib/schedule-view/BookingInfo.svelte +15 -49
  39. package/src/lib/schedule-view/Schedule.svelte +31 -23
  40. package/src/lib/schedule-view/api/common/index.ts +0 -10
  41. package/src/lib/schedule-view/assets/scss/indie_booking.scss +1 -58
  42. package/src/lib/schedule-view/components/flight-search/FlightSearch.svelte +126 -208
  43. package/src/lib/schedule-view/stores/booking.ts +0 -6
  44. package/src/lib/schedule-view/types/flight.ts +1 -1
  45. package/src/routes/development/+page.svelte +1 -1
  46. package/sync-git.sh +74 -29
@@ -20,7 +20,7 @@
20
20
  "file": "File",
21
21
  "fileUpload": "Upload file",
22
22
  "firstName": "First name",
23
- "flight": "Flight Info",
23
+ "flight": "Flight",
24
24
  "guestName": "Guest Name",
25
25
  "hours": "{hour} hour(s)",
26
26
  "lastName": "Last name",
@@ -80,10 +80,8 @@
80
80
  "noFlightsWereFound": "No flights were found.",
81
81
  "pleaseEnterFlightNo": "Please enter flight No.",
82
82
  "pleaseSelectAFlightNo": "Please select a flight No.",
83
- "pleaseSelectAnAirport": "Please select an airport.",
84
83
  "pleaseSelectDate": "Please select a date.",
85
84
  "selectFlightNo": "Select Flight No.",
86
- "selectTerminal": "Please select a terminal.",
87
85
  "terminal": "Terminal {number}"
88
86
  },
89
87
  "placeholder": {
@@ -20,7 +20,7 @@
20
20
  "file": "파일",
21
21
  "fileUpload": "파일 업로드",
22
22
  "firstName": "이름",
23
- "flight": "항공편 정보",
23
+ "flight": "항공편",
24
24
  "guestName": "사용자명",
25
25
  "hours": "{hour} 시간",
26
26
  "lastName": "성",
@@ -67,10 +67,8 @@
67
67
  "noFlightsWereFound": "항공편을 찾을 수 없습니다.",
68
68
  "pleaseEnterFlightNo": "항공편명을 입력해주세요.",
69
69
  "pleaseSelectAFlightNo": "항공편명을 선택해주세요.",
70
- "pleaseSelectAnAirport": "공항을 선택해주세요.",
71
70
  "pleaseSelectDate": "날짜를 선택해주세요.",
72
71
  "selectFlightNo": "항공편명 선택",
73
- "selectTerminal": "터미널을 선택해주세요.",
74
72
  "terminal": "터미널 {number}"
75
73
  },
76
74
  "placeholder": {
@@ -20,7 +20,7 @@
20
20
  "file": "Tệp",
21
21
  "fileUpload": "Cập nhật dử liệu",
22
22
  "firstName": "Tên đầu tiên",
23
- "flight": "Thông tin chuyến bay",
23
+ "flight": " chuyến bay",
24
24
  "guestName": "Tên khách",
25
25
  "hours": "{hour} giờ",
26
26
  "lastName": "Họ",
@@ -67,10 +67,8 @@
67
67
  "noFlightsWereFound": "Không tìm thấy chuyến bay.",
68
68
  "pleaseEnterFlightNo": "Vui lòng nhập số chuyến bay",
69
69
  "pleaseSelectAFlightNo": "Vui lòng chọn số chuyến bay",
70
- "pleaseSelectAnAirport": "Vui lòng chọn một sân bay.",
71
70
  "pleaseSelectDate": "Vui lòng chọn một ngày.",
72
71
  "selectFlightNo": "Chọn số chuyến bay",
73
- "selectTerminal": "Vui lòng chọn một thiết bị đầu cuối.",
74
72
  "terminal": "Nhà ga số 2"
75
73
  },
76
74
  "placeholder": {
@@ -20,7 +20,7 @@
20
20
  "file": "档案",
21
21
  "fileUpload": "上传文件",
22
22
  "firstName": "名",
23
- "flight": "航班信息",
23
+ "flight": "航班号",
24
24
  "guestName": "乘客姓名",
25
25
  "hours": "{hour} 小时",
26
26
  "lastName": "姓",
@@ -67,10 +67,8 @@
67
67
  "noFlightsWereFound": "未找到航班。",
68
68
  "pleaseEnterFlightNo": "请输入航班号",
69
69
  "pleaseSelectAFlightNo": "请选择航班号",
70
- "pleaseSelectAnAirport": "请选择一个机场。",
71
70
  "pleaseSelectDate": "请选择日期。",
72
71
  "selectFlightNo": "选择航班号",
73
- "selectTerminal": "请选择一个终端。",
74
72
  "terminal": "第{number}航站楼"
75
73
  },
76
74
  "placeholder": {
@@ -20,7 +20,7 @@
20
20
  "file": "檔案",
21
21
  "fileUpload": "上傳文件",
22
22
  "firstName": "名",
23
- "flight": "航班資訊",
23
+ "flight": "航班號",
24
24
  "guestName": "乘客姓名",
25
25
  "hours": "{hour} 小時",
26
26
  "lastName": "姓",
@@ -67,10 +67,8 @@
67
67
  "noFlightsWereFound": "未找到航班。",
68
68
  "pleaseEnterFlightNo": "請輸入航班號碼",
69
69
  "pleaseSelectAFlightNo": "請選擇航班號碼",
70
- "pleaseSelectAnAirport": "請選擇機場。",
71
70
  "pleaseSelectDate": "請選擇日期。",
72
71
  "selectFlightNo": "選擇航班號碼",
73
- "selectTerminal": "請選擇一個終端。",
74
72
  "terminal": "第{number}航廈"
75
73
  },
76
74
  "placeholder": {
@@ -14,7 +14,7 @@ import FlightSearch from "./components/flight-search/FlightSearch.svelte";
14
14
  import PhoneNumberInput from "./PhoneNumberInput.svelte";
15
15
  import FileUploader from "./FileUploader.svelte";
16
16
  import CarSearch from "./CarSearch.svelte";
17
- const { stdt, fullName, pax, extraServices, files, plans, isFlightService } = originalBooking;
17
+ const { stdt, fullName, pax, extraServices, files, plans } = originalBooking;
18
18
  const {
19
19
  withPreserveAndPreview,
20
20
  hour,
@@ -45,9 +45,9 @@ async function copyContents() {
45
45
  texts.push(`${$t("booking.startTime")} : ${dayjs($stdt).format("HH:mm")}`);
46
46
  texts.push(`${$t("booking.carInfo")} : ${getCarName($originalBooking.carInfo, { seat: true, seatPostfix: $t("booking.seater") })}`);
47
47
  texts.push(`${$t("booking.pax")} : ${$pax}`);
48
- if ($isFlightService) {
49
- texts.push(`${$t("booking.flight")} : ${[$originalBooking.flight?.name, getTerminalName($originalBooking.flight)].filter(Boolean).join(" / ")}`);
50
- }
48
+ texts.push(
49
+ `${$t("booking.flight")} : ${$originalBooking.flight?.name || "- -"} ${$originalBooking.flight?.selectType === "AUTO" && $originalBooking.flight?.arrivalTerminal ? `/ ${$t("flight.terminal", { values: { number: $originalBooking.flight.arrivalTerminal } })}` : ""}`
50
+ );
51
51
  texts.push(`${$t("booking.guestName")} : ${$fullName}`);
52
52
  texts.push(`${$t("booking.telNo")} : ${$originalBooking.tel || "- -"}`);
53
53
  const extraServiceText = $originalBooking.extra?.length > 0 ? $originalBooking.extra.map((s) => $t(`extraServiceType.${s.type}`)).join(", ") : "- -";
@@ -104,46 +104,13 @@ async function toggleAutoPicket(e) {
104
104
  function openFlightSearch() {
105
105
  flightSearch$.open({
106
106
  dateTime: $copiedBooking.ymd,
107
- airport: (() => {
108
- if ($copiedBooking.serviceType === BookingServiceType.pickup) {
109
- return {
110
- iata: $copiedBooking.origin?.iata || null,
111
- code: $copiedBooking.origin?.code || null
112
- };
113
- } else if ($copiedBooking.serviceType === BookingServiceType.sending) {
114
- return {
115
- iata: $copiedBooking.dest?.iata || null,
116
- code: $copiedBooking.dest?.code || null
117
- };
118
- } else {
119
- return null;
120
- }
121
- })(),
122
- terminalOnly: $copiedBooking.serviceType === BookingServiceType.sending
107
+ iata: $copiedBooking.origin?.iata
123
108
  }).then((flight) => {
124
109
  $copiedBooking.flight = flight;
125
110
  }).catch((e) => {
126
111
  alert.open({ title: $t("alert.error"), text: e.message });
127
112
  });
128
113
  }
129
- function getTerminalName(flight) {
130
- if (!flight.arrivalTerminal)
131
- return null;
132
- if (flight.selectType === "AUTO") {
133
- switch (flight.arrivalTerminal) {
134
- case "I":
135
- return "International";
136
- case "D":
137
- return "Domestic";
138
- default:
139
- return `Terminal ${flight.arrivalTerminal}`;
140
- }
141
- } else if (flight.selectType === "MANUAL") {
142
- return flight.arrivalTerminal;
143
- } else {
144
- return null;
145
- }
146
- }
147
114
  </script>
148
115
 
149
116
  <Translation bind:this={translation$} />
@@ -201,17 +168,17 @@ function getTerminalName(flight) {
201
168
  </td>
202
169
  </tr>
203
170
 
204
- {#if $isFlightService}
171
+ {#if $originalBooking.serviceType === BookingServiceType.pickup}
205
172
  <tr>
206
173
  <th>{$t('booking.flight')}</th>
207
174
  <td>
208
175
  {#if !$isEdit}
209
176
  {#if $originalBooking.flight}
210
177
  <p class="indie_value-text flight">
211
- {@html [$originalBooking.flight.name, getTerminalName($originalBooking.flight)]
212
- .map((value, i) => (value ? (i === 0 ? `<b>${value}</b>` : value) : null))
213
- .filter(Boolean)
214
- .join(' / ')}
178
+ <b>{$originalBooking.flight.name}</b>
179
+ {#if $originalBooking.flight.selectType === 'AUTO' && $originalBooking.flight.arrivalTerminal}
180
+ / {$t('flight.terminal', { values: { number: $originalBooking.flight.arrivalTerminal } })}
181
+ {/if}
215
182
  </p>
216
183
  {#if $originalBooking.flight.selectType === 'MANUAL'}
217
184
  <div class="indie_exclamation_mark_box sm black">
@@ -225,10 +192,10 @@ function getTerminalName(flight) {
225
192
  <!-- -->
226
193
  {#if $copiedBooking.flight}
227
194
  <p class="indie_value-text flight">
228
- {@html [$copiedBooking.flight.name, getTerminalName($copiedBooking.flight)]
229
- .map((value, i) => (value ? (i === 0 ? `<b>${value}</b>` : value) : null))
230
- .filter(Boolean)
231
- .join(' / ')}
195
+ <b>{$copiedBooking.flight.name}</b>
196
+ {#if $copiedBooking.flight.selectType === 'AUTO' && $copiedBooking.flight.arrivalTerminal}
197
+ / {$t('flight.terminal', { values: { number: $copiedBooking.flight.arrivalTerminal } })}
198
+ {/if}
232
199
  </p>
233
200
  <button type="button" class="indie_btn_squre only refresh_black mgl10" on:click={() => openFlightSearch()}>다시선택</button>
234
201
  {#if $copiedBooking.flight.selectType !== 'AUTO'}
@@ -21,10 +21,23 @@ import BookingInfo from "./BookingInfo.svelte";
21
21
  import { API_URL } from "../axios/constant";
22
22
  import QS from "qs";
23
23
  import Axios from "axios";
24
- const { stdt, price, isModifiable } = originalBooking;
25
- const { price: editPrice, availableDestZones, availableWaypointZones, fullName, selectedPrice, priceDifference } = copiedBooking;
24
+ const { stdt, price, priceDifference, isModifiable } = originalBooking;
25
+ const {
26
+ price: editPrice,
27
+ priceDifference: editPriceDifference,
28
+ availableDestZones,
29
+ availableWaypointZones,
30
+ fullName,
31
+ selectedPrice
32
+ } = copiedBooking;
26
33
  let on = false;
27
34
  let resolver;
35
+ $:
36
+ targetPrice = $isEdit ? $editPrice : $price;
37
+ $:
38
+ forex = targetPrice?.new?.forex ?? "";
39
+ $:
40
+ difference = $isEdit ? $editPriceDifference : $priceDifference;
28
41
  export function init(options) {
29
42
  const { target, isDev, token, locale, viewOnly = false } = options;
30
43
  if (!target)
@@ -184,27 +197,22 @@ async function save() {
184
197
  <dl class="priceAll">
185
198
  <dt>{$t('booking.totalPrice')}</dt>
186
199
  <dd>
187
- {#if !$isEdit}
188
- <!-- * 수정중이 아닌 경우엔 검정색으로 금액 표현 -->
189
- <strong>{comma($price.before.amount)} {$price.before.forex}</strong>
200
+ <!-- * 차액 발생시 -->
201
+ {#if difference > 0 || difference < 0}
202
+ <!-- 검정 표현 -->
203
+ <strong>{comma(targetPrice.before.amount)} {forex}</strong>
204
+
205
+ <!-- 빨간색 표현 -->
206
+ <span>
207
+ {difference > 0 ? ' + ' : ' - '}
208
+ {comma(Math.abs(difference))}
209
+ {forex}
210
+ = {comma(targetPrice.new.amount)}
211
+ {forex}
212
+ </span>
190
213
  {:else}
191
- {@const forex = $price.new.forex}
192
- <!-- * 수정중일때, 차액 발생시 -->
193
- {#if $priceDifference > 0 || $priceDifference < 0}
194
- <!-- 앞부분은 확정된 금액이니 검은색 표현 -->
195
- <strong>{comma($editPrice.before.amount)} {forex}</strong>
196
- <!-- 뒷부분은 빨간색 표현 -->
197
- <span>
198
- {$priceDifference > 0 ? ' + ' : ' - '}
199
- {comma(Math.abs($priceDifference))}
200
- {forex}
201
- = {comma($editPrice.new.amount)}
202
- {forex}
203
- </span>
204
- {:else}
205
- <!-- * 차액 미 발생시 검정색 표현-->
206
- <strong>{comma($editPrice.new.amount)} {forex}</strong>
207
- {/if}
214
+ <!-- * 차액 미 발생시 검정색 표현-->
215
+ <strong>{comma(targetPrice.new.amount)} {forex}</strong>
208
216
  {/if}
209
217
  </dd>
210
218
  </dl>
@@ -15,5 +15,4 @@ export declare class CommonAPI {
15
15
  url: string;
16
16
  }>;
17
17
  static searchPlace(keyword: string): Promise<BookingLocation[]>;
18
- static getPoiTerminals(code: string): Promise<string[]>;
19
18
  }
@@ -114,13 +114,4 @@ export class CommonAPI {
114
114
  throw Error('Invalid target');
115
115
  }
116
116
  }
117
- static async getPoiTerminals(code) {
118
- const { data } = await axios.get(`/common/poiTerminal/list/${code}`);
119
- if (data.mode === false) {
120
- throw new Error(data.msg);
121
- }
122
- else {
123
- return data.list;
124
- }
125
- }
126
117
  }
@@ -3038,9 +3038,8 @@
3038
3038
 
3039
3039
  .map_box{
3040
3040
  flex-grow: 1;
3041
- background-color: royalblue;
3041
+ background-color: Azure;
3042
3042
  position: relative;
3043
- overflow: hidden;
3044
3043
 
3045
3044
  .indie_ic_map_loca{
3046
3045
  position: relative;
@@ -4612,61 +4611,5 @@
4612
4611
  }
4613
4612
  }
4614
4613
 
4615
-
4616
-
4617
-
4618
- //마진 값
4619
- .mg{
4620
- @for $i from 0 through 40{
4621
- @if(($i % 5) == 0){
4622
- &t#{$i}{margin-top: #{$i}px;}
4623
- &l#{$i}{margin-left: #{$i}px;}
4624
- &r#{$i}{margin-right: #{$i}px;}
4625
- &b#{$i}{margin-bottom: #{$i}px;}
4626
- }
4627
- }
4628
-
4629
- &TMinus{
4630
- margin-top: -1px;
4631
- }
4632
-
4633
- &-l-auto{
4634
- margin-left: auto;
4635
- }
4636
- &-r-auto{
4637
- margin-right: auto;
4638
- }
4639
- }
4640
-
4641
- //패딩 값
4642
- .pd{
4643
- @for $i from 0 through 40{
4644
- @if(($i % 5) == 0){
4645
- &t#{$i}{padding-top: #{$i}px;}
4646
- &l#{$i}{padding-left: #{$i}px;}
4647
- &r#{$i}{padding-right: #{$i}px;}
4648
- &b#{$i}{padding-bottom: #{$i}px;}
4649
- }
4650
- }
4651
- }
4652
-
4653
- // 넓이 값 - 퍼센트
4654
- .w{
4655
- @for $i from 0 through 100{
4656
- @if(($i % 5) == 0){
4657
- &#{$i}{width: #{$i + '%'};}
4658
- }
4659
- }
4660
- }
4661
-
4662
- // 넓이 값 - 픽셀
4663
- .w{
4664
- @for $i from 0 through 500{
4665
- @if(($i % 10) == 0){
4666
- &#{$i}px{width: #{$i + 'px'};}
4667
- }
4668
- }
4669
- }
4670
-
4671
4614
  }
4672
4615