Changes
Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
co-authored by
renee-png
parent
d1a9c7d978
commit
5786976405
@@ -58,6 +58,7 @@ function FeeSchedulePage() {
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [editing, setEditing] = useState<Partial<FeeItem> | null>(null);
|
||||
const [importing, setImporting] = useState<"time" | "expense" | null>(null);
|
||||
const [bulk, setBulk] = useState<{ category: "time" | "expense"; ids: string[] } | null>(null);
|
||||
|
||||
const load = async () => {
|
||||
setLoading(true);
|
||||
@@ -97,7 +98,9 @@ function FeeSchedulePage() {
|
||||
<p className="text-sm text-muted-foreground max-w-2xl">
|
||||
Define reusable billable items. Time fees set the hourly rate when
|
||||
logging time; expense fees auto-fill the amount when adding an
|
||||
expense. The billable flag becomes the default for new entries.
|
||||
expense. The billable flag becomes the default for new entries. If a
|
||||
time item's rate is left at $0, the user's profile hourly rate is used
|
||||
when logging time.
|
||||
</p>
|
||||
<Button onClick={() => setEditing({ category: "time", pricing_type: "hourly", billable: true, active: true, amount: 0 })}>
|
||||
<Plus className="h-4 w-4 mr-2" /> Add fee item
|
||||
@@ -113,6 +116,7 @@ function FeeSchedulePage() {
|
||||
onEdit={setEditing}
|
||||
onDelete={remove}
|
||||
onImport={() => setImporting("time")}
|
||||
onBulkEdit={(ids) => setBulk({ category: "time", ids })}
|
||||
/>
|
||||
|
||||
<FeeSection
|
||||
@@ -124,6 +128,7 @@ function FeeSchedulePage() {
|
||||
onEdit={setEditing}
|
||||
onDelete={remove}
|
||||
onImport={() => setImporting("expense")}
|
||||
onBulkEdit={(ids) => setBulk({ category: "expense", ids })}
|
||||
/>
|
||||
|
||||
<FeeEditDialog
|
||||
@@ -138,6 +143,15 @@ function FeeSchedulePage() {
|
||||
onClose={() => setImporting(null)}
|
||||
onSaved={load}
|
||||
/>
|
||||
|
||||
<FeeBulkEditDialog
|
||||
bulk={bulk}
|
||||
onClose={() => setBulk(null)}
|
||||
onSaved={() => {
|
||||
setBulk(null);
|
||||
load();
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user