@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.
- package/.svelte-kit/__package__/i18n/locales/en.json +1 -3
- package/.svelte-kit/__package__/i18n/locales/ko.json +1 -3
- package/.svelte-kit/__package__/i18n/locales/vi.json +1 -3
- package/.svelte-kit/__package__/i18n/locales/zh-cn.json +1 -3
- package/.svelte-kit/__package__/i18n/locales/zh-tw.json +1 -3
- package/.svelte-kit/__package__/schedule-view/BookingInfo.svelte +14 -47
- package/.svelte-kit/__package__/schedule-view/Schedule.svelte +30 -22
- package/.svelte-kit/__package__/schedule-view/api/common/index.d.ts +0 -1
- package/.svelte-kit/__package__/schedule-view/api/common/index.js +0 -9
- package/.svelte-kit/__package__/schedule-view/assets/scss/indie_booking.scss +1 -58
- package/.svelte-kit/__package__/schedule-view/components/flight-search/FlightSearch.svelte +120 -193
- package/.svelte-kit/__package__/schedule-view/components/flight-search/FlightSearch.svelte.d.ts +2 -10
- package/.svelte-kit/__package__/schedule-view/stores/booking.d.ts +0 -2
- package/.svelte-kit/__package__/schedule-view/stores/booking.js +0 -2
- package/.svelte-kit/__package__/schedule-view/types/flight.d.ts +1 -1
- package/.svelte-kit/generated/server/internal.js +1 -1
- package/dist/i18n/locales/en.json +1 -3
- package/dist/i18n/locales/ko.json +1 -3
- package/dist/i18n/locales/vi.json +1 -3
- package/dist/i18n/locales/zh-cn.json +1 -3
- package/dist/i18n/locales/zh-tw.json +1 -3
- package/dist/schedule-view/BookingInfo.svelte +14 -47
- package/dist/schedule-view/Schedule.svelte +30 -22
- package/dist/schedule-view/api/common/index.d.ts +0 -1
- package/dist/schedule-view/api/common/index.js +0 -9
- package/dist/schedule-view/assets/scss/indie_booking.scss +1 -58
- package/dist/schedule-view/components/flight-search/FlightSearch.svelte +120 -193
- package/dist/schedule-view/components/flight-search/FlightSearch.svelte.d.ts +2 -10
- package/dist/schedule-view/stores/booking.d.ts +0 -2
- package/dist/schedule-view/stores/booking.js +0 -2
- package/dist/schedule-view/types/flight.d.ts +1 -1
- package/package.json +1 -1
- package/src/lib/i18n/locales/en.json +1 -3
- package/src/lib/i18n/locales/ko.json +1 -3
- package/src/lib/i18n/locales/vi.json +1 -3
- package/src/lib/i18n/locales/zh-cn.json +1 -3
- package/src/lib/i18n/locales/zh-tw.json +1 -3
- package/src/lib/schedule-view/BookingInfo.svelte +15 -49
- package/src/lib/schedule-view/Schedule.svelte +31 -23
- package/src/lib/schedule-view/api/common/index.ts +0 -10
- package/src/lib/schedule-view/assets/scss/indie_booking.scss +1 -58
- package/src/lib/schedule-view/components/flight-search/FlightSearch.svelte +126 -208
- package/src/lib/schedule-view/stores/booking.ts +0 -6
- package/src/lib/schedule-view/types/flight.ts +1 -1
- package/src/routes/development/+page.svelte +1 -1
- 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
|
|
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
|
-
|
|
49
|
-
|
|
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
|
-
|
|
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 $
|
|
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
|
-
{
|
|
212
|
-
|
|
213
|
-
.
|
|
214
|
-
|
|
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
|
-
{
|
|
229
|
-
|
|
230
|
-
.
|
|
231
|
-
|
|
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 {
|
|
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
|
-
|
|
188
|
-
|
|
189
|
-
|
|
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
|
-
|
|
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>
|
|
@@ -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:
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
changeType("TERMINAL");
|
|
48
|
+
if (iata) {
|
|
49
|
+
type = "AUTO";
|
|
50
|
+
fetchFlights();
|
|
59
51
|
} else {
|
|
60
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
-
<
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
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
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
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
|
-
{
|
|
215
|
-
<div class="
|
|
216
|
-
<
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
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
|
-
|
|
263
|
-
|
|
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
|
-
|
|
288
|
-
<div class="
|
|
289
|
-
<
|
|
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
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
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
|
-
|
|
325
|
-
|
|
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
|
-
|
|
256
|
+
</div>
|
|
330
257
|
{/if}
|
|
331
258
|
</div>
|
|
332
259
|
|