using colors in coca cola and vuejs tailwind make me ๐ฆ DIGITAL KARNET โ FULL SYSTEM OVERVIEW โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ๐ฏ Our Mission Build a simple, mobile-friendly web app to help merchants: - Register clients digitally - Record credit transactions (buy now, pay later) - Track partial payments - View full credit/payment history per client - Get automated reminders for due dates - Replace the manual Karnet with a reliable, digital system โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ๐ฅ Users The merchant is the primary user of the app: - Logs in with phone number + password - Manages their own client list - Adds credit entries when clients buy on credit - Records payments as clients pay back - Sees financial summaries per client - Gets notified when clients are approaching due dates โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ๐งฉ FEATURES OVERVIEW ๐ USER MANAGEMENT โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ MERCHANT MANAGEMENT (CRUD)โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ - Add / Edit / Delete โ โ - View merchant details โ โ - Search / Filter merchants โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ CLIENT MANAGEMENT (CRUD) โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ - Add / Edit / Delete โ โ - View client details โ โ - Search / Filter clients โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ CREDIT MANAGEMENT (CRUD) โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ - Assign credit to client โ โ - Amount, Due date โ โ - Description, Status โ โ - Credit history view โ โ - Edit/Delete Credit Detailโ โ - View total credits โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ PAYMENT TRACKING โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ - Full / Partial payments โ โ - Link to specific credit โ โ - Calculate balance โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ NOTIFICATIONS (WhatsApp) โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ - Auto reminders (e.g. 2d) โ โ - Message templates โ โ - Client phone integration โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ๐งฑ DATA MODEL (MYSQL STRUCTURE) 1:M is one to many relationship. โโโโโโโโโโโโโโ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโ โ clients โโโโโ1:Mโโ credits โโโโโ1:Mโ payments โ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโ โ โ โ โโโโโโโ1:Mโโโโโโ โ โ โโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโ โผ notifications Tables & Fields: clients: id, name, phone number, address(optional) credits: id, client_id, amount(total), due_date, description, status payments: id, credit_id, amount, payment_date โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ๐ RELATIONAL DATA MODEL โ DIGITAL KARNET SYSTEM โโโโโโโโโโโโโโโโโโโโโโโโ โ CLIENT โ โโโโโโโโโโโโโโโโโโโโโโโโค โ id (PK) โ โ name โ โ phone โ โ address โ โโโโโโโโโโโโโโโโโโโโโโโโ โ โ (1 Client) โ โผ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ CREDIT โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ id (PK) โ โ client_id (FK โ client.id) โ โ amount โ โ due_date โ โ date_created โ โ description โ โ status (active/paid/partial)โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ (1 Credit) โ โโโโโโโโโโโโโโโโโโโโโโโโโ โ PAYMENT โ โโโโโโโโโโโโโโโโโโโโโโโโโค โ id (PK) โ โ credit_id (FK) โ โ amount โ โ payment_date โ โโโโโโโโโโโโโโโโโโโโโโโโโ โ โ (1 Credit) โ โผ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ NOTIFICATION โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ id (PK) โ โ client_id (FK) โ โ credit_id (FK) nanostore id โ โ type โ โ message โโ Message content โ sent_at โ โ delivery_status โ โ read_status (optional) โ โ provider_message_id โ โ Twilio or API external ID โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ๐ง Business Rules: โ Each client can have multiple credits. โ Each credit can have multiple payments. โ You can: - Show history per credit - Show total due per client - Automate alerts for unpaid credits ๐งฎ In General: We will calculate each clientโs financial summary by: - Add all credits for client - Subtract total paid - Result = remaining balance If the client made no payments, the balance equals the total credit โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ๐ Example Data Flow for a Client: ๐ค CLIENT: Amina El Khattabi (id: 1) just an example, so we can have a better understanding of the data flow โ CREDIT (1) - amount: 1000 MAD - due_date: 2025-07-10 - status: partial โ PAYMENT 1: 400 MAD on 2025-07-05 โ PAYMENT 2: 200 MAD on 2025-07-07 โ CREDIT (2) - amount: 500 MAD - due_date: 2025-08-01 - status: unpaid โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ๐ฅ๏ธ UI FLOW STRUCTURE 1. Home (Clients List) โ Add Client โ View Client Details 2. Client Profile Page ๐ CLIENT PROFILE PAGE โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ Remaining Balance (Client owes you): 600 MAD โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ Button: Add Credit (Add items, price, due date) โ Button: โ Add Payment (๐ต Enter any amount client paid โ system auto-deducts from oldest unpaid credits) โ Send WhatsApp Reminder ๐ Credit History Table: โโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโฌโโโโโโโโโโโฌโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโ โ Date โ Total Price โ Paid โ Status โ More Details โ โโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโโโผโโโโโโโโโโโโโโโค โ 2025-07-01 โ 120 MAD โ 120 MAD โ โ Paid โ ๐ View โ โ 2025-07-10 โ 80 MAD โ 30 MAD โ โ ๏ธ Partial โ ๐ View โ โ 2025-07-14 โ 100 MAD โ 0 MAD โ โ Unpaid โ ๐ View โ โโโโโโโโโโโโโโดโโโโโโโโโโโโโโโดโโโโโโโโโโโดโโโโโโโโโโโโโดโโโโโโโโโโโโโโโ โ Clicking "View" opens a **Credit Details Page** โ The merchant can see: - List of products in that credit - Payment history for that credit - Add/Edit/Delete options 3. Add Credit Page โ Form: - Description of items bought - Total amount - Due date โ Button: Save Credit 4. Payments Page โ Enter any amount paid by client โ System distributes it across unpaid/partially paid credits โ Remaining balances updated accordingly โ Credit status updated (Paid / Partial / Unpaid) 5. Notification Settings Page โ Set reminder timing (e.g. 2 days before) โ View/edit message template โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ๐งญ FUTURE IMPROVEMENTS (POST-MVP) ๐ Dashboard & Analytics: - View top debtors ("Who owes me the most?") - See overdue payments - Track total credits vs. payments monthly - Add client reliability indicators ๐ Product Granularity: - Replace free-text product descriptions with structured product list - Add product catalog (name, price/unit) - Enable future inventory tracking per credit - Prepare for POS integration - Initial Deployment
Browse filesFiles changed (2)
- README.md+7-5
- index.html+1086-19
12345678910---title: Tryloademoji: ๐colorFrom: yellowcolorTo: indigosdk: staticpinned: false---Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference123456789101112---title: tryloademoji: ๐ณcolorFrom: pinkcolorTo: yellowsdk: staticpinned: falsetags:- deepsite---Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
12345678910111213141516171819<!doctype html><html><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width" /><title>My static Space</title><link rel="stylesheet" href="style.css" /></head><body><div class="card"><h1>Welcome to your static Space!</h1><p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p><p>Also don't forget to check the<a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.</p></div></body></html>123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Digital Karnet - Credit Management System</title><script src="https://cdn.tailwindcss.com"></script><script src="https://cdn.jsdelivr.net/npm/vue@3.2.47/dist/vue.global.min.js"></script><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"><style>.coke-red {background-color: #F40009;}.coke-red-text {color: #F40009;}.coke-dark-red {background-color: #D7000F;}.coke-dark-red-text {color: #D7000F;}.coke-white {background-color: #FFFFFF;}.coke-white-text {color: #FFFFFF;}.coke-black {background-color: #000000;}.coke-black-text {color: #000000;}.coke-silver {background-color: #A7A8AA;}.coke-silver-text {color: #A7A8AA;}.sidebar {transition: all 0.3s ease;}.sidebar.collapsed {width: 70px;}.sidebar.collapsed .nav-text {display: none;}.sidebar.collapsed .logo-text {display: none;}.sidebar.collapsed .nav-item {justify-content: center;}.page-enter-active,.page-leave-active {transition: opacity 0.2s ease;}.page-enter-from,.page-leave-to {opacity: 0;}.fade-enter-active,.fade-leave-active {transition: opacity 0.3s ease;}.fade-enter-from,.fade-leave-to {opacity: 0;}.slide-fade-enter-active {transition: all 0.3s ease-out;}.slide-fade-leave-active {transition: all 0.3s cubic-bezier(1, 0.5, 0.8, 1);}.slide-fade-enter-from,.slide-fade-leave-to {transform: translateX(20px);opacity: 0;}.status-badge {padding: 0.25rem 0.5rem;border-radius: 0.375rem;font-size: 0.75rem;font-weight: 600;text-transform: uppercase;}.status-paid {background-color: #D1FAE5;color: #065F46;}.status-partial {background-color: #FEF3C7;color: #92400E;}.status-unpaid {background-color: #FEE2E2;color: #B91C1C;}.scrollbar-hide::-webkit-scrollbar {display: none;}.scrollbar-hide {-ms-overflow-style: none;scrollbar-width: none;}</style></head><body class="bg-gray-50"><div id="app"><!-- Mobile Sidebar Overlay --><div v-if="mobileSidebarOpen" @click="mobileSidebarOpen = false" class="fixed inset-0 z-20 bg-black bg-opacity-50 lg:hidden"></div><!-- Sidebar --><aside class="sidebar fixed inset-y-0 left-0 z-30 flex flex-col w-64 bg-white border-r border-gray-200 transition-all duration-300 ease-in-out" :class="{ 'collapsed': sidebarCollapsed, '-translate-x-full lg:translate-x-0': !mobileSidebarOpen }"><!-- Logo --><div class="flex items-center justify-between px-4 py-3 border-b border-gray-200"><div class="flex items-center"><div class="w-10 h-10 rounded-full coke-red flex items-center justify-center"><i class="fas fa-receipt text-white text-xl"></i></div><span class="logo-text ml-3 text-xl font-bold coke-dark-red-text">Digital Karnet</span></div><button @click="toggleSidebar" class="p-1 rounded-md text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500"><i class="fas fa-bars"></i></button></div><!-- User Profile --><div class="flex items-center px-4 py-3 border-b border-gray-200"><div class="w-10 h-10 rounded-full bg-gray-300 flex items-center justify-center"><i class="fas fa-user text-gray-600"></i></div><div class="ml-3"><p class="text-sm font-medium text-gray-900">Merchant Name</p><p class="text-xs text-gray-500">Premium Account</p></div></div><!-- Navigation --><nav class="flex-1 overflow-y-auto"><div class="px-2 py-4"><div class="space-y-1"><router-link to="/" class="nav-item group flex items-center px-2 py-2 text-sm font-medium rounded-md" :class="currentRoute === '/' ? 'bg-red-50 text-red-700' : 'text-gray-600 hover:bg-gray-50 hover:text-gray-900'"><i class="fas fa-home mr-3 flex-shrink-0" :class="currentRoute === '/' ? 'text-red-500' : 'text-gray-400 group-hover:text-gray-500'"></i><span class="nav-text">Dashboard</span></router-link><router-link to="/clients" class="nav-item group flex items-center px-2 py-2 text-sm font-medium rounded-md" :class="currentRoute === '/clients' ? 'bg-red-50 text-red-700' : 'text-gray-600 hover:bg-gray-50 hover:text-gray-900'"><i class="fas fa-users mr-3 flex-shrink-0" :class="currentRoute === '/clients' ? 'text-red-500' : 'text-gray-400 group-hover:text-gray-500'"></i><span class="nav-text">Clients</span></router-link><router-link to="/credits" class="nav-item group flex items-center px-2 py-2 text-sm font-medium rounded-md" :class="currentRoute === '/credits' ? 'bg-red-50 text-red-700' : 'text-gray-600 hover:bg-gray-50 hover:text-gray-900'"><i class="fas fa-file-invoice-dollar mr-3 flex-shrink-0" :class="currentRoute === '/credits' ? 'text-red-500' : 'text-gray-400 group-hover:text-gray-500'"></i><span class="nav-text">Credits</span></router-link><router-link to="/payments" class="nav-item group flex items-center px-2 py-2 text-sm font-medium rounded-md" :class="currentRoute === '/payments' ? 'bg-red-50 text-red-700' : 'text-gray-600 hover:bg-gray-50 hover:text-gray-900'"><i class="fas fa-money-bill-wave mr-3 flex-shrink-0" :class="currentRoute === '/payments' ? 'text-red-500' : 'text-gray-400 group-hover:text-gray-500'"></i><span class="nav-text">Payments</span></router-link><router-link to="/notifications" class="nav-item group flex items-center px-2 py-2 text-sm font-medium rounded-md" :class="currentRoute === '/notifications' ? 'bg-red-50 text-red-700' : 'text-gray-600 hover:bg-gray-50 hover:text-gray-900'"><i class="fas fa-bell mr-3 flex-shrink-0" :class="currentRoute === '/notifications' ? 'text-red-500' : 'text-gray-400 group-hover:text-gray-500'"></i><span class="nav-text">Notifications</span></router-link></div><div class="mt-8"><h3 class="px-3 text-xs font-semibold text-gray-500 uppercase tracking-wider">Reports</h3><div class="mt-1 space-y-1"><router-link to="/reports" class="nav-item group flex items-center px-2 py-2 text-sm font-medium rounded-md" :class="currentRoute === '/reports' ? 'bg-red-50 text-red-700' : 'text-gray-600 hover:bg-gray-50 hover:text-gray-900'"><i class="fas fa-chart-bar mr-3 flex-shrink-0" :class="currentRoute === '/reports' ? 'text-red-500' : 'text-gray-400 group-hover:text-gray-500'"></i><span class="nav-text">Analytics</span></router-link><router-link to="/debtors" class="nav-item group flex items-center px-2 py-2 text-sm font-medium rounded-md" :class="currentRoute === '/debtors' ? 'bg-red-50 text-red-700' : 'text-gray-600 hover:bg-gray-50 hover:text-gray-900'"><i class="fas fa-exclamation-triangle mr-3 flex-shrink-0" :class="currentRoute === '/debtors' ? 'text-red-500' : 'text-gray-400 group-hover:text-gray-500'"></i><span class="nav-text">Top Debtors</span></router-link></div></div></div></nav><!-- Bottom Section --><div class="px-4 py-3 border-t border-gray-200"><button @click="logout" class="group flex items-center w-full px-2 py-2 text-sm font-medium text-gray-600 rounded-md hover:bg-gray-50 hover:text-gray-900"><i class="fas fa-sign-out-alt mr-3 text-gray-400 group-hover:text-gray-500"></i><span class="nav-text">Logout</span></button></div></aside><!-- Main Content --><div class="lg:ml-64 flex flex-col min-h-screen" :class="{ 'lg:ml-20': sidebarCollapsed }"><!-- Top Navigation --><header class="sticky top-0 z-10 flex-shrink-0 flex h-16 bg-white shadow"><button @click="mobileSidebarOpen = true" class="border-r border-gray-200 px-4 text-gray-500 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-red-500 lg:hidden"><span class="sr-only">Open sidebar</span><i class="fas fa-bars"></i></button><div class="flex-1 px-4 flex justify-between"><div class="flex-1 flex"><div class="flex w-full md:ml-0"><div class="relative w-full text-gray-400 focus-within:text-gray-600"><div class="absolute inset-y-0 left-0 flex items-center pointer-events-none"><i class="fas fa-search"></i></div><input id="search-field" class="block w-full h-full pl-8 pr-3 py-2 border-transparent text-gray-900 placeholder-gray-500 focus:outline-none focus:placeholder-gray-400 focus:ring-0 focus:border-transparent sm:text-sm" placeholder="Search" type="search" name="search"></div></div></div><div class="ml-4 flex items-center md:ml-6"><button type="button" class="bg-white p-1 rounded-full text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500"><span class="sr-only">View notifications</span><i class="fas fa-bell"></i></button><!-- Profile dropdown --><div class="ml-3 relative"><div><button @click="profileDropdownOpen = !profileDropdownOpen" type="button" class="max-w-xs bg-white flex items-center text-sm rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500" id="user-menu-button" aria-expanded="false" aria-haspopup="true"><span class="sr-only">Open user menu</span><div class="w-8 h-8 rounded-full bg-gray-300 flex items-center justify-center"><i class="fas fa-user text-gray-600"></i></div></button></div><transition enter-active-class="transition ease-out duration-100" enter-from-class="transform opacity-0 scale-95" enter-to-class="transform opacity-100 scale-100" leave-active-class="transition ease-in duration-75" leave-from-class="transform opacity-100 scale-100" leave-to-class="transform opacity-0 scale-95"><div v-show="profileDropdownOpen" class="origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg py-1 bg-white ring-1 ring-black ring-opacity-5 focus:outline-none" role="menu" aria-orientation="vertical" aria-labelledby="user-menu-button" tabindex="-1"><a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100" role="menuitem" tabindex="-1" id="user-menu-item-0">Your Profile</a><a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100" role="menuitem" tabindex="-1" id="user-menu-item-1">Settings</a><a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100" role="menuitem" tabindex="-1" id="user-menu-item-2">Sign out</a></div></transition></div></div></div></header><!-- Page Content --><main class="flex-1"><div class="py-6"><div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"><!-- Page Header --><div class="md:flex md:items-center md:justify-between mb-6"><div class="flex-1 min-w-0"><h1 class="text-2xl font-bold leading-7 text-gray-900 sm:text-3xl sm:truncate"><span v-if="currentRoute === '/'">Dashboard</span><span v-if="currentRoute === '/clients'">Clients</span><span v-if="currentRoute === '/credits'">Credits</span><span v-if="currentRoute === '/payments'">Payments</span><span v-if="currentRoute === '/notifications'">Notifications</span><span v-if="currentRoute === '/reports'">Reports</span><span v-if="currentRoute === '/debtors'">Top Debtors</span></h1></div><div class="mt-4 flex md:mt-0 md:ml-4"><button v-if="currentRoute === '/clients'" @click="showAddClientModal = true" type="button" class="ml-3 inline-flex items-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white coke-red hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500"><i class="fas fa-plus mr-2"></i> Add Client</button><button v-if="currentRoute === '/credits'" @click="showAddCreditModal = true" type="button" class="ml-3 inline-flex items-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white coke-red hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500"><i class="fas fa-plus mr-2"></i> Add Credit</button><button v-if="currentRoute === '/payments'" @click="showAddPaymentModal = true" type="button" class="ml-3 inline-flex items-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white coke-red hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500"><i class="fas fa-plus mr-2"></i> Record Payment</button></div></div><!-- Router View --><div class="bg-white shadow rounded-lg p-6"><transition name="fade" mode="out-in"><router-view></router-view></transition></div></div></div></main></div><!-- Add Client Modal --><div v-if="showAddClientModal" class="fixed z-50 inset-0 overflow-y-auto"><div class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"><div class="fixed inset-0 transition-opacity" aria-hidden="true"><div class="absolute inset-0 bg-gray-500 opacity-75"></div></div><span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">​</span><div class="inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full"><div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4"><div class="sm:flex sm:items-start"><div class="mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 sm:mx-0 sm:h-10 sm:w-10"><i class="fas fa-user-plus text-red-600"></i></div><div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left"><h3 class="text-lg leading-6 font-medium text-gray-900">Add New Client</h3><div class="mt-2"><form class="space-y-4"><div><label for="client-name" class="block text-sm font-medium text-gray-700">Full Name</label><input type="text" id="client-name" class="mt-1 focus:ring-red-500 focus:border-red-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"></div><div><label for="client-phone" class="block text-sm font-medium text-gray-700">Phone Number</label><input type="tel" id="client-phone" class="mt-1 focus:ring-red-500 focus:border-red-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"></div><div><label for="client-address" class="block text-sm font-medium text-gray-700">Address (Optional)</label><textarea id="client-address" rows="3" class="mt-1 focus:ring-red-500 focus:border-red-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"></textarea></div></form></div></div></div></div><div class="bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse"><button type="button" class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 coke-red text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm">Save Client</button><button @click="showAddClientModal = false" type="button" class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm">Cancel</button></div></div></div></div><!-- Add Credit Modal --><div v-if="showAddCreditModal" class="fixed z-50 inset-0 overflow-y-auto"><div class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"><div class="fixed inset-0 transition-opacity" aria-hidden="true"><div class="absolute inset-0 bg-gray-500 opacity-75"></div></div><span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">​</span><div class="inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full"><div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4"><div class="sm:flex sm:items-start"><div class="mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 sm:mx-0 sm:h-10 sm:w-10"><i class="fas fa-file-invoice-dollar text-red-600"></i></div><div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left"><h3 class="text-lg leading-6 font-medium text-gray-900">Add New Credit</h3><div class="mt-2"><form class="space-y-4"><div><label for="credit-client" class="block text-sm font-medium text-gray-700">Client</label><select id="credit-client" class="mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-red-500 focus:border-red-500 sm:text-sm rounded-md"><option>Select a client</option><option>Amina El Khattabi</option><option>Mohammed Benali</option><option>Fatima Zahra</option></select></div><div><label for="credit-amount" class="block text-sm font-medium text-gray-700">Amount (MAD)</label><input type="number" id="credit-amount" class="mt-1 focus:ring-red-500 focus:border-red-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"></div><div><label for="credit-due-date" class="block text-sm font-medium text-gray-700">Due Date</label><input type="date" id="credit-due-date" class="mt-1 focus:ring-red-500 focus:border-red-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"></div><div><label for="credit-description" class="block text-sm font-medium text-gray-700">Description</label><textarea id="credit-description" rows="3" class="mt-1 focus:ring-red-500 focus:border-red-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md" placeholder="Items purchased, terms, etc."></textarea></div></form></div></div></div></div><div class="bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse"><button type="button" class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 coke-red text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm">Save Credit</button><button @click="showAddCreditModal = false" type="button" class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm">Cancel</button></div></div></div></div><!-- Add Payment Modal --><div v-if="showAddPaymentModal" class="fixed z-50 inset-0 overflow-y-auto"><div class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"><div class="fixed inset-0 transition-opacity" aria-hidden="true"><div class="absolute inset-0 bg-gray-500 opacity-75"></div></div><span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">​</span><div class="inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full"><div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4"><div class="sm:flex sm:items-start"><div class="mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 sm:mx-0 sm:h-10 sm:w-10"><i class="fas fa-money-bill-wave text-red-600"></i></div><div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left"><h3 class="text-lg leading-6 font-medium text-gray-900">Record Payment</h3><div class="mt-2"><form class="space-y-4"><div><label for="payment-client" class="block text-sm font-medium text-gray-700">Client</label><select id="payment-client" class="mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-red-500 focus:border-red-500 sm:text-sm rounded-md"><option>Select a client</option><option>Amina El Khattabi</option><option>Mohammed Benali</option><option>Fatima Zahra</option></select></div><div><label for="payment-amount" class="block text-sm font-medium text-gray-700">Amount (MAD)</label><input type="number" id="payment-amount" class="mt-1 focus:ring-red-500 focus:border-red-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"></div><div><label for="payment-date" class="block text-sm font-medium text-gray-700">Payment Date</label><input type="date" id="payment-date" class="mt-1 focus:ring-red-500 focus:border-red-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"></div><div><label for="payment-method" class="block text-sm font-medium text-gray-700">Payment Method</label><select id="payment-method" class="mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-red-500 focus:border-red-500 sm:text-sm rounded-md"><option>Cash</option><option>Bank Transfer</option><option>Mobile Payment</option><option>Check</option></select></div><div><label for="payment-notes" class="block text-sm font-medium text-gray-700">Notes</label><textarea id="payment-notes" rows="2" class="mt-1 focus:ring-red-500 focus:border-red-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md" placeholder="Any additional notes"></textarea></div></form></div></div></div></div><div class="bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse"><button type="button" class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 coke-red text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm">Record Payment</button><button @click="showAddPaymentModal = false" type="button" class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm">Cancel</button></div></div></div></div></div><script>const { createApp, ref, computed } = Vue;// Define routesconst routes = {'/': {template: `<div><div class="grid grid-cols-1 gap-5 sm:grid-cols-2 lg:grid-cols-4 mb-6"><!-- Total Clients Card --><div class="bg-white overflow-hidden shadow rounded-lg"><div class="px-4 py-5 sm:p-6"><div class="flex items-center"><div class="flex-shrink-0 bg-red-500 rounded-md p-3"><i class="fas fa-users text-white"></i></div><div class="ml-5 w-0 flex-1"><dt class="text-sm font-medium text-gray-500 truncate">Total Clients</dt><dd class="flex items-baseline"><div class="text-2xl font-semibold text-gray-900">142</div><div class="ml-2 flex items-baseline text-sm font-semibold text-green-600"><i class="fas fa-arrow-up text-xs"></i><span class="sr-only">Increased by</span>12%</div></dd></div></div></div></div><!-- Active Credits Card --><div class="bg-white overflow-hidden shadow rounded-lg"><div class="px-4 py-5 sm:p-6"><div class="flex items-center"><div class="flex-shrink-0 bg-red-500 rounded-md p-3"><i class="fas fa-file-invoice-dollar text-white"></i></div><div class="ml-5 w-0 flex-1"><dt class="text-sm font-medium text-gray-500 truncate">Active Credits</dt><dd class="flex items-baseline"><div class="text-2xl font-semibold text-gray-900">87</div><div class="ml-2 flex items-baseline text-sm font-semibold text-red-600"><i class="fas fa-arrow-up text-xs"></i><span class="sr-only">Increased by</span>5%</div></dd></div></div></div></div><!-- Total Outstanding Card --><div class="bg-white overflow-hidden shadow rounded-lg"><div class="px-4 py-5 sm:p-6"><div class="flex items-center"><div class="flex-shrink-0 bg-red-500 rounded-md p-3"><i class="fas fa-money-bill-wave text-white"></i></div><div class="ml-5 w-0 flex-1"><dt class="text-sm font-medium text-gray-500 truncate">Total Outstanding</dt><dd class="flex items-baseline"><div class="text-2xl font-semibold text-gray-900">24,560 MAD</div><div class="ml-2 flex items-baseline text-sm font-semibold text-green-600"><i class="fas fa-arrow-down text-xs"></i><span class="sr-only">Decreased by</span>3.2%</div></dd></div></div></div></div><!-- Overdue Payments Card --><div class="bg-white overflow-hidden shadow rounded-lg"><div class="px-4 py-5 sm:p-6"><div class="flex items-center"><div class="flex-shrink-0 bg-red-500 rounded-md p-3"><i class="fas fa-exclamation-triangle text-white"></i></div><div class="ml-5 w-0 flex-1"><dt class="text-sm font-medium text-gray-500 truncate">Overdue Payments</dt><dd class="flex items-baseline"><div class="text-2xl font-semibold text-gray-900">12</div><div class="ml-2 flex items-baseline text-sm font-semibold text-red-600"><i class="fas fa-arrow-up text-xs"></i><span class="sr-only">Increased by</span>2</div></dd></div></div></div></div></div><!-- Recent Activity --><div class="bg-white shadow rounded-lg mb-6"><div class="px-4 py-5 sm:px-6 border-b border-gray-200"><h3 class="text-lg leading-6 font-medium text-gray-900">Recent Activity</h3></div><div class="bg-white overflow-hidden"><ul class="divide-y divide-gray-200"><li v-for="activity in recentActivities" :key="activity.id" class="px-4 py-4 sm:px-6"><div class="flex items-center"><div class="min-w-0 flex-1 flex items-center"><div class="flex-shrink-0"><div class="h-10 w-10 rounded-full flex items-center justify-center" :class="activity.type === 'payment' ? 'bg-green-100' : 'bg-red-100'"><i :class="activity.type === 'payment' ? 'fas fa-money-bill-wave text-green-600' : 'fas fa-file-invoice-dollar text-red-600'"></i></div></div><div class="min-w-0 flex-1 px-4"><div><p class="text-sm font-medium text-gray-900 truncate">{{ activity.client }}</p><p class="text-sm text-gray-500 truncate">{{ activity.description }}</p></div></div></div><div><p class="text-sm font-medium" :class="activity.type === 'payment' ? 'text-green-600' : 'text-red-600'">{{ activity.amount }} MAD</p><p class="text-xs text-gray-500">{{ activity.date }}</p></div></div></li></ul></div></div><!-- Top Debtors --><div class="bg-white shadow rounded-lg"><div class="px-4 py-5 sm:px-6 border-b border-gray-200"><h3 class="text-lg leading-6 font-medium text-gray-900">Top Debtors</h3></div><div class="overflow-hidden"><table class="min-w-full divide-y divide-gray-200"><thead class="bg-gray-50"><tr><th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Client</th><th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Phone</th><th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Total Credit</th><th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Paid</th><th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Balance</th></tr></thead><tbody class="bg-white divide-y divide-gray-200"><tr v-for="debtor in topDebtors" :key="debtor.id" class="hover:bg-gray-50"><td class="px-6 py-4 whitespace-nowrap"><div class="flex items-center"><div class="flex-shrink-0 h-10 w-10"><div class="h-10 w-10 rounded-full bg-gray-200 flex items-center justify-center"><i class="fas fa-user text-gray-600"></i></div></div><div class="ml-4"><div class="text-sm font-medium text-gray-900">{{ debtor.name }}</div><div class="text-sm text-gray-500">{{ debtor.lastPayment }}</div></div></div></td><td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">{{ debtor.phone }}</td><td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">{{ debtor.totalCredit }} MAD</td><td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">{{ debtor.paid }} MAD</td><td class="px-6 py-4 whitespace-nowrap text-sm font-medium" :class="debtor.balance > 0 ? 'text-red-600' : 'text-green-600'">{{ debtor.balance }} MAD</td></tr></tbody></table></div></div></div>`,setup() {const recentActivities = ref([{ id: 1, type: 'payment', client: 'Amina El Khattabi', description: 'Payment received', amount: 400, date: '2 hours ago' },{ id: 2, type: 'credit', client: 'Mohammed Benali', description: 'New credit created', amount: 1200, date: '5 hours ago' },{ id: 3, type: 'payment', client: 'Fatima Zahra', description: 'Partial payment received', amount: 200, date: '1 day ago' },{ id: 4, type: 'credit', client: 'Karim Alami', description: 'New credit created', amount: 800, date: '2 days ago' },{ id: 5, type: 'payment', client: 'Leila Mansouri', description: 'Full payment received', amount: 1500, date: '3 days ago' }]);const topDebtors = ref([{ id: 1, name: 'Amina El Khattabi', phone: '+212 612 345 678', totalCredit: 1500, paid: 600, balance: 900, lastPayment: '5 days ago' },{ id: 2, name: 'Mohammed Benali', phone: '+212 678 901 234', totalCredit: 2500, paid: 1200, balance: 1300, lastPayment: '2 weeks ago' },{ id: 3, name: 'Karim Alami', phone: '+212 699 123 456', totalCredit: 1800, paid: 500, balance: 1300, lastPayment: '1 week ago' },{ id: 4, name: 'Fatima Zahra', phone: '+212 633 456 789', totalCredit: 1200, paid: 400, balance: 800, lastPayment: '3 days ago' },{ id: 5, name: 'Leila Mansouri', phone: '+212 644 789 012', totalCredit: 2000, paid: 1500, balance: 500, lastPayment: 'Yesterday' }]);return { recentActivities, topDebtors };}},'/clients': {template: `<div><!-- Client Search and Filters --><div class="mb-6"><div class="flex flex-col sm:flex-row sm:items-center sm:justify-between"><div class="relative w-full sm:w-64 mb-4 sm:mb-0"><div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none"><i class="fas fa-search text-gray-400"></i></div><input type="text" class="block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-md leading-5 bg-white placeholder-gray-500 focus:outline-none focus:placeholder-gray-400 focus:ring-1 focus:ring-red-500 focus:border-red-500 sm:text-sm" placeholder="Search clients..."></div><div class="flex space-x-3"><select class="block w-full sm:w-40 pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-red-500 focus:border-red-500 sm:text-sm rounded-md"><option>All Status</option><option>Active</option><option>Inactive</option></select><button class="inline-flex items-center px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500"><i class="fas fa-filter mr-2"></i> Filter</button></div></div></div><!-- Clients Table --><div class="overflow-hidden border border-gray-200 rounded-lg"><table class="min-w-full divide-y divide-gray-200"><thead class="bg-gray-50"><tr><th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Client</th><th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Phone</th><th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Credits</th><th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Balance</th><th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th><th scope="col" class="relative px-6 py-3"><span class="sr-only">Actions</span></th></tr></thead><tbody class="bg-white divide-y divide-gray-200"><tr v-for="client in clients" :key="client.id" class="hover:bg-gray-50"><td class="px-6 py-4 whitespace-nowrap"><div class="flex items-center"><div class="flex-shrink-0 h-10 w-10"><div class="h-10 w-10 rounded-full bg-gray-200 flex items-center justify-center"><i class="fas fa-user text-gray-600"></i></div></div><div class="ml-4"><div class="text-sm font-medium text-gray-900">{{ client.name }}</div><div class="text-sm text-gray-500">{{ client.address }}</div></div></div></td><td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">{{ client.phone }}</td><td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">{{ client.credits }}</td><td class="px-6 py-4 whitespace-nowrap text-sm font-medium" :class="client.balance > 0 ? 'text-red-600' : 'text-green-600'">{{ client.balance }} MAD</td><td class="px-6 py-4 whitespace-nowrap"><span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full" :class="client.status === 'active' ? 'bg-green-100 text-green-800' : 'bg-red-100 text-red-800'">{{ client.status === 'active' ? 'Active' : 'Inactive' }}</span></td><td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium"><button class="text-red-600 hover:text-red-900 mr-3"><i class="fas fa-eye"></i></button><button class="text-red-600 hover:text-red-900"><i class="fas fa-ellipsis-v"></i></button></td></tr></tbody></table></div><!-- Pagination --><div class="flex items-center justify-between mt-4"><div class="flex-1 flex justify-between sm:hidden"><button class="relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50">Previous</button><button class="ml-3 relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50">Next</button></div><div class="hidden sm:flex-1 sm:flex sm:items-center sm:justify-between"><div><p class="text-sm text-gray-700">Showing<span class="font-medium">1</span>to<span class="font-medium">10</span>of<span class="font-medium">42</span>results</p></div><div><nav class="relative z-0 inline-flex rounded-md shadow-sm -space-x-px" aria-label="Pagination"><button class="relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50"><span class="sr-only">Previous</span><i class="fas fa-chevron-left"></i></button><button aria-current="page" class="z-10 bg-red-50 border-red-500 text-red-600 relative inline-flex items-center px-4 py-2 border text-sm font-medium">1</button><button class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium">2</button><button class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium">3</button><span class="relative inline-flex items-center px-4 py-2 border border-gray-300 bg-white text-sm font-medium text-gray-700">...</span><button class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium">8</button><button class="relative inline-flex items-center px-2 py-2 rounded-r-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50"><span class="sr-only">Next</span><i class="fas fa-chevron-right"></i></button></nav></div></div></div></div>`,setup() {const clients = ref([{ id: 1, name: 'Amina El Khattabi', phone: '+212 612 345 678', address: 'Casablanca', credits: 2, balance: 900, status: 'active' },{ id: 2, name: 'Mohammed Benali', phone: '+212 678 901 234', address: 'Rabat', credits: 3, balance: 1300, status: 'active' },{ id: 3, name: 'Fatima Zahra', phone: '+212 633 456 789', address: 'Marrakech', credits: 1, balance: 800, status: 'active' },{ id: 4, name: 'Karim Alami', phone: '+212 699 123 456', address: 'Tangier', credits: 2, balance: 1300, status: 'active' },{ id: 5, name: 'Leila Mansouri', phone: '+212 644 789 012', address: 'Fes', credits: 1, balance: 500, status: 'active' },{ id: 6, name: 'Youssef Chraibi', phone: '+212 655 234 567', address: 'Agadir', credits: 0, balance: 0, status: 'inactive' },{ id: 7, name: 'Nadia Bensaid', phone: '+212 677 890 123', address: 'Meknes', credits: 2, balance: 750, status: 'active' },{ id: 8, name: 'Hassan El Fassi', phone: '+212 622 345 678', address: 'Oujda', credits: 1, balance: 400, status: 'active' },{ id: 9, name: 'Samira Khouribga', phone: '+212 688 901 234', address: 'Khouribga', credits: 0, balance: 0, status: 'inactive' },{ id: 10, name: 'Omar Tazi', phone: '+212 611 234 567', address: 'Tetouan', credits: 3, balance: 1500, status: 'active' }]);return { clients };}},'/credits': {template: `<div><!-- Credit Search and Filters --><div class="mb-6"><div class="flex flex-col sm:flex-row sm:items-center sm:justify-between"><div class="relative w-full sm:w-64 mb-4 sm:mb-0"><div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none"><i class="fas fa-search text-gray-400"></i></div><input type="text" class="block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-md leading-5 bg-white placeholder-gray-500 focus:outline-none focus:placeholder-gray-400 focus:ring-1 focus:ring-red-500 focus:border-red-500 sm:text-sm" placeholder="Search credits..."></div><div class="flex space-x-3"><select class="block w-full sm:w-40 pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-red-500 focus:border-red-500 sm:text-sm rounded-md"><option>All Status</option><option>Paid</option><option>Partial</option><option>Unpaid</option></select><select class="block w-full sm:w-40 pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-red-500 focus:border-red-500 sm:text-sm rounded-md"><option>All Clients</option><option>Amina El Khattabi</option><option>Mohammed Benali</option><option>Fatima Zahra</option></select><button class="inline-flex items-center px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500"><i class="fas fa-filter mr-2"></i> Filter</button></div></div></div><!-- Credits Table --><div class="overflow-hidden border border-gray-200 rounded-lg"><table class="min-w-full divide-y divide-gray-200"><thead class="bg-gray-50"><tr><th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Client</th><th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Amount</th><th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Due Date</th><th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Paid</th><th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th><th scope="col" class="relative px-6 py-3"><span class="sr-only">Actions</span></th></tr></thead><tbody class="bg-white divide-y divide-gray-200"><tr v-for="credit in credits" :key="credit.id" class="hover:bg-gray-50"><td class="px-6 py-4 whitespace-nowrap"><div class="flex items-center"><div class="flex-shrink-0 h-10 w-10"><div class="h-10 w-10 rounded-full bg-gray-200 flex items-center justify-center"><i class="fas fa-user text-gray-600"></i></div></div><div class="ml-4"><div class="text-sm font-medium text-gray-900">{{ credit.client }}</div><div class="text-sm text-gray-500">{{ credit.phone }}</div></div></div></td><td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">{{ credit.amount }} MAD</td><td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">{{ credit.dueDate }}</td><td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">{{ credit.paid }} MAD</td><td class="px-6 py-4 whitespace-nowrap"><span class="status-badge" :class="credit.status === 'paid' ? 'status-paid' : credit.status === 'partial' ? 'status-partial' : 'status-unpaid'">{{ credit.status === 'paid' ? 'Paid' : credit.status === 'partial' ? 'Partial' : 'Unpaid' }}</span></td><td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium"><button class="text-red-600 hover:text-red-900 mr-3"><i class="fas fa-eye"></i></button><button class="text-red-600 hover:text-red-900"><i class="fas fa-ellipsis-v"></i></button></td></tr></tbody></table></div><!-- Pagination --><div class="flex items-center justify-between mt-4"><div class="flex-1 flex justify-between sm:hidden"><button class="relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50">Previous</button><button class="ml-3 relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50">Next</button></div><div class="hidden sm:flex-1 sm:flex sm:items-center sm:justify-between"><div><p class="text-sm text-gray-700">Showing<span class="font-medium">1</span>to<span class="font-medium">10</span>of<span class="font-medium">87</span>results</p></div><div><nav class="relative z-0 inline-flex rounded-md shadow-sm -space-x-px" aria-label="Pagination"><button class="relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50"><span class="sr-only">Previous</span><i class="fas fa-chevron-left"></i></button><button aria-current="page" class="z-10 bg-red-50 border-red-500 text-red-600 relative inline-flex items-center px-4 py-2 border text-sm font-medium">1</button><button class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium">2</button><button class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium">3</button><span class="relative inline-flex items-center px-4 py-2 border border-gray-300 bg-white text-sm font-medium text-gray-700">...</span><button class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium">9</button><button class="relative inline-flex items-center px-2 py-2 rounded-r-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50"><span class="sr-only">Next</span><i class="fas fa-chevron-right"></i></button></nav></div></div></div></div>`,setup() {const credits = ref([{ id: 1, client: 'Amina El Khattabi', phone: '+212 612 345 678', amount: 1000, dueDate: '2025-07-10', paid: 600, status: 'partial' },{ id: 2, client: 'Mohammed Benali', phone: '+212 678 901 234', amount: 2500, dueDate: '2025-08-15', paid: 1200, status: 'partial' },{ id: 3, client: 'Fatima Zahra', phone: '+212 633 456 789', amount: 1200, dueDate: '2025-06-30', paid: 400, status: 'partial' },{ id: 4, client: 'Karim Alami', phone: '+212 699 123 456', amount: 1800, dueDate: '2025-07-25', paid: 500, status: 'partial' },{ id: 5, client: 'Leila Mansouri', phone: '+212 644 789 012', amount: 2000, dueDate: '2025-05-20', paid: 2000, status: 'paid' },{ id: 6, client: 'Youssef Chraibi', phone: '+212 655 234 567', amount: 800, dueDate: '2025-09-05', paid: 0, status: 'unpaid' },{ id: 7, client: 'Nadia Bensaid', phone: '+212 677 890 123', amount: 1500, dueDate: '2025-07-18', paid: 750, status: 'partial' },{ id: 8, client: 'Hassan El Fassi', phone: '+212 622 345 678', amount: 400, dueDate: '2025-06-10', paid: 0, status: 'unpaid' },{ id: 9, client: 'Samira Khouribga', phone: '+212 688 901 234', amount: 1200, dueDate: '2025-08-22', paid: 1200, status: 'paid' },{ id: 10, client: 'Omar Tazi', phone: '+212 611 234 567', amount: 3000, dueDate: '2025-07-05', paid: 1500, status: 'partial' }]);return { credits };}},'/payments': {template: `<div><!-- Payment Search and Filters --><div class="mb-6"><div class="flex flex-col sm:flex-row sm:items-center sm:justify-between"><div class="relative w-full sm:w-64 mb-4 sm:mb-0"><div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none"><i class="fas fa-search text-gray-400"></i></div><input type="text" class="block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-md leading-5 bg-white placeholder-gray-500 focus:outline-none focus:placeholder-gray-400 focus:ring-1 focus:ring-red-500 focus:border-red-500 sm:text-sm" placeholder="Search payments..."></div><div class="flex space-x-3"><select class="block w-full sm:w-40 pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-red-500 focus:border-red-500 sm:text-sm rounded-md"><option>All Methods</option><option>Cash</option><option>Bank Transfer</option><option>Mobile Payment</option></select><select class="block w-full sm:w-40 pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-red-500 focus:border-red-500 sm:text-sm rounded-md"><option>All Clients</option><option>Amina El Khattabi</option><option>Mohammed Benali</option><option>Fatima Zahra</option></select><button class="inline-flex items-center px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500"><i class="fas fa-filter mr-2"></i> Filter</button></div></div></div><!-- Payments Table --><div class="overflow-hidden border border-gray-200 rounded-lg"><table class="min-w-full divide-y divide-gray-200"><thead class="bg-gray-50"><tr><th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Client</th><th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Amount</th><th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Date</th><th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Method</th><th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Credit</th><th scope="col" class="relative px-6 py-3"><span class="sr-only">Actions</span></th></tr></thead><tbody class="bg-white divide-y divide-gray-200"><tr v-for="payment in payments" :key="payment.id" class="hover:bg-gray-50"><td class="px-6 py-4 whitespace-nowrap"><div class="flex items-center"><div class="flex-shrink-0 h-10 w-10"><div class="h-10 w-10 rounded-full bg-gray-200 flex items-center justify-center"><i class="fas fa-user text-gray-600"></i></div></div><div class="ml-4"><div class="text-sm font-medium text-gray-900">{{ payment.client }}</div><div class="text-sm text-gray-500">{{ payment.phone }}</div></div></div></td><td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-green-600">{{ payment.amount }} MAD</td><td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">{{ payment.date }}</td><td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"><span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-blue-100 text-blue-800">{{ payment.method }}</span></td><td class="px-6 py-4 whitespace-nowrap"><div class="text-sm text-gray-900">{{ payment.creditAmount }} MAD</div><div class="text-sm text-gray-500">Due {{ payment.dueDate }}</div></td><td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium"><button class="text-red-600 hover:text-red-900 mr-3"><i class="fas fa-eye"></i></button><button class="text-red-600 hover:text-red-900"><i class="fas fa-ellipsis-v"></i></button></td></tr></tbody></table></div><!-- Pagination --><div class="flex items-center justify-between mt-4"><div class="flex-1 flex justify-between sm:hidden"><button class="relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50">Previous</button><button class="ml-3 relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50">Next</button></div><div class="hidden sm:flex-1 sm:flex sm:items-center sm:justify-between"><div><p class="text-sm text-gray-700">Showing<span class="font-medium">1</span>to<span class="font-medium">10</span>of<span class="font-medium">124</span>results</p></div><div><nav class="relative z-0 inline-flex rounded-md shadow-sm -space-x-px" aria-label="Pagination"><button class="relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50"><span class="sr-only">Previous</span><i class="fas fa-chevron-left"></i></button><button aria-current="page" class="z-10<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - ๐งฌ <a href="https://enzostvs-deepsite.hf.space?remix=ouma01/tryload" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body></html>
README.md+7-5
index.html+1086-19