Changes
Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
co-authored by
renee-png
parent
ea2d189380
commit
c6567de101
@@ -349,6 +349,25 @@ export function HeaderTimer() {
|
||||
</div>
|
||||
</PopoverContent>
|
||||
</Popover>
|
||||
<NewFeeItemDialog
|
||||
open={showNewFee}
|
||||
onOpenChange={setShowNewFee}
|
||||
defaultDescription={timer.description}
|
||||
defaultAmount={effectiveRate || undefined}
|
||||
defaultPricingType={isFlatFee ? "flat" : "hourly"}
|
||||
defaultBillable={billable}
|
||||
onCreated={(item) => {
|
||||
setFeeItems((prev) =>
|
||||
[...prev, { id: item.id, name: item.name, description: item.description, amount: Number(item.amount), pricing_type: item.pricing_type }]
|
||||
.sort((a, b) => a.name.localeCompare(b.name)),
|
||||
);
|
||||
setFeeItemId(item.id);
|
||||
if (!timer.description.trim()) {
|
||||
setDescription(item.description?.trim() || item.name);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user