diff --git a/client/src/AccountCard.svelte b/client/src/AccountCard.svelte index 0cbb161..37357b2 100644 --- a/client/src/AccountCard.svelte +++ b/client/src/AccountCard.svelte @@ -15,27 +15,7 @@ export let balance="5425"; export let iban="RONFOX62188921"; export let isExpanded=false; - export let transactions=[ - {title:"Transaction Name#1", status:"PROCESSED", amount:"-45,09", time:"15:38 27/11/2021", type:"send"}, - {title:"Transaction Name#2", status:"PENDING", amount:"+25,00", time:"15:38 27/11/2021", type:"received"}, - {title:"Transaction Name#3", status:"CANCELLED", amount:"-469,09", time:"15:38 27/11/2021", type:"send"}, - {title:"Transaction Name#1", status:"PROCESSED", amount:"-45,09", time:"15:38 27/11/2021", type:"send"}, - {title:"Transaction Name#2", status:"PENDING", amount:"+25,00", time:"15:38 27/11/2021", type:"received"}, - {title:"Transaction Name#3", status:"CANCELLED", amount:"-469,09", time:"15:38 27/11/2021", type:"send"}, - {title:"Transaction Name#1", status:"PROCESSED", amount:"-45,09", time:"15:38 27/11/2021", type:"send"}, - {title:"Transaction Name#2", status:"PENDING", amount:"+25,00", time:"15:38 27/11/2021", type:"received"}, - {title:"Transaction Name#3", status:"CANCELLED", amount:"-469,09", time:"15:38 27/11/2021", type:"send"}, - {title:"Transaction Name#1", status:"PROCESSED", amount:"-45,09", time:"15:38 27/11/2021", type:"send"}, - {title:"Transaction Name#2", status:"PENDING", amount:"+25,00", time:"15:38 27/11/2021", type:"received"}, - {title:"Transaction Name#3", status:"CANCELLED", amount:"-469,09", time:"15:38 27/11/2021", type:"send"}, - {title:"Transaction Name#1", status:"PROCESSED", amount:"-45,09", time:"15:38 27/11/2021", type:"send"}, - {title:"Transaction Name#2", status:"PENDING", amount:"+25,00", time:"15:38 27/11/2021", type:"received"}, - {title:"Transaction Name#3", status:"CANCELLED", amount:"-469,09", time:"15:38 27/11/2021", type:"send"}, - {title:"Transaction Name#1", status:"PROCESSED", amount:"-45,09", time:"15:38 27/11/2021", type:"send"}, - {title:"Transaction Name#2", status:"PENDING", amount:"+25,00", time:"15:38 27/11/2021", type:"received"}, - {title:"Transaction Name#3", status:"CANCELLED", amount:"-469,09", time:"15:38 27/11/2021", type:"send"}, - {title:"Transaction Name#4", status:"DECLINED", amount:"+469,09", time:"15:38 27/11/2021", type:"received"}, - ]; + export let transactions=[]; function copyIban(){ //todo: Code here @@ -63,16 +43,16 @@
- -

Balance: {balance}{currency}

+ +

Balance: {balance}{currency}

-
+
{#if isExpanded } {#each transactions as transaction} - +

{transaction.title}:

{transaction.amount} @@ -171,4 +151,33 @@ {/if}
- \ No newline at end of file + + + \ No newline at end of file diff --git a/client/src/MainPage.svelte b/client/src/MainPage.svelte index 1a62353..0d3931f 100644 --- a/client/src/MainPage.svelte +++ b/client/src/MainPage.svelte @@ -13,6 +13,36 @@ import AccountCard from './AccountCard.svelte'; let accountnr = "2"; let maincurrency = "RON"; + let accounts = [ + {type:"RON Account", currency:"RON", balance:"420,42", iban:"RONFOX62188921", isExpanded: false, + transactions: [ + {title:"Transaction Name#1", status:"PROCESSED", amount:"-45,09", time:"15:38 27/11/2021", type:"send"}, + {title:"Transaction Name#2", status:"PENDING", amount:"+25,00", time:"15:38 27/11/2021", type:"received"}, + {title:"Transaction Name#3", status:"CANCELLED", amount:"-469,09", time:"15:38 27/11/2021", type:"send"}, + {title:"Transaction Name#1", status:"PROCESSED", amount:"-45,09", time:"15:38 27/11/2021", type:"send"}, + {title:"Transaction Name#2", status:"PENDING", amount:"+25,00", time:"15:38 27/11/2021", type:"received"}, + {title:"Transaction Name#3", status:"CANCELLED", amount:"-469,09", time:"15:38 27/11/2021", type:"send"}, + {title:"Transaction Name#1", status:"PROCESSED", amount:"-45,09", time:"15:38 27/11/2021", type:"send"}, + {title:"Transaction Name#2", status:"PENDING", amount:"+25,00", time:"15:38 27/11/2021", type:"received"}, + {title:"Transaction Name#3", status:"CANCELLED", amount:"-469,09", time:"15:38 27/11/2021", type:"send"}, + {title:"Transaction Name#1", status:"PROCESSED", amount:"-45,09", time:"15:38 27/11/2021", type:"send"}, + {title:"Transaction Name#2", status:"PENDING", amount:"+25,00", time:"15:38 27/11/2021", type:"received"}, + {title:"Transaction Name#3", status:"CANCELLED", amount:"-469,09", time:"15:38 27/11/2021", type:"send"}, + {title:"Transaction Name#1", status:"PROCESSED", amount:"-45,09", time:"15:38 27/11/2021", type:"send"}, + {title:"Transaction Name#2", status:"PENDING", amount:"+25,00", time:"15:38 27/11/2021", type:"received"}, + {title:"Transaction Name#3", status:"CANCELLED", amount:"-469,09", time:"15:38 27/11/2021", type:"send"}, + ] + }, + {type:"EUR Account", currency:"EUR", balance:"620,42", iban:"EURFOX62188921", isExpanded: false, + transactions: [ + {title:"Transaction Name#1", status:"PROCESSED", amount:"-45,09", time:"15:38 27/11/2021", type:"send"}, + {title:"Transaction Name#2", status:"PENDING", amount:"+25,00", time:"15:38 27/11/2021", type:"received"}, + {title:"Transaction Name#3", status:"CANCELLED", amount:"-469,09", time:"15:38 27/11/2021", type:"send"}, + ] + }, + ]; + let expandedAccount = null; + function dispatchLogout(){ //todo: CHeck here dispatch("logOut",null); @@ -23,8 +53,7 @@ import AccountCard from './AccountCard.svelte'; dispatch("showNotifications",null); } - let accounts = [{}, {}]; - let expandedAccount = null; + function expanded(index) { if (!expandedAccount && expandedAccount !== 0) { @@ -40,10 +69,10 @@ import AccountCard from './AccountCard.svelte';
{#if expandedAccount || expandedAccount === 0} - expanded(null)}> + expanded(null)}> {:else} {#each accounts as account,i} - expanded(i)}> + expanded(i)}> {/each} {/if}