aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/SetType.svelte
blob: 7e80d0bc60370785a53754c4231a4aefd355d4a2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<script>
  import InvoiceTypes from "$comp/InvoiceTypes.svelte";
  import { focus } from "$lib/utils";

  let {
    newAmount = $bindable(),
    invoice,
    user,
    submit = $bindable(),
    settingType,
    setAmount,
    setType,
    toggleType,
    t,
  } = $props();

  let { aid, type } = $derived(invoice);
</script>

{#if settingType}
  <div
    class="fixed inset-0 bg-base-100 bg-opacity-90 overflow-y-auto h-full w-full z-50"
  >
    <div
      class="relative mx-auto p-12 max-w-xl shadow-lg rounded-md bg-base-100 space-y-2"
    >
      <InvoiceTypes
        bind:newAmount
        {setAmount}
        {invoice}
        {user}
        {setType}
        t={$t}
      />
    </div>
  </div>
{/if}