diff --git a/resources/js/Pages/Customer.tsx b/resources/js/Pages/Customer.tsx
index 368ac3a..950fc25 100644
--- a/resources/js/Pages/Customer.tsx
+++ b/resources/js/Pages/Customer.tsx
@@ -15,6 +15,10 @@ interface CustomerProps {
id: number
amount: number
}]
+ deposits: [{
+ id: number
+ amount: number
+ }]
}
};
@@ -52,9 +56,7 @@ export default function Customer({customer}: CustomerProps) {
Saldo: {customer.amount_left ? customer.amount_left : 0} kr
- { customer.deposit &&
-
Inbetalad summa: {customer.deposit} kr
- }
+
Inbetalad summa: {customer.deposit ? customer.deposit : 0} kr
Vårnadshavare: {customer.guardian_name}
Ge ev överblivet saldo till vBytes: {customer.give_leftover ? "Ja" : "Nej"}
@@ -94,7 +96,7 @@ export default function Customer({customer}: CustomerProps) {
required
className="input"
type="number"
- name="amount"
+ name="deposit"
value={data.deposit}
placeholder="Summa"
onChange={(e) => setData('deposit', e.target.value)}
@@ -111,7 +113,7 @@ export default function Customer({customer}: CustomerProps) {
- Tidigare köp
+ Köp
+
+
+ Inbetalningar
+
+
+ {customer.deposits && customer.deposits.map( deposit => {
+ return
+ })}
+
+
diff --git a/resources/js/Pages/Dashboard.tsx b/resources/js/Pages/Dashboard.tsx
index efa66e6..c248282 100644
--- a/resources/js/Pages/Dashboard.tsx
+++ b/resources/js/Pages/Dashboard.tsx
@@ -1,6 +1,6 @@
import AuthenticatedLayout from '@/Layouts/AuthenticatedLayout';
import { Head } from '@inertiajs/react';
-import { useState } from 'react';
+import { SetStateAction, useState } from 'react';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faArrowRight } from '@fortawesome/free-solid-svg-icons'
@@ -21,7 +21,9 @@ interface Customer {
export default function Dashboard({customers}: CustomerProps) {
const [searchItem, setSearchItem] = useState('')
+ const [activeTab, setActiveTab] = useState('')
const [filteredCustomers, setFilteredCustomers] = useState