pojednostavljeni edit form-ovi

This commit is contained in:
2024-01-04 11:31:35 +01:00
parent b653ce40bc
commit b168e6086f
4 changed files with 8 additions and 25 deletions

View File

@@ -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

View File

@@ -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>;

View File

@@ -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>