17 KiB
- PENJAHIT A. REGISTER http://localhost:8000/api/penjahit/register { "name": "Toko Jahit Makmur", "email": "jahit.makmur@example.com", "password": "password123", "phone_number": "081234567891", "address": "Jl. Menjahit Indah No. 123, Jakarta Selatan", "shop_description": "Toko jahit terpercaya dengan pengalaman lebih dari 10 tahun. Menyediakan berbagai jasa jahit dan perbaikan pakaian dengan kualitas premium.", "specializations": [1, 2] } B. Login http://localhost:8000/api/penjahit/login { "email": "jahit.makmurr@example.com", "password": "password" } C. DASHBOARD GET http://localhost:8000/api/penjahit/dashboard INI RESPON { "success": true, "data": { "incoming_bookings": [], "current_month_earnings": 0, "total_earnings": 0, "average_rating": 0, "total_completed_orders": 0 }, "message": "Data dashboard berhasil diambil" }
D.DI FIGMA HALAMAN KONFIRMASI PESANAN GET http://localhost:8000/api/penjahit/bookings/status/pending GET http://localhost:8000/api/penjahit/bookings/status/diterima GET http://localhost:8000/api/penjahit/bookings/status/diproses GET http://localhost:8000/api/penjahit/bookings/status/selesai GET http://localhost:8000/api/penjahit/bookings/status/dibatalkan ALL http://localhost:8000/api/penjahit/bookings
E. TERIMA DAN TOLAK berdasarkan ia login POST http://localhost:8000/api/bookings/{booking_id}/reject POST http://localhost:8000/api/bookings/{booking_id}/accept
F. KALENDER GET http://localhost:8000/api/penjahit/calendar/3/2025 { "success": true, "data": { "month": 3, "year": 2025, "month_name": "March", "calendar": [ { "date": "2025-03-01", "day": "01", "day_name": "Saturday", "bookings": [] }, { "date": "2025-03-02", "day": "02", "day_name": "Sunday", "bookings": [] }, { "date": "2025-03-03", "day": "03", "day_name": "Monday", "bookings": [] }, { "date": "2025-03-04", "day": "04", "day_name": "Tuesday", "bookings": [] }, { "date": "2025-03-05", "day": "05", "day_name": "Wednesday", "bookings": [] }, { "date": "2025-03-06", "day": "06", "day_name": "Thursday", "bookings": [] }, { "date": "2025-03-07", "day": "07", "day_name": "Friday", "bookings": [] }, { "date": "2025-03-08", "day": "08", "day_name": "Saturday", "bookings": [] }, { "date": "2025-03-09", "day": "09", "day_name": "Sunday", "bookings": [] }, { "date": "2025-03-10", "day": "10", "day_name": "Monday", "bookings": [] }, { "date": "2025-03-11", "day": "11", "day_name": "Tuesday", "bookings": [] }, { "date": "2025-03-12", "day": "12", "day_name": "Wednesday", "bookings": [] }, { "date": "2025-03-13", "day": "13", "day_name": "Thursday", "bookings": [] }, { "date": "2025-03-14", "day": "14", "day_name": "Friday", "bookings": [] }, { "date": "2025-03-15", "day": "15", "day_name": "Saturday", "bookings": [] }, { "date": "2025-03-16", "day": "16", "day_name": "Sunday", "bookings": [] }, { "date": "2025-03-17", "day": "17", "day_name": "Monday", "bookings": [] }, { "date": "2025-03-18", "day": "18", "day_name": "Tuesday", "bookings": [] }, { "date": "2025-03-19", "day": "19", "day_name": "Wednesday", "bookings": [] }, { "date": "2025-03-20", "day": "20", "day_name": "Thursday", "bookings": [] }, { "date": "2025-03-21", "day": "21", "day_name": "Friday", "bookings": [] }, { "date": "2025-03-22", "day": "22", "day_name": "Saturday", "bookings": [] }, { "date": "2025-03-23", "day": "23", "day_name": "Sunday", "bookings": [] }, { "date": "2025-03-24", "day": "24", "day_name": "Monday", "bookings": [] }, { "date": "2025-03-25", "day": "25", "day_name": "Tuesday", "bookings": [] }, { "date": "2025-03-26", "day": "26", "day_name": "Wednesday", "bookings": [] }, { "date": "2025-03-27", "day": "27", "day_name": "Thursday", "bookings": [ { "id": 2, "time": "2025-03-26T10:00:00.000000Z", "customer_name": "Rudi Hermawan", "customer_phone": "081234567895", "service_type": "Jahit Baru", "category": "Bawahan", "status": "diproses", "payment_status": "paid" } ] }, { "date": "2025-03-28", "day": "28", "day_name": "Friday", "bookings": [] }, { "date": "2025-03-29", "day": "29", "day_name": "Saturday", "bookings": [] }, { "date": "2025-03-30", "day": "30", "day_name": "Sunday", "bookings": [] }, { "date": "2025-03-31", "day": "31", "day_name": "Monday", "bookings": [] } ], "summary": { "total_bookings": 1, "pending_bookings": 0, "ongoing_bookings": 1, "completed_bookings": 0, "cancelled_bookings": 0 } }, "message": "Data kalender berhasil diambil" }
- USERS A. REGISTER http://localhost:8000/api/pelanggan/register { "name": "Pelanggan Baru", "email": "pelanggan.baru22@example.com", "password": "password123", "phone_number": "081234567890", "address": "Jl. Pelanggan No. 123, Jakarta", "preferred_specializations": [3, 5, 9], "latitude": -6.1754, "longitude": 106.8272 } B. Login http://localhost:8000/api/pelanggan/login { "email": "pelanggan2@gmail.com", "password": "password" } C. DASHBOARD http://localhost:8000/api/tailors/recommended { "success": true, "data": { "tailors": [ { "id": 3, "name": "Siti Rahayu", "email": "siti@example.com", "role": "penjahit", "phone_number": "081234567892", "address": "Jl. Penjahit No. 2", "latitude": null, "longitude": null, "shop_description": null, "profile_photo": null, "email_verified_at": null, "created_at": "2025-03-24T21:15:14.000000Z", "updated_at": "2025-03-24T21:15:14.000000Z", "distance": null, "specializations": [ { "id": 8, "name": "Gamis", "icon": null, "created_at": "2025-03-23T14:12:26.000000Z", "updated_at": "2025-03-23T14:12:26.000000Z", "pivot": { "user_id": 3, "tailor_specialization_id": 8 } }, { "id": 9, "name": "Baju Pesta", "icon": "dress", "created_at": "2025-03-24T21:15:13.000000Z", "updated_at": "2025-03-24T21:15:13.000000Z", "pivot": { "user_id": 3, "tailor_specialization_id": 9 } } ] } ], "user_preferred": [ 3, 5, 9 ] }, "message": "Rekomendasi penjahit berhasil diambil" }
D. DETAIL PENJAHIT http://localhost:8000/api/tailors/3
{ "success": true, "data": { "id": 3, "name": "Siti Rahayu", "email": "siti@example.com", "role": "penjahit", "phone_number": "081234567892", "address": "Jl. Penjahit No. 2", "latitude": null, "longitude": null, "shop_description": null, "profile_photo": null, "email_verified_at": null, "created_at": "2025-03-24T21:15:14.000000Z", "updated_at": "2025-03-24T21:15:14.000000Z", "completed_orders": 0, "average_rating": 4, "distance": null, "specializations": [ { "id": 8, "name": "Gamis", "icon": null, "created_at": "2025-03-23T14:12:26.000000Z", "updated_at": "2025-03-23T14:12:26.000000Z", "pivot": { "user_id": 3, "tailor_specialization_id": 8 } }, { "id": 9, "name": "Baju Pesta", "icon": "dress", "created_at": "2025-03-24T21:15:13.000000Z", "updated_at": "2025-03-24T21:15:13.000000Z", "pivot": { "user_id": 3, "tailor_specialization_id": 9 } } ], "services": [ { "id": 2, "user_id": 3, "name": "Jahit Baju Muslim", "description": "Jahit baju muslim dengan desain modern", "price": "350000.00", "category": "Jahit Baru", "estimated_days": 5, "is_available": true, "service_photo": "services/baju_muslim.jpg", "created_at": "2025-03-24T21:15:15.000000Z", "updated_at": "2025-03-24T21:15:15.000000Z" } ] }, "message": "Detail penjahit berhasil diambil" }
E. Melakukan booking http://localhost:8000/api/tailors/3/book INI PERINTAHNYA { "appointment_date": "2025-04-01", "appointment_time": "14:00", "service_type": "Jahit Baru", "category": "Bawahan", "notes": "Celana bahan katun warna hitam", "measurements": [ { "name": "lingkar_pinggang", "value": 82, "unit": "cm" }, { "name": "lingkar_pinggul", "value": 96, "unit": "cm" }, { "name": "panjang_celana", "value": 98, "unit": "cm" }, { "name": "lingkar_paha", "value": 58, "unit": "cm" }, { "name": "lingkar_lutut", "value": 40, "unit": "cm" }, { "name": "lingkar_kaki", "value": 32, "unit": "cm" } ] } F. Untuk get semua bookings http://localhost:8000/api/bookings/customer ini responnya { "success": true, "data": [ { "id": 5, "customer_id": 13, "tailor_id": 3, "appointment_date": "2025-04-01T00:00:00.000000Z", "appointment_time": "14:00", "service_type": "Jahit Baru", "category": "Bawahan", "design_photo": null, "notes": "Celana bahan katun warna hitam", "status": "reservasi", "total_price": null, "payment_status": "unpaid", "measurements": [ { "name": "lingkar_pinggang", "unit": "cm", "value": 82 }, { "name": "lingkar_pinggul", "unit": "cm", "value": 96 }, { "name": "panjang_celana", "unit": "cm", "value": 98 }, { "name": "lingkar_paha", "unit": "cm", "value": 58 }, { "name": "lingkar_lutut", "unit": "cm", "value": 40 }, { "name": "lingkar_kaki", "unit": "cm", "value": 32 } ], "repair_details": null, "repair_photo": null, "repair_notes": null, "completion_photo": null, "completion_notes": null, "accepted_at": null, "rejected_at": null, "completed_at": null, "rejection_reason": null, "created_at": "2025-03-25T08:10:03.000000Z", "updated_at": "2025-03-25T08:10:03.000000Z", "tailor": { "id": 3, "name": "Siti Rahayu", "email": "siti@example.com", "role": "penjahit", "phone_number": "081234567892", "address": "Jl. Penjahit No. 2", "latitude": null, "longitude": null, "shop_description": null, "profile_photo": null, "email_verified_at": null, "created_at": "2025-03-24T21:15:14.000000Z", "updated_at": "2025-03-24T21:15:14.000000Z" } }, { "id": 4, "customer_id": 13, "tailor_id": 3, "appointment_date": "2025-04-01T00:00:00.000000Z", "appointment_time": "14:00", "service_type": "Jahit Baru", "category": "Bawahan", "design_photo": null, "notes": "Jahit celana panjang dengan bahan katun", "status": "reservasi", "total_price": null, "payment_status": "unpaid", "measurements": null, "repair_details": null, "repair_photo": null, "repair_notes": null, "completion_photo": null, "completion_notes": null, "accepted_at": null, "rejected_at": null, "completed_at": null, "rejection_reason": null, "created_at": "2025-03-25T07:59:47.000000Z", "updated_at": "2025-03-25T07:59:47.000000Z", "tailor": { "id": 3, "name": "Siti Rahayu", "email": "siti@example.com", "role": "penjahit", "phone_number": "081234567892", "address": "Jl. Penjahit No. 2", "latitude": null, "longitude": null, "shop_description": null, "profile_photo": null, "email_verified_at": null, "created_at": "2025-03-24T21:15:14.000000Z", "updated_at": "2025-03-24T21:15:14.000000Z" } } ], "message": "Data booking berhasil diambil." } GET BOOKING BERDASRKAN STATUS GET http://localhost:8000/api/bookings/customer/status/reservasi GET http://localhost:8000/api/bookings/customer/status/diproses GET http://localhost:8000/api/bookings/customer/status/selesai GET http://localhost:8000/api/bookings/customer/status/dibatalkan