Update functionality

master
Gilang R 2025-03-10 13:09:29 +07:00
parent 4165738f37
commit 61e4e44767
Signed by: sinyo1015
GPG Key ID: D40305586B71891C
2 changed files with 95 additions and 36 deletions

View File

@ -17,57 +17,113 @@
"schedules": [ "schedules": [
{ {
"departure_datetime": "2024-12-08 20:00:00", "departure_datetime": "2025-03-10 21:00:00",
"dock_name": "Dermaga 1",
"destination": "Kupal - Laiwui - Jojame - Jikotamo - Madopolo - Kawasi",
"status": 4,
"company_code": "AKSPL",
"ship_name": "KM. AKSAR SAPUTRA 07"
},
{
"departure_datetime": "2024-12-08 21:00:00",
"dock_name": "Dermaga 1",
"destination": "Babang",
"status": 2,
"company_code": "UKIT",
"ship_name": "KM. SATRIA 99 EXPRESS"
},
{
"departure_datetime": "2024-12-09 21:00:00",
"dock_name": "Dermaga 1", "dock_name": "Dermaga 1",
"destination": "Babang", "destination": "Babang",
"status": 0, "status": 0,
"company_code": "UKIT", "company_code": "UKIT",
"ship_name": "KM. UKI RAYA 05" "ship_name": "KM. MEKAR TERATAI"
}, },
{ {
"departure_datetime": "2024-12-09 20:00:00", "departure_datetime": "2025-03-11 21:00:00",
"dock_name": "Dermaga 1", "dock_name": "Dermaga 1",
"destination": "Kupal - Jojame - Jikotamo", "destination": "LOLEO JAYA - MANO",
"status": 0,
"company_code": "ASL",
"ship_name": "KM. AJUL SAFIKRAN 02"
},
{
"departure_datetime": "2025-03-11 21:00:00",
"dock_name": "Dermaga 1",
"destination": "BABANG",
"status": 0,
"company_code": "UKIT",
"ship_name": "KM. SATRIA 99 EXPRESS"
},
{
"departure_datetime": "2025-03-11 21:00:00",
"dock_name": "Dermaga 1",
"destination": "KUPAL - KAWASI",
"status": 0,
"company_code": "POM",
"ship_name": "KM. INTIM TERATAI"
},
{
"departure_datetime": "2025-03-12 20:00:00",
"dock_name": "Dermaga 1",
"destination": "KUPAL - KAWASI",
"status": 0,
"company_code": "ASL",
"ship_name": "KM. ELIZABETH III"
},
{
"departure_datetime": "2025-03-12 20:00:00",
"dock_name": "Dermaga 1",
"destination": "BABANG",
"status": 0,
"company_code": "TML",
"ship_name": "KM. MARIN TERATAI"
},
{
"departure_datetime": "2025-03-13 21:00:00",
"dock_name": "Dermaga 1",
"destination": "BABANG",
"status": 0,
"company_code": "AKSPL",
"ship_name": "KM. BUNDA MARIA"
},
{
"departure_datetime": "2025-03-13 21:00:00",
"dock_name": "Dermaga 1",
"destination": "KUPAL - KAWASI",
"status": 0,
"company_code": "IPM",
"ship_name": "KM. SANDRA JAYA 02"
},
{
"departure_datetime": "2025-03-14 21:00:00",
"dock_name": "Dermaga 1",
"destination": "BABANG",
"status": 0,
"company_code": "UKIT",
"ship_name": "KM. MEKAR TERATAI"
},
{
"departure_datetime": "2025-03-15 21:00:00",
"dock_name": "Dermaga 1",
"destination": "BABANG",
"status": 0,
"company_code": "UKIT",
"ship_name": "KM. SATRIA 99 EXPRESS"
},
{
"departure_datetime": "2025-03-15 21:00:00",
"dock_name": "Dermaga 1",
"destination": "KUPAL - JIKOTAMO",
"status": 0, "status": 0,
"company_code": "POM", "company_code": "POM",
"ship_name": "KM. OBI PERMAI" "ship_name": "KM. OBI PERMAI"
}, },
{ {
"departure_datetime": "2024-12-10 21:00:00", "departure_datetime": "2025-03-16 20:00:00",
"dock_name": "Dermaga 1", "dock_name": "Dermaga 1",
"destination": "Babang", "destination": "BABANG",
"status": 0, "status": 0,
"company_code": "UKIT", "company_code": "TML",
"ship_name": "KM. SATRIA 99 EXPRESS" "ship_name": "KM. MARIN TERATAI"
}, },
{ {
"departure_datetime": "2024-12-11 21:00:00", "departure_datetime": "2025-03-17 21:00:00",
"dock_name": "Dermaga 1", "dock_name": "Dermaga 1",
"destination": "Babang", "destination": "BABANG",
"status": 0, "status": 0,
"company_code": "UKIT", "company_code": "AKSPL",
"ship_name": "KM. UKI RAYA 05" "ship_name": "KM. BUNDA MARIA"
}, },
{ {
"departure_datetime": "2024-12-11 21:00:00", "departure_datetime": "2025-03-17 21:00:00",
"dock_name": "Dermaga 1", "dock_name": "Dermaga 1",
"destination": "Kupal - Jojame - Jikotamo - Kawasi", "destination": "KUPAL - KAWASI",
"status": 0, "status": 0,
"company_code": "POM", "company_code": "POM",
"ship_name": "KM. INTIM TERATAI" "ship_name": "KM. INTIM TERATAI"

View File

@ -173,7 +173,7 @@ export function Index() {
*/ */
setInterval(() => { setInterval(() => {
const _clock = dayjs().format("HH:mm:ss"); const _clock = dayjs().format("HH:mm:ss");
const _date = dayjs().format("DD MMM YYYY"); const _date = dayjs().format("ddd, DD MMM YYYY");
setClock(_clock); setClock(_clock);
setDate(_date); setDate(_date);
}, 1000); }, 1000);
@ -210,7 +210,10 @@ export function Index() {
</div> </div>
<div className="col-span-4"> <div className="col-span-4">
<h3 className="text-3xl font-bold text-right"> <h3 className="text-3xl font-bold text-right">
{date} {clock} {timezone} {date}
</h3>
<h3 className="text-3xl font-bold text-right">
{clock} {timezone}
</h3> </h3>
</div> </div>
</div> </div>
@ -246,13 +249,13 @@ export function Index() {
> >
TUJUAN TUJUAN
</th> </th>
<th {/* <th
scope="col" scope="col"
className="text-center text-4xl font-bold uppercase w-1/4" className="text-center text-4xl font-bold uppercase w-1/4"
style={{letterSpacing: "3px"}} style={{letterSpacing: "3px"}}
> >
STATUS STATUS
</th> </th> */}
</tr> </tr>
</thead> </thead>
<tbody className="divide-y divide-gray-200"> <tbody className="divide-y divide-gray-200">
@ -300,7 +303,7 @@ export function Index() {
{y.destination} {y.destination}
</h3> </h3>
</td> </td>
<td className="px-4 py-2 font-medium"> {/* <td className="px-4 py-2 font-medium">
<div className="flex flex-row items-center gap-2 uppercase"> <div className="flex flex-row items-center gap-2 uppercase">
{y.status == ScheduleStatus.NOT_AVAILABLE && ( {y.status == ScheduleStatus.NOT_AVAILABLE && (
<> <>
@ -348,7 +351,7 @@ export function Index() {
</> </>
)} )}
</div> </div>
</td> </td> */}
</tr> </tr>
))} ))}
</> </>