@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
@@ -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
 
@@ -3,12 +3,12 @@ import { padStart, range } from "lodash-es";
3
3
  import { fade } from "svelte/transition";
4
4
  import { t } from "../../../i18n";
5
5
  import { dayjs } from "../../../dayjs";
6
- import { BookingAPI, CommonAPI } from "../../api";
6
+ import { BookingAPI } from "../../api";
7
7
  import { alert } from "../notifications";
8
8
  let on = false;
9
9
  let type = "AUTO";
10
10
  let dateTime;
11
- let airport = { iata: null, code: null };
11
+ let iata;
12
12
  let loading = false;
13
13
  let resolveFn;
14
14
  let arrivalDate;
@@ -29,22 +29,15 @@ let manualInput = "";
29
29
  let estimateDate;
30
30
  let hour = 0;
31
31
  let minute = 0;
32
- let terminals = [];
33
- let arrivalTerminal;
34
32
  export async function open(options) {
35
33
  return new Promise(async (resolve, reject) => {
36
34
  if (!options?.dateTime) {
37
35
  reject(new Error($t("flight.pleaseSelectDate")));
38
36
  return;
39
37
  }
40
- if (!options?.airport?.iata && !options?.airport?.code) {
41
- reject(new Error($t("flight.pleaseSelectAnAirport")));
42
- return;
43
- }
44
38
  resolveFn = resolve;
45
39
  dateTime = options.dateTime;
46
- airport.iata = options.airport?.iata;
47
- airport.code = options.airport?.code;
40
+ iata = options.iata;
48
41
  manualInput = "";
49
42
  estimateDate = dayjs(dateTime);
50
43
  hour = estimateDate.hour();
@@ -52,28 +45,15 @@ export async function open(options) {
52
45
  flights = [];
53
46
  page = 1;
54
47
  arrivalDate = dayjs(dateTime).minute(0);
55
- terminals = [];
56
- arrivalTerminal = null;
57
- if (options.terminalOnly) {
58
- changeType("TERMINAL");
48
+ if (iata) {
49
+ type = "AUTO";
50
+ fetchFlights();
59
51
  } else {
60
- if (airport.iata) {
61
- changeType("AUTO");
62
- } else {
63
- changeType("MANUAL");
64
- }
52
+ type = "MANUAL";
65
53
  }
66
54
  on = true;
67
55
  });
68
56
  }
69
- function changeType(value) {
70
- type = value;
71
- if (type === "TERMINAL" || type === "MANUAL") {
72
- fetchTerminals();
73
- } else if (type === "AUTO") {
74
- fetchFlights();
75
- }
76
- }
77
57
  function close() {
78
58
  on = false;
79
59
  }
@@ -81,7 +61,7 @@ async function fetchFlights() {
81
61
  loading = true;
82
62
  try {
83
63
  flights = await BookingAPI.searchFlights({
84
- iata: airport.iata,
64
+ iata,
85
65
  ymd: arrivalDate.format("YYYY-MM-DD"),
86
66
  time: arrivalDate.hour()
87
67
  });
@@ -92,17 +72,6 @@ async function fetchFlights() {
92
72
  loading = false;
93
73
  }
94
74
  }
95
- async function fetchTerminals() {
96
- try {
97
- loading = true;
98
- terminals = await CommonAPI.getPoiTerminals(airport.code);
99
- } catch (e) {
100
- alert.open({ text: e.message });
101
- terminals = [];
102
- } finally {
103
- loading = false;
104
- }
105
- }
106
75
  async function subtractHour() {
107
76
  arrivalDate = arrivalDate.subtract(1, "hour");
108
77
  fetchFlights();
@@ -137,26 +106,12 @@ function save() {
137
106
  return;
138
107
  }
139
108
  const manualFlight = {
140
- iata: airport.iata ?? null,
109
+ iata,
141
110
  ymd: estimateDate.format("YYYY-MM-DD HH:mm:ss"),
142
111
  name: manualInput,
143
- selectType: "MANUAL",
144
- arrivalTerminal
112
+ selectType: "MANUAL"
145
113
  };
146
114
  resolveFn(manualFlight);
147
- } else if (type === "TERMINAL") {
148
- if (!arrivalTerminal) {
149
- alert.open({ text: $t("flight.selectTerminal") });
150
- return;
151
- }
152
- const terminalFlight = {
153
- iata: airport.iata ?? null,
154
- ymd: estimateDate.format("YYYY-MM-DD HH:mm:ss"),
155
- name: null,
156
- selectType: "MANUAL",
157
- arrivalTerminal
158
- };
159
- resolveFn(terminalFlight);
160
115
  }
161
116
  close();
162
117
  }
@@ -173,160 +128,132 @@ function save() {
173
128
  </div>
174
129
 
175
130
  <div class="contents pdMg">
176
- {#if type === 'TERMINAL'}
131
+ <div class="indie_tab_square_01_wrapper">
132
+ <ul class="indie_tab_square_01">
133
+ {#if iata}
134
+ <li class:on={type === 'AUTO'}><a href={null} on:click={() => (type = 'AUTO')}>{$t('flight.selectFlightNo')}</a></li>
135
+ {/if}
136
+ <li class:on={type === 'MANUAL'}><a href={null} on:click={() => (type = 'MANUAL')}>{$t('flight.editManually')}</a></li>
137
+ </ul>
138
+ </div>
139
+
140
+ {#if type === 'AUTO'}
141
+ <div class="indie_flight_name_top_infos">
142
+ <div class="infos">
143
+ <p class="sbj">{$t('flight.arrivalDate')}</p>
144
+ <p class="date">
145
+ <span>{dayjs(arrivalDate).format('ll')}</span>
146
+ <span>{dayjs(arrivalDate).format('HH:mm')}~{dayjs(arrivalDate).add(1, 'hour').format('HH:mm')}</span>
147
+ </p>
148
+ </div>
149
+ <div class="btns">
150
+ <button type="button" class="indie_btn_squre only prev" on:click={() => subtractHour()}>이전</button>
151
+ <button type="button" class="indie_btn_squre only next" on:click={() => addHour()}>다음</button>
152
+ </div>
153
+ </div>
154
+
177
155
  {#if loading}
178
156
  <div class="indie_loading_common_box">
179
157
  <div class="indie_loader" />
180
158
  </div>
159
+ {:else if !loading && flights.length === 0}
160
+ <div class="indie_search_none_common_box">
161
+ <p>{$t('flight.noFlightsWereFound')}</p>
162
+ </div>
181
163
  {:else}
182
- <select bind:value={arrivalTerminal} class="indie_select_nor w100">
183
- <option value={null}>{$t('flight.selectTerminal')}</option>
184
- {#each terminals as terminal}
185
- <option value={terminal}>{terminal}</option>
186
- {/each}
187
- </select>
188
- {/if}
189
- {:else}
190
- <div class="indie_tab_square_01_wrapper">
191
- <ul class="indie_tab_square_01">
192
- {#if !!airport.iata}
193
- <li class:on={type === 'AUTO'}><a href={null} on:click={() => changeType('AUTO')}>{$t('flight.selectFlightNo')}</a></li>
194
- {/if}
195
- <li class:on={type === 'MANUAL'}><a href={null} on:click={() => changeType('MANUAL')}>{$t('flight.editManually')}</a></li>
196
- </ul>
197
- </div>
164
+ <div bind:this={contentsEl$} class="indie_tab_squre_01_cont" in:fade={{ duration: 100, delay: 100 }}>
165
+ <!-- 항공편 선택 -->
166
+ <ul class="indie_flight_name_select_list">
167
+ {#each flightsByPaging as item (item.name)}
168
+ <li in:fade={{ duration: 100, delay: 100 }}>
169
+ <div class="check">
170
+ <input
171
+ bind:group={flight}
172
+ value={item}
173
+ type="radio"
174
+ class="indie_radio_box xs flight_b"
175
+ name="f_choice"
176
+ id="ch_{item.name}" />
177
+ <label for="ch_{item.name}">
178
+ <p class="flight">{item.name}</p>
179
+ <div class="flight_time_box">
180
+ <dl class="start">
181
+ <dt>{item.departureAirport}</dt>
182
+ <dd>
183
+ <!-- TODO: 검색일 이전날짜인 경우 표현 -->
184
+ {#if dayjs(item.departure).isBefore(arrivalDate, 'day')}
185
+ <b>D-{arrivalDate.diff(dayjs(item.departure).format('YYYY-MM-DD'), 'd')}</b>
186
+ {/if}
187
+ {dayjs(item.departure).format('HH:mm')}
188
+ </dd>
189
+ </dl>
198
190
 
199
- {#if type === 'AUTO'}
200
- <div class="indie_flight_name_top_infos">
201
- <div class="infos">
202
- <p class="sbj">{$t('flight.arrivalDate')}</p>
203
- <p class="date">
204
- <span>{dayjs(arrivalDate).format('ll')}</span>
205
- <span>{dayjs(arrivalDate).format('HH:mm')}~{dayjs(arrivalDate).add(1, 'hour').format('HH:mm')}</span>
206
- </p>
207
- </div>
208
- <div class="btns">
209
- <button type="button" class="indie_btn_squre only prev" on:click={() => subtractHour()}>이전</button>
210
- <button type="button" class="indie_btn_squre only next" on:click={() => addHour()}>다음</button>
211
- </div>
191
+ <dl class="end">
192
+ <dt>{item.arrivalAirport}</dt>
193
+ <dd>{dayjs(item.arrive).format('HH:mm')}</dd>
194
+ </dl>
195
+ </div>
196
+ </label>
197
+ </div>
198
+ </li>
199
+ {/each}
200
+ </ul>
212
201
  </div>
213
202
 
214
- {#if loading}
215
- <div class="indie_loading_common_box">
216
- <div class="indie_loader" />
217
- </div>
218
- {:else if !loading && flights.length === 0}
219
- <div class="indie_search_none_common_box">
220
- <p>{$t('flight.noFlightsWereFound')}</p>
221
- </div>
222
- {:else}
223
- <div bind:this={contentsEl$} class="indie_tab_squre_01_cont" in:fade={{ duration: 100, delay: 100 }}>
224
- <!-- 항공편 선택 -->
225
- <ul class="indie_flight_name_select_list">
226
- {#each flightsByPaging as item (item.name)}
227
- <li in:fade={{ duration: 100, delay: 100 }}>
228
- <div class="check">
229
- <input
230
- bind:group={flight}
231
- value={item}
232
- type="radio"
233
- class="indie_radio_box xs flight_b"
234
- name="f_choice"
235
- id="ch_{item.name}" />
236
- <label for="ch_{item.name}">
237
- <p class="flight">{item.name}</p>
238
- <div class="flight_time_box">
239
- <dl class="start">
240
- <dt>{item.departureAirport}</dt>
241
- <dd>
242
- <!-- TODO: 검색일 이전날짜인 경우 표현 -->
243
- {#if dayjs(item.departure).isBefore(arrivalDate, 'day')}
244
- <b>D-{arrivalDate.diff(dayjs(item.departure).format('YYYY-MM-DD'), 'd')}</b>
245
- {/if}
246
- {dayjs(item.departure).format('HH:mm')}
247
- </dd>
248
- </dl>
249
-
250
- <dl class="end">
251
- <dt>{item.arrivalAirport}</dt>
252
- <dd>{dayjs(item.arrive).format('HH:mm')}</dd>
253
- </dl>
254
- </div>
255
- </label>
256
- </div>
257
- </li>
258
- {/each}
259
- </ul>
203
+ <div class="indie_flight_paing_box" in:fade={{ duration: 100, delay: 100 }}>
204
+ <div class="indie_paging_b">
205
+ <button
206
+ type="button"
207
+ class="pg_left"
208
+ style:visibility={page > 1 ? 'visible' : 'hidden'}
209
+ on:click={() => (page = page > 1 ? page - 1 : page)}>이전</button>
210
+ <input readonly type="text" class="txt_paging" value={page} />
211
+ <span>/</span>
212
+ <span class="last">{totalPage}</span>
213
+ <button
214
+ type="button"
215
+ class="pg_right"
216
+ style:visibility={page < totalPage ? 'visible' : 'hidden'}
217
+ on:click={() => (page = page < totalPage ? page + 1 : page)}>
218
+ 다음
219
+ </button>
260
220
  </div>
221
+ </div>
222
+ {/if}
223
+ {:else if type === 'MANUAL'}
224
+ <div class="indie_tab_squre_01_cont">
225
+ <!-- 항공편 직접입력 -->
226
+ <input bind:value={manualInput} maxlength="15" type="text" class="indie_text_nor lg w100 mgt10" placeholder={$t('flight.flightNo')} />
261
227
 
262
- <div class="indie_flight_paing_box" in:fade={{ duration: 100, delay: 100 }}>
263
- <div class="indie_paging_b">
264
- <button
265
- type="button"
266
- class="pg_left"
267
- style:visibility={page > 1 ? 'visible' : 'hidden'}
268
- on:click={() => (page = page > 1 ? page - 1 : page)}>이전</button>
269
- <input readonly type="text" class="txt_paging" value={page} />
270
- <span>/</span>
271
- <span class="last">{totalPage}</span>
272
- <button
273
- type="button"
274
- class="pg_right"
275
- style:visibility={page < totalPage ? 'visible' : 'hidden'}
276
- on:click={() => (page = page < totalPage ? page + 1 : page)}>
277
- 다음
278
- </button>
279
- </div>
280
- </div>
281
- {/if}
282
- {:else if type === 'MANUAL'}
283
- <div class="indie_tab_squre_01_cont">
284
- <!-- 항공편 직접입력 -->
285
- <input bind:value={manualInput} maxlength="15" type="text" class="indie_text_nor w100 mgt10" placeholder={$t('flight.flightNo')} />
228
+ <div class="indie_flight_direct_input">
229
+ <p class="tit">{$t('flight.estimatedTimeOfArrival')}</p>
286
230
 
287
- {#if loading}
288
- <div class="indie_loading_common_box">
289
- <div class="indie_loader" />
231
+ <div class="gather_box">
232
+ <div class="da_select_box">
233
+ <button type="button" class="indie_btn_squre only prev" on:click={() => subtractDay()}>이전</button>
234
+ <p class="date">{dayjs(estimateDate).format('YYYY.MM.DD')}</p>
235
+ <button type="button" class="indie_btn_squre only next" on:click={() => addDay()}>다음</button>
290
236
  </div>
291
- {:else}
292
- <select bind:value={arrivalTerminal} class="indie_select_nor w100 mgt5">
293
- <option value={null}>{$t('flight.selectTerminal')}</option>
294
- {#each terminals as terminal}
295
- <option value={terminal}>{terminal}</option>
296
- {/each}
297
- </select>
298
- {/if}
299
-
300
- <div class="indie_flight_direct_input">
301
- <p class="tit">{$t('flight.estimatedTimeOfArrival')}</p>
302
-
303
- <div class="gather_box">
304
- <div class="da_select_box">
305
- <button type="button" class="indie_btn_squre only prev" on:click={() => subtractDay()}>이전</button>
306
- <p class="date">{dayjs(estimateDate).format('YYYY.MM.DD')}</p>
307
- <button type="button" class="indie_btn_squre only next" on:click={() => addDay()}>다음</button>
308
- </div>
309
- <div class="indie_time_select_box triangle lg">
310
- <select bind:value={hour} on:change={() => onChangeEstimateTime()}>
311
- {#each range(0, 24, 1) as h}
312
- <option value={h}>{padStart(`${h}`, 2, '0')}</option>
313
- {/each}
314
- </select>
315
- <span>:</span>
316
- <select bind:value={minute} on:change={() => onChangeEstimateTime()}>
317
- {#each range(0, 60, 1) as m}
318
- <option value={m}>{padStart(`${m}`, 2, '0')}</option>
319
- {/each}
320
- </select>
321
- </div>
237
+ <div class="indie_time_select_box triangle lg">
238
+ <select bind:value={hour} on:change={() => onChangeEstimateTime()}>
239
+ {#each range(0, 24, 1) as h}
240
+ <option value={h}>{padStart(`${h}`, 2, '0')}</option>
241
+ {/each}
242
+ </select>
243
+ <span>:</span>
244
+ <select bind:value={minute} on:change={() => onChangeEstimateTime()}>
245
+ {#each range(0, 60, 1) as m}
246
+ <option value={m}>{padStart(`${m}`, 2, '0')}</option>
247
+ {/each}
248
+ </select>
322
249
  </div>
250
+ </div>
323
251
 
324
- <div class="indie_exclamation_mark_box sm black">
325
- <p class="normal">{$t('flight.directly')}</p>
326
- </div>
252
+ <div class="indie_exclamation_mark_box sm black">
253
+ <p class="normal">{$t('flight.directly')}</p>
327
254
  </div>
328
255
  </div>
329
- {/if}
256
+ </div>
330
257
  {/if}
331
258
  </div>
332
259