pojednostavljeni edit form-ovi
This commit is contained in:
@@ -12,9 +12,8 @@ import {
|
||||
MapPinIcon
|
||||
} from '@heroicons/react/24/outline';
|
||||
import { LocationCard } from './ui/LocationCard';
|
||||
import { BillPaymentForm } from './ui/BillPaymentForm';
|
||||
import { BillEditForm } from './ui/BillEditForm';
|
||||
import { LocationEditForm } from './ui/LocationEditForm';
|
||||
import { BillTemplateForm } from './ui/BillTemplateForm';
|
||||
import { MonthTitle } from './ui/MonthTitle';
|
||||
import { AddMonthButton } from './ui/AddMonthButton';
|
||||
import { AddLocationButton } from './ui/AddLocationButton';
|
||||
@@ -61,9 +60,8 @@ export default function Page() {
|
||||
{id: 3, name: 'GSKG', paid: true},
|
||||
]} />
|
||||
|
||||
<BillPaymentForm bill={{id: 1, name: 'GSKG', description: 'Pričuva, Voda, Smeće', paid: true}} />
|
||||
<BillEditForm bill={{id: 1, name: 'GSKG', description: 'Pričuva, Voda, Smeće', paid: true}} />
|
||||
<LocationEditForm />
|
||||
<BillTemplateForm />
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2,18 +2,17 @@ import { Cog8ToothIcon, DocumentIcon, TrashIcon } from "@heroicons/react/24/outl
|
||||
import { Bill } from "../lib/db-types";
|
||||
import { FC } from "react";
|
||||
|
||||
export interface BillPaymentFormProps {
|
||||
export interface BillEditFormProps {
|
||||
bill: Bill
|
||||
}
|
||||
|
||||
export const BillPaymentForm:FC<BillPaymentFormProps> = ({ bill: { name, description, paid } }) =>
|
||||
export const BillEditForm:FC<BillEditFormProps> = ({ bill: { name, description, paid } }) =>
|
||||
<div className="card card-compact card-bordered max-w-sm bg-base-100 shadow-s my-1">
|
||||
<div className="card-body">
|
||||
<form>
|
||||
<Cog8ToothIcon className="h-[1em] w-[1em] absolute cursor-pointer top-4 right-4 text-2xl" />
|
||||
<TrashIcon className="h-[1em] w-[1em] absolute cursor-pointer text-error bottom-5 right-4 text-2xl" />
|
||||
<h1 className="text-2xl">{name}</h1>
|
||||
<p className="my-2">{description}</p>
|
||||
<input type="text" placeholder="Naziv računa" className="input input-bordered w-full" value="GSKG" />
|
||||
<textarea className="textarea textarea-bordered my-1 w-full max-w-sm block" placeholder="Opis" value="Pričuva, Voda, Smeće"></textarea>
|
||||
<a href="#document.pdf" className='text-center block max-w-[24em] text-nowrap truncate inline-block'>
|
||||
<DocumentIcon className="h-[1em] w-[1em] text-2xl inline-block mr-1" />
|
||||
2023-22-12 document GSKG račun za 2023.pdf
|
||||
@@ -1,16 +0,0 @@
|
||||
import { FC } from "react";
|
||||
|
||||
export interface BillTemplateFormProps {
|
||||
|
||||
}
|
||||
|
||||
export const BillTemplateForm:FC<BillTemplateFormProps> = () =>
|
||||
<div className="card card-compact card-bordered max-w-sm bg-base-100 shadow-s my-1">
|
||||
<div className="card-body">
|
||||
<form>
|
||||
<input type="text" placeholder="Naziv računa" className="input input-bordered w-full" value="GSKG" />
|
||||
<textarea className="textarea textarea-bordered my-1 w-full max-w-sm block" placeholder="Opis" value="Pričuva, Voda, Smeće"></textarea>
|
||||
<button className="btn btn-primary">Spremi</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>;
|
||||
@@ -1,3 +1,4 @@
|
||||
import { TrashIcon } from "@heroicons/react/24/outline";
|
||||
import { FC } from "react";
|
||||
|
||||
export interface LocationEditFormProps {
|
||||
@@ -8,6 +9,7 @@ export const LocationEditForm:FC<LocationEditFormProps> = () =>
|
||||
<div className="card card-compact card-bordered max-w-sm bg-base-100 shadow-s my-1">
|
||||
<div className="card-body">
|
||||
<form>
|
||||
<TrashIcon className="h-[1em] w-[1em] absolute cursor-pointer text-error bottom-5 right-4 text-2xl" />
|
||||
<input type="text" placeholder="Naziv lokacije" className="input input-bordered w-full" defaultValue="Budakova" />
|
||||
<textarea className="textarea textarea-bordered my-1 w-full max-w-sm block" placeholder="Opis" value="Stan u Budakovoj"></textarea>
|
||||
<button className="btn btn-primary">Spremi</button>
|
||||
|
||||
Reference in New Issue
Block a user