-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck-in-announce.html
More file actions
568 lines (501 loc) · 27.9 KB
/
Copy pathcheck-in-announce.html
File metadata and controls
568 lines (501 loc) · 27.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./css/mypage.css?v=1.0.1">
<link rel="stylesheet" href="./css/check-in.css?v=20260731-entry-time">
<link rel="stylesheet" href="./css/bottom2.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Sans+KR:wght@300;400;500;700&display=swap"
rel="stylesheet">
<script src="https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js"></script>
<script src="./js/auth.js" type="text/javascript"></script>
<script src="./js/auth-guard.js" type="text/javascript"></script>
<script src="./js/store.js?v=20260731-entry-time" type="text/javascript"></script>
<script src="./js/engine.js" type="text/javascript"></script>
<title>입장하기 | 스마트팩토리</title>
<link rel="manifest" href="./manifest.json">
<meta name="theme-color" content="#09031f">
<link rel="apple-touch-icon" href="./icons/icon-192x192.png">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<script src="./js/pwa.js?v=20260731-pwa-v8" defer></script>
</head>
<body>
<div class="main-wrap">
<main class="main-mypage">
<!-- Header -->
<div class="fixed-header-wrap">
<div class="menu-bar mypage">
<div><i class="bi bi-chevron-left back"></i><span>입장하기</span></div>
</div>
</div>
<!-- Profile Info Box -->
<div class="check-in-box">
<img class="icon" src="./images/k-icon_150x150.png" id="info-icon">
<span class="brand-name" id="info-brand">AFood</span>
<div class="tx-color" id="info-work-title">김치만들기</div>
</div>
<div class="check-in-rail">
<div><i class="bi bi-map"></i> 주소</div>
</div>
<div class="mypage-box2 notice-write">
<div id="info-address">서울시 성동구 성수동 1층 AFood</div>
</div>
<div class="check-in-rail">
<div><i class="bi bi-map"></i> 오늘 나의 예약</div>
</div>
<div class="mypage-box2 notice-write" id="today-reservation-box">
<div class="box-corp res-date-box">
<span class="res-date-time">6월 22일</span>
<span class="res-date-time">월요일</span>
</div>
<div class="box-corp res-time-box">
<span class="res-date-time">10:00 ~ 12:00</span>
</div>
<div class="box-value res-job-box">
<div class="res-job-box2">
<div class="res-sm">시급 <i class="bi bi-caret-up-fill"></i> 1.3배 <span class="money-num">₩</span><span class="money-num">13,416</span></div>
</div>
<div>
<span class="box-time">2h</span>
<span class="">일반</span>
</div>
</div>
<div class="box-value res-btn-box reverse">
<button type="button" class="res-check-in-btn" onclick="enterWorkPlace('kimp_virt2.html', 1)">입장하기</button>
<button type="button" class="res-cancel-btn" onclick="">예약 취소</button>
</div>
</div>
<div class="check-in-rail">
<div><i class="bi bi-map"></i> 실내 지도 안내</div>
</div>
<div class="svg-map">
<img
id="work-map-image"
src="./images/work-map-kimchi.svg"
alt="김치 작업장 실내 지도"
style="display:block; width:100%; height:auto; border-radius:8px; background:#1a1a35;"
>
</div>
<div style="margin:35px 0px;"></div>
<div class="check-in-rail">
<div><i class="bi bi-map"></i> 안내 사항</div>
</div>
<div class="mypage-box2 notice-write">
<div>10분전 부터 입장가능합니다.</div>
<div>일찍 도착하셨다면 휴게실에서 쉬고 계시면 됨니다.☕🍹</div>
<div> 단정한 차림으로 입장해주세요. 😀😊</div>
</div>
</main>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
<script src="./js/jquery-3.7.1.min.js"></script>
<script src="./js/simulator.js" type="text/javascript"></script>
<script>
let currentUser = null;
let workerProfile = null;
let currentEntryReservation = null;
function escapeEntryText(value) {
return String(value || '')
.replace(/&/g, '&')
.replace(/</g, '<')
.replace(/>/g, '>')
.replace(/"/g, '"');
}
function getEntryTimeGate(reservation, now) {
if (window.MockData && typeof window.MockData.getReservationEntryStatus === 'function') {
return window.MockData.getReservationEntryStatus(reservation, now);
}
return { enabled: false, allowed: true, code: 'feature_disabled', message: '' };
}
// Load initial user session
$(document).ready(function () {
// Back Navigation
$('.bi-chevron-left.back').click(function () {
history.back();
});
// Initialize user details
initUserSession();
});
function initUserSession() {
currentUser = window.AuthManager ? window.AuthManager.getCurrentUser() : null;
if (!currentUser) {
const userJson = sessionStorage.getItem("user");
if (userJson) {
currentUser = JSON.parse(userJson);
}
}
if (!currentUser) {
alert("로그인이 필요합니다.");
window.location.href = "./login.html";
return;
}
// Render basic profile info
$('#user-name-display').text(currentUser.name + ' 님');
$('#user-email-display').text(currentUser.email);
// Avatar initials
const initials = currentUser.name ? currentUser.name.substring(0, 2) : 'US';
$('#user-avatar-initials').text(initials);
// Fetch worker profile (Kimchi making)
let profileStr = sessionStorage.getItem("kimp_worker_profile");
if (profileStr) {
workerProfile = JSON.parse(profileStr);
} else {
workerProfile = getDefaultProfileByName(currentUser.name);
sessionStorage.setItem("kimp_worker_profile", JSON.stringify(workerProfile));
}
// Sync with FactoryStore
if (FactoryStore.getState().workedHours === 0 && workerProfile.workedHours > 0) {
FactoryStore.dispatch({ type: 'SET_WORKED_HOURS', payload: workerProfile.workedHours });
}
if (FactoryStore.getState().history.length === 0) {
const defaultHistory = getDefaultHistoryByName(currentUser.name);
FactoryStore.dispatch({ type: 'SET_HISTORY', payload: defaultHistory });
}
// Seed mock reservation in store if not present
let db = FactoryStore.getState().reservations;
const hasMockRes = db.some(r => r.date === "2026-06-17" && r.slot === 0 && (String(r.userId) === String(currentUser.id) || r.userName === currentUser.name));
if (!hasMockRes) {
let role = 'general';
if (currentUser.name === '최현일') role = 'manager';
else if (currentUser.name === '김영희') role = 'helper';
const newId = db.length > 0 ? Math.max.apply(null, db.map(r => r.id)) + 1 : 1;
FactoryStore.dispatch({
type: 'ADD_RESERVATION',
payload: {
id: newId,
userId: currentUser.id,
userName: currentUser.name,
date: "2026-06-17",
slot: 0,
role: role,
ratio: 1.2
}
});
}
if (FactoryStore.getState().udonHours === 0) {
let defH = 0;
if (currentUser.name === '최현일') defH = 150;
else if (currentUser.name === '최수아') defH = 40;
else if (currentUser.name === '김수민') defH = 5;
else if (currentUser.name === '김영희') defH = 35;
FactoryStore.dispatch({ type: 'SET_UDON_HOURS', payload: defH });
}
if (FactoryStore.getState().walletHours === 0) {
let defH = 0;
if (currentUser.name === '최현일') defH = 125;
else if (currentUser.name === '최수아') defH = 10;
else if (currentUser.name === '김수민') defH = 0;
else if (currentUser.name === '김영희') defH = 30;
FactoryStore.dispatch({ type: 'SET_WALLET_HOURS', payload: defH });
}
// Subscribe to store updates to dynamically trigger re-renders
FactoryStore.subscribe(function() {
workerProfile.workedHours = FactoryStore.getState().workedHours;
});
// 오늘 나의 예약 렌더링 호출
renderTodayReservation();
setInterval(renderTodayReservation, 1000);
window.addEventListener('storage', renderTodayReservation);
}
function renderTodayReservation() {
let res = null;
const saved = sessionStorage.getItem('selected_reservation');
if (saved) {
try {
res = JSON.parse(saved);
} catch(e) {}
}
// 만약 선택된 예약 정보가 없다면, 로그인한 유저의 예약 리스트 중 첫 번째 항목을 사용
if (!res) {
let db = (window.FactoryStore && typeof window.FactoryStore.getReservations === 'function')
? window.FactoryStore.getReservations()
: (FactoryStore.getState().reservations || []);
// 중복 제거
let uniqueDbMap = {};
db.forEach(r => {
const key = r.date + '_' + r.slot + '_' + r.userId;
uniqueDbMap[key] = r;
});
db = Object.values(uniqueDbMap);
const myReservations = db.filter(r => String(r.userId) === String(currentUser.id) || r.userName === currentUser.name);
if (myReservations.length > 0) {
res = myReservations[0];
}
}
const container = $('#today-reservation-box');
if (!res) {
container.html('<div class="empty-state" style="padding: 20px; text-align: center; color: var(--text-sub); font-size: 13px;">오늘 예약된 일정이 없습니다.</div>');
return;
}
currentEntryReservation = res;
const parts = res.date.split('-');
let dayName = '';
if (parts.length === 3) {
const d = new Date(parseInt(parts[0]), parseInt(parts[1]) - 1, parseInt(parts[2]));
const dayNames = ['일요일', '월요일', '화요일', '수요일', '목요일', '금요일', '토요일'];
dayName = dayNames[d.getDay()];
}
const workId = Number(res.workId || 1);
const fallbackSlotLabels = (window.MockData && typeof window.MockData.getDefaultSlotLabels === 'function' ? window.MockData.getDefaultSlotLabels() : ['10:00 ~ 12:00', '13:00 ~ 15:00', '15:00 ~ 17:00']);
let selectedSlot = null;
let workTimeSlots = null;
if (window.MockData && typeof window.MockData.getWorkTimeSlots === 'function') {
workTimeSlots = window.MockData.getWorkTimeSlots(workId);
if (workTimeSlots && Array.isArray(workTimeSlots.slots)) {
selectedSlot = workTimeSlots.slots.find(slot => String(slot.slot) === String(res.slot));
}
}
const slotText = selectedSlot ? selectedSlot.time : (fallbackSlotLabels[res.slot] || '지정 시간');
const roleLabel = res.role === 'helper' ? '헬퍼' : (res.role === 'manager' ? '매니저' : '일반');
const badgeClass = res.role === 'helper' ? 'badge02' : (res.role === 'manager' ? 'badge03' : 'badge01');
const ratio = res.ratio ? Number(res.ratio) : 1.2;
const displayRatio = ratio.toFixed(1);
const baseHourlyWage = (window.MockData && typeof window.MockData.getMinimumHourlyWage === 'function' ? window.MockData.getMinimumHourlyWage() : 10320);
const calculatedWage = Math.floor(baseHourlyWage * ratio);
// workId 기반으로 동적 정보 매핑
let workTitle = "김치만들기";
let brandName = "AFood";
let iconUrl = "./images/k-icon_150x150.png";
let workHoursLabel = workTimeSlots && workTimeSlots.type ? workTimeSlots.type : "2h";
let expPage = "kimp_virt2.html"; // 기본 가상체험 입장 페이지
let addressStr = "서울시 성동구 성수동";
try {
const worksList = (window.FactoryStore && typeof window.FactoryStore.getWorks === 'function')
? window.FactoryStore.getWorks()
: JSON.parse(window.MockData.worksJSON);
const workObj = worksList.find(w => w.workId == workId);
if (workObj) {
workTitle = workObj.workName;
brandName = workObj.brandName;
iconUrl = workObj.iconUrl;
}
const detailMap = (window.FactoryStore && typeof window.FactoryStore.getWorkDetails === 'function')
? window.FactoryStore.getWorkDetails()
: JSON.parse(window.MockData.workDetailJSON);
const detail = detailMap[String(workId)];
if (detail) {
if (detail.stats && detail.stats.address) {
addressStr = detail.stats.address;
}
if (detail.expPage) {
// 만약 실제 일 체험 페이지가 등록되어 있으면 해당 페이지로 입장
expPage = detail.expPage;
}
const workTime = detail.workTime || "";
if (workTime.includes("1시간 30분")) {
workHoursLabel = "1.5h";
} else if (workTime.includes("1시간")) {
workHoursLabel = "1h";
} else if (workTime.includes("2시간")) {
workHoursLabel = "2h";
}
}
} catch(e) {}
// 우동 작업은 출근 전 준비 절차를 먼저 진행한다.
if (workId === 2) {
expPage = "uton_before.html";
}
// 실제 근무용 작업자 페이지가 등록되어 있으면 체험 페이지 대신 사용한다.
try {
const worksListW = (window.FactoryStore && typeof window.FactoryStore.getWorks === 'function')
? window.FactoryStore.getWorks()
: JSON.parse(window.MockData.worksJSON);
const workObjW = worksListW.find(w => w.workId == workId);
if (workObjW && workObjW.workerLink) {
expPage = workObjW.workerLink;
}
} catch(e) {}
// 매니저 역할인 경우, managerLink로 입장
if (res.role === 'manager') {
try {
const worksList2 = (window.FactoryStore && typeof window.FactoryStore.getWorks === 'function')
? window.FactoryStore.getWorks()
: JSON.parse(window.MockData.worksJSON);
const workObj2 = worksList2.find(w => w.workId == workId);
if (workObj2 && workObj2.managerLink) {
expPage = workObj2.managerLink;
}
} catch(e) {}
}
// 김치만들기 업무는 역할이나 저장된 링크와 관계없이 새 작업 페이지로 입장한다.
if (workId === 1) {
expPage = "kimp_virt2.html";
}
// 상단 Profile Info Box 업데이트
$('#info-icon').attr('src', iconUrl);
$('#info-brand').text(brandName);
$('#info-work-title').text(workTitle);
$('#info-address').text(addressStr + " 1층 " + brandName);
$('#work-map-image')
.attr('src', workId === 2 ? './images/work-map-uton.svg' : './images/work-map-kimchi.svg')
.attr('alt', workId === 2 ? 'Uton Shop 실내 지도' : '김치 작업장 실내 지도');
const entryGate = getEntryTimeGate(res);
const entryBlocked = entryGate.enabled && !entryGate.allowed;
const entryButtonLabel = entryBlocked ? '입장 시간 아님' : '입장하기';
const entryGateHtml = entryGate.enabled
? `<div class="entry-time-gate ${entryGate.allowed ? 'allowed' : 'blocked'}"><i class="bi ${entryGate.allowed ? 'bi-check-circle-fill' : 'bi-clock-fill'}"></i> ${escapeEntryText(entryGate.message)}</div>`
: '';
let html = `
<div class="box-corp res-date-box">
<span class="res-date-time">${parts[1]}월 ${parts[2]}일</span>
<span class="res-date-time">${dayName}</span>
</div>
<div class="box-corp res-time-box">
<span class="res-date-time">${slotText}</span>
</div>
<div class="box-value res-job-box">
<div class="res-job-box2">
<div class="res-sm">시급 <i class="bi bi-caret-up-fill"></i> ${displayRatio}배 <span class="money-num">₩</span><span class="money-num">${calculatedWage.toLocaleString()}</span></div>
</div>
<div>
<span class="box-time">${workHoursLabel}</span>
<span class="${badgeClass}">${roleLabel}</span>
</div>
</div>
<div class="box-value res-btn-box reverse">
<button type="button" class="res-check-in-btn" onclick="enterWorkPlace('${expPage}', ${workId})" ${entryBlocked ? 'disabled aria-disabled="true"' : ''}>${entryButtonLabel}</button>
<button type="button" class="res-cancel-btn" onclick="cancelReservationInAnnounce(${res.id})">예약 취소</button>
</div>
${entryGateHtml}
`;
container.html(html);
}
/**
* 실제 근무 출근 입장.
* store.js 에 '실제 근무' 진입 모드를 저장해 두어, 위생체크 페이지
* (kimp_virt2.html) 다음 단계에서 체험 페이지(kimp_ex0.html)가 아닌
* 실제 근무 페이지(kimp_ex1.html)로 가도록 한다.
*/
function enterWorkPlace(page, workId) {
const reservation = currentEntryReservation;
const entryGate = getEntryTimeGate(reservation);
if (entryGate.enabled && !entryGate.allowed) {
alert(entryGate.message || '예약 시작 10분 전부터 입장할 수 있습니다.');
renderTodayReservation();
return;
}
if (entryGate.enabled && window.MockData && typeof window.MockData.grantRealWorkEntry === 'function') {
const grant = window.MockData.grantRealWorkEntry(reservation, workId || 1);
if (!grant.allowed) {
alert(grant.message || '입장 권한을 확인하지 못했습니다.');
return;
}
if (reservation && window.FactoryStore && typeof window.FactoryStore.dispatch === 'function') {
const checkedInAt = new Date().toISOString();
window.FactoryStore.dispatch({
type: 'UPDATE_RESERVATION',
payload: {
id: reservation.id,
match: {
userId: reservation.userId,
workId: reservation.workId,
date: reservation.date,
slot: reservation.slot
},
changes: {
workStatus: 'ready',
checkInAt: reservation.checkInAt || checkedInAt,
workStartedAt: reservation.workStartedAt || checkedInAt,
lastActivityAt: checkedInAt
}
}
});
const updated = window.FactoryStore.getReservations({ userId: reservation.userId })
.find(item => String(item.id) === String(reservation.id));
if (updated) {
currentEntryReservation = updated;
sessionStorage.setItem('selected_reservation', JSON.stringify(updated));
}
}
}
if (window.MockData && typeof window.MockData.setWorkEntryContext === 'function') {
window.MockData.setWorkEntryContext(workId || 1, 'real');
}
window.location.href = page;
}
function cancelReservationInAnnounce(id) { if (!confirm("해당 예약을 정말 취소하시겠습니까?")) return;
let db = FactoryStore.getState().reservations;
const targetRes = db.find(r => r.id === id);
const updatedReservations = db.filter(r => r.id !== id);
FactoryStore.dispatch({ type: 'SET_RESERVATIONS', payload: updatedReservations });
try {
let kimpDb = JSON.parse(localStorage.getItem('app_reservations_db') || '[]');
if (kimpDb && kimpDb.length > 0) {
const filteredKimpDb = kimpDb.filter(r => r.id !== id);
localStorage.setItem('app_reservations_db', JSON.stringify(filteredKimpDb));
}
} catch(e) {}
if (targetRes && typeof window.addAppLog === 'function') {
const fallbackSlotLabels = (window.MockData && typeof window.MockData.getDefaultSlotLabels === 'function' ? window.MockData.getDefaultSlotLabels() : ['10:00 ~ 12:00', '13:00 ~ 15:00', '15:00 ~ 17:00']);
const fallback = targetRes.time || targetRes.slotLabel || fallbackSlotLabels[Number(targetRes.slot)] || '지정 시간';
const slotText = window.MockData && typeof window.MockData.formatWorkSlotTime === 'function'
? window.MockData.formatWorkSlotTime(targetRes.workId || 1, targetRes.slot, fallback)
: fallback;
let workTitle = "김치만들기";
try {
const worksList = (window.FactoryStore && typeof window.FactoryStore.getWorks === 'function')
? window.FactoryStore.getWorks()
: JSON.parse(window.MockData.worksJSON);
const workObj = worksList.find(w => w.workId == (targetRes.workId || 1));
if (workObj) workTitle = workObj.workName;
} catch(e) {}
window.addAppLog(`${workTitle} 공정 예약을 취소하였습니다. (${targetRes.date} ${slotText})`);
}
sessionStorage.removeItem('selected_reservation');
alert("예약이 정상적으로 취소되었습니다.");
renderTodayReservation();
}
function getDefaultProfileByName(name) {
if (name === '최현일') {
return { userId: 1, userName: "최현일", healthCertificateImage: "choi_cert.png", healthCertificateStatus: "approved", workedHours: 133 };
} else if (name === '최수아') {
return { userId: 2, userName: "최수아", healthCertificateImage: "sua_cert.png", healthCertificateStatus: "approved", workedHours: 22 };
} else if (name === '김수민') {
return { userId: 3, userName: "김수민", healthCertificateImage: null, healthCertificateStatus: null, workedHours: 0 };
} else if (name === '김영희') {
return { userId: 4, userName: "김영희", healthCertificateImage: "younghee_cert.png", healthCertificateStatus: "approved", workedHours: 45 };
}
return { userId: "guest", userName: name || "손님", healthCertificateImage: null, healthCertificateStatus: null, workedHours: 5 };
}
function getDefaultHistoryByName(name) {
const today = new Date();
const formatDate = (daysAgo) => {
const d = new Date();
d.setDate(today.getDate() - daysAgo);
return d.getFullYear() + "-" + String(d.getMonth() + 1).padStart(2, '0') + "-" + String(d.getDate()).padStart(2, '0');
};
if (name === '최현일') {
return [
{ date: formatDate(1), job: "지갑만들기", role: "매니저", pay: 220000, status: "완료" },
{ date: formatDate(3), job: "우동만들기", role: "매니저", pay: 190000, status: "완료" },
{ date: formatDate(5), job: "김치만들기", role: "매니저", pay: 180000, status: "완료" }
];
} else if (name === '최수아') {
return [
{ date: formatDate(2), job: "우동만들기", role: "헬퍼", pay: 110000, status: "완료" },
{ date: formatDate(6), job: "지갑만들기", role: "일반", pay: 50000, status: "완료" },
{ date: formatDate(10), job: "김치만들기", role: "일반", pay: 45000, status: "완료" }
];
} else if (name === '김수민') {
return [
{ date: formatDate(4), job: "우동만들기", role: "일반", pay: 45000, status: "완료" }
];
} else if (name === '김영희') {
return [
{ date: formatDate(1), job: "지갑만들기", role: "헬퍼", pay: 120000, status: "완료" },
{ date: formatDate(3), job: "우동만들기", role: "헬퍼", pay: 110000, status: "완료" },
{ date: formatDate(8), job: "김치만들기", role: "헬퍼", pay: 115000, status: "완료" }
];
}
return [
{ date: formatDate(2), job: "김치만들기", role: "일반", pay: 40000, status: "완료" }
];
}
</script>
</body>
</html>