@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
@@ -4,11 +4,7 @@ declare const __propDef: {
4
4
  props: {
5
5
  open?: (options: {
6
6
  dateTime: string;
7
- airport: {
8
- iata: string;
9
- code: string;
10
- };
11
- terminalOnly: boolean;
7
+ iata: string;
12
8
  }) => Promise<Flight>;
13
9
  };
14
10
  events: {
@@ -22,11 +18,7 @@ export type FlightSearchSlots = typeof __propDef.slots;
22
18
  export default class FlightSearch extends SvelteComponent<FlightSearchProps, FlightSearchEvents, FlightSearchSlots> {
23
19
  get open(): (options: {
24
20
  dateTime: string;
25
- airport: {
26
- iata: string;
27
- code: string;
28
- };
29
- terminalOnly: boolean;
21
+ iata: string;
30
22
  }) => Promise<Flight>;
31
23
  }
32
24
  export {};
@@ -53,7 +53,6 @@ export declare const originalBooking: {
53
53
  selectedPrice: import("svelte/store").Writable<SearchPriceV2>;
54
54
  isModifiable: import("svelte/store").Readable<boolean>;
55
55
  priceDifference: import("svelte/store").Readable<number>;
56
- isFlightService: import("svelte/store").Readable<boolean>;
57
56
  hour: {
58
57
  subscribe: (this: void, run: import("svelte/store").Subscriber<number>, invalidate?: import("svelte/store").Invalidator<number>) => import("svelte/store").Unsubscriber;
59
58
  set(hour: number): void;
@@ -147,7 +146,6 @@ export declare const copiedBooking: {
147
146
  selectedPrice: import("svelte/store").Writable<SearchPriceV2>;
148
147
  isModifiable: import("svelte/store").Readable<boolean>;
149
148
  priceDifference: import("svelte/store").Readable<number>;
150
- isFlightService: import("svelte/store").Readable<boolean>;
151
149
  hour: {
152
150
  subscribe: (this: void, run: import("svelte/store").Subscriber<number>, invalidate?: import("svelte/store").Invalidator<number>) => import("svelte/store").Unsubscriber;
153
151
  set(hour: number): void;
@@ -70,7 +70,6 @@ function createBookingStore(bookingDTO) {
70
70
  const isBabySeatServiceAvailable = derived(availableExtraServices, $availableExtraServices => $availableExtraServices.some(extra => extra.type === ExtraServiceType.baby));
71
71
  // 피켓 서비스 가능 여부
72
72
  const isPicketServiceAvailable = derived(availableExtraServices, $availableExtraServices => $availableExtraServices.some(extra => extra.type === ExtraServiceType.picket));
73
- const isFlightService = derived(booking, $booking => $booking?.serviceType === BookingServiceType.pickup || $booking?.serviceType === BookingServiceType.sending);
74
73
  // 금액 정보
75
74
  const price = derived(booking, $booking => {
76
75
  const beforePrice = isNumber($booking?.price) ? $booking.price : null;
@@ -346,7 +345,6 @@ function createBookingStore(bookingDTO) {
346
345
  selectedPrice,
347
346
  isModifiable,
348
347
  priceDifference,
349
- isFlightService,
350
348
  // subscribe & set
351
349
  hour,
352
350
  minute,
@@ -6,7 +6,6 @@ interface BaseFlight {
6
6
  name: string;
7
7
  iata: string;
8
8
  selectType: 'AUTO' | 'MANUAL';
9
- arrivalTerminal?: string;
10
9
  }
11
10
  export interface FlightAuto extends BaseFlight {
12
11
  selectType: 'AUTO';
@@ -17,6 +16,7 @@ export interface FlightAuto extends BaseFlight {
17
16
  arrivalAirport: string;
18
17
  departureAirport: string;
19
18
  delay: boolean;
19
+ arrivalTerminal: string;
20
20
  }
21
21
  export interface FlightManual extends BaseFlight {
22
22
  selectType: 'MANUAL';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@movvjs/svelte-schedule-view",
3
- "version": "0.2.2",
3
+ "version": "0.2.3-revert-terminal",
4
4
  "type": "module",
5
5
  "license": "ISC",
6
6
  "author": {
@@ -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": {
@@ -7,7 +7,7 @@
7
7
  import { t } from '$lib/i18n'
8
8
  import { env } from '$lib/store/env'
9
9
 
10
- import { BookingServiceType, FileType, type Flight } from '$scheduleView/types'
10
+ import { BookingServiceType, FileType } from '$scheduleView/types'
11
11
  import { isEdit } from '$scheduleView/Schedule.svelte'
12
12
  import { getCarName } from '$scheduleView/utils'
13
13
  import { copiedBooking, originalBooking } from '$scheduleView/stores/booking'
@@ -20,7 +20,7 @@
20
20
  import FileUploader from '$scheduleView/FileUploader.svelte'
21
21
  import CarSearch from '$scheduleView/CarSearch.svelte'
22
22
 
23
- const { stdt, fullName, pax, extraServices, files, plans, isFlightService } = originalBooking
23
+ const { stdt, fullName, pax, extraServices, files, plans } = originalBooking
24
24
  const {
25
25
  withPreserveAndPreview,
26
26
  hour,
@@ -53,9 +53,9 @@
53
53
  texts.push(`${$t('booking.startTime')} : ${dayjs($stdt).format('HH:mm')}`)
54
54
  texts.push(`${$t('booking.carInfo')} : ${getCarName($originalBooking.carInfo, { seat: true, seatPostfix: $t('booking.seater') })}`)
55
55
  texts.push(`${$t('booking.pax')} : ${$pax}`)
56
- if ($isFlightService) {
57
- texts.push(`${$t('booking.flight')} : ${[$originalBooking.flight?.name, getTerminalName($originalBooking.flight)].filter(Boolean).join(' / ')}`)
58
- }
56
+ texts.push(
57
+ `${$t('booking.flight')} : ${$originalBooking.flight?.name || '- -'} ${$originalBooking.flight?.selectType === 'AUTO' && $originalBooking.flight?.arrivalTerminal ? `/ ${$t('flight.terminal', { values: { number: $originalBooking.flight.arrivalTerminal } })}` : ''}`
58
+ )
59
59
  texts.push(`${$t('booking.guestName')} : ${$fullName}`)
60
60
  // texts.push(`Email : ${$originalBooking.email || '- -'}`) // 제외
61
61
  texts.push(`${$t('booking.telNo')} : ${$originalBooking.tel || '- -'}`)
@@ -124,22 +124,7 @@
124
124
  flightSearch$
125
125
  .open({
126
126
  dateTime: $copiedBooking.ymd,
127
- airport: (() => {
128
- if ($copiedBooking.serviceType === BookingServiceType.pickup) {
129
- return {
130
- iata: $copiedBooking.origin?.iata || null,
131
- code: $copiedBooking.origin?.code || null
132
- }
133
- } else if ($copiedBooking.serviceType === BookingServiceType.sending) {
134
- return {
135
- iata: $copiedBooking.dest?.iata || null,
136
- code: $copiedBooking.dest?.code || null
137
- }
138
- } else {
139
- return null
140
- }
141
- })(),
142
- terminalOnly: $copiedBooking.serviceType === BookingServiceType.sending
127
+ iata: $copiedBooking.origin?.iata
143
128
  })
144
129
  .then(flight => {
145
130
  $copiedBooking.flight = flight
@@ -148,25 +133,6 @@
148
133
  alert.open({ title: $t('alert.error'), text: e.message })
149
134
  })
150
135
  }
151
-
152
- function getTerminalName(flight: Flight) {
153
- if (!flight.arrivalTerminal) return null
154
-
155
- if (flight.selectType === 'AUTO') {
156
- switch (flight.arrivalTerminal) {
157
- case 'I':
158
- return 'International'
159
- case 'D':
160
- return 'Domestic'
161
- default:
162
- return `Terminal ${flight.arrivalTerminal}`
163
- }
164
- } else if (flight.selectType === 'MANUAL') {
165
- return flight.arrivalTerminal
166
- } else {
167
- return null
168
- }
169
- }
170
136
  </script>
171
137
 
172
138
  <Translation bind:this={translation$} />
@@ -224,17 +190,17 @@
224
190
  </td>
225
191
  </tr>
226
192
 
227
- {#if $isFlightService}
193
+ {#if $originalBooking.serviceType === BookingServiceType.pickup}
228
194
  <tr>
229
195
  <th>{$t('booking.flight')}</th>
230
196
  <td>
231
197
  {#if !$isEdit}
232
198
  {#if $originalBooking.flight}
233
199
  <p class="indie_value-text flight">
234
- {@html [$originalBooking.flight.name, getTerminalName($originalBooking.flight)]
235
- .map((value, i) => (value ? (i === 0 ? `<b>${value}</b>` : value) : null))
236
- .filter(Boolean)
237
- .join(' / ')}
200
+ <b>{$originalBooking.flight.name}</b>
201
+ {#if $originalBooking.flight.selectType === 'AUTO' && $originalBooking.flight.arrivalTerminal}
202
+ / {$t('flight.terminal', { values: { number: $originalBooking.flight.arrivalTerminal } })}
203
+ {/if}
238
204
  </p>
239
205
  {#if $originalBooking.flight.selectType === 'MANUAL'}
240
206
  <div class="indie_exclamation_mark_box sm black">
@@ -248,10 +214,10 @@
248
214
  <!-- -->
249
215
  {#if $copiedBooking.flight}
250
216
  <p class="indie_value-text flight">
251
- {@html [$copiedBooking.flight.name, getTerminalName($copiedBooking.flight)]
252
- .map((value, i) => (value ? (i === 0 ? `<b>${value}</b>` : value) : null))
253
- .filter(Boolean)
254
- .join(' / ')}
217
+ <b>{$copiedBooking.flight.name}</b>
218
+ {#if $copiedBooking.flight.selectType === 'AUTO' && $copiedBooking.flight.arrivalTerminal}
219
+ / {$t('flight.terminal', { values: { number: $copiedBooking.flight.arrivalTerminal } })}
220
+ {/if}
255
221
  </p>
256
222
  <button type="button" class="indie_btn_squre only refresh_black mgl10" on:click={() => openFlightSearch()}>다시선택</button>
257
223
  {#if $copiedBooking.flight.selectType !== 'AUTO'}
@@ -39,13 +39,26 @@
39
39
  import QS from 'qs'
40
40
  import Axios from 'axios'
41
41
 
42
- const { stdt, price, isModifiable } = originalBooking
43
- const { price: editPrice, availableDestZones, availableWaypointZones, fullName, selectedPrice, priceDifference } = copiedBooking
42
+ const { stdt, price, priceDifference, isModifiable } = originalBooking
43
+ const {
44
+ price: editPrice,
45
+ priceDifference: editPriceDifference,
46
+ availableDestZones,
47
+ availableWaypointZones,
48
+ fullName,
49
+ selectedPrice
50
+ } = copiedBooking
44
51
 
45
52
  let on = false
46
-
47
53
  let resolver: (value: Awaited<ReturnType<typeof open>>) => void
48
54
 
55
+ /**
56
+ * 일정 금액 표현 값
57
+ */
58
+ $: targetPrice = $isEdit ? $editPrice : $price
59
+ $: forex = targetPrice?.new?.forex ?? ''
60
+ $: difference = $isEdit ? $editPriceDifference : $priceDifference
61
+
49
62
  /**
50
63
  * @description 스케쥴뷰 옵션 초기화
51
64
  * @param options
@@ -238,27 +251,22 @@
238
251
  <dl class="priceAll">
239
252
  <dt>{$t('booking.totalPrice')}</dt>
240
253
  <dd>
241
- {#if !$isEdit}
242
- <!-- * 수정중이 아닌 경우엔 검정색으로 금액 표현 -->
243
- <strong>{comma($price.before.amount)} {$price.before.forex}</strong>
254
+ <!-- * 차액 발생시 -->
255
+ {#if difference > 0 || difference < 0}
256
+ <!-- 검정 표현 -->
257
+ <strong>{comma(targetPrice.before.amount)} {forex}</strong>
258
+
259
+ <!-- 빨간색 표현 -->
260
+ <span>
261
+ {difference > 0 ? ' + ' : ' - '}
262
+ {comma(Math.abs(difference))}
263
+ {forex}
264
+ = {comma(targetPrice.new.amount)}
265
+ {forex}
266
+ </span>
244
267
  {:else}
245
- {@const forex = $price.new.forex}
246
- <!-- * 수정중일때, 차액 발생시 -->
247
- {#if $priceDifference > 0 || $priceDifference < 0}
248
- <!-- 앞부분은 확정된 금액이니 검은색 표현 -->
249
- <strong>{comma($editPrice.before.amount)} {forex}</strong>
250
- <!-- 뒷부분은 빨간색 표현 -->
251
- <span>
252
- {$priceDifference > 0 ? ' + ' : ' - '}
253
- {comma(Math.abs($priceDifference))}
254
- {forex}
255
- = {comma($editPrice.new.amount)}
256
- {forex}
257
- </span>
258
- {:else}
259
- <!-- * 차액 미 발생시 검정색 표현-->
260
- <strong>{comma($editPrice.new.amount)} {forex}</strong>
261
- {/if}
268
+ <!-- * 차액 미 발생시 검정색 표현-->
269
+ <strong>{comma(targetPrice.new.amount)} {forex}</strong>
262
270
  {/if}
263
271
  </dd>
264
272
  </dl>
@@ -109,14 +109,4 @@ export class CommonAPI {
109
109
  throw Error('Invalid target')
110
110
  }
111
111
  }
112
-
113
- static async getPoiTerminals(code: string): Promise<string[]> {
114
- const { data } = await axios.get(`/common/poiTerminal/list/${code}`)
115
-
116
- if (data.mode === false) {
117
- throw new Error(data.msg)
118
- } else {
119
- return data.list
120
- }
121
- }
122
112
  }
@@ -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