diff --git a/wwwroot/index.ui b/wwwroot/index.ui index 2525bb7..f77aebe 100644 --- a/wwwroot/index.ui +++ b/wwwroot/index.ui @@ -1,3 +1,5 @@ +{% set roles = get_user_roles(get_user()) %} +{% set is_fin = ('owner.superuser' in roles) or ('owner.admin' in roles) or ('owner.account' in roles) or ('reseller.admin' in roles) or ('reseller.accountant' in roles) or ('reseller.operator' in roles) %} { "id": "app", "widgettype": "VBox", @@ -181,11 +183,6 @@ "label": "我的账户", "script": "this.open_tab({name:'acc_myaccounts',label:'我的账户',url:'/accounting/myaccounts.ui',removable:true})" }, - { - "name": "acc_balance", - "label": "账户余额", - "script": "this.open_tab({name:'acc_balance',label:'账户余额',url:'/accounting/acc_balance/index.ui',removable:true})" - }, { "name": "acc_detail", "label": "账务明细", @@ -196,6 +193,18 @@ "label": "账单", "script": "this.open_tab({name:'acc_billing',label:'账单',url:'/accounting/billing.ui',removable:true})" }, + { + "name": "acc_mycredit", + "label": "我的信用额度", + "script": "this.open_tab({name:'acc_mycredit',label:'我的信用额度',url:'/accounting/credit_limit/credit_overview.ui',removable:true})" + } +{% if is_fin %} + , + { + "name": "acc_balance", + "label": "账户余额", + "script": "this.open_tab({name:'acc_balance',label:'账户余额',url:'/accounting/acc_balance/index.ui',removable:true})" + }, { "name": "acc_subject", "label": "科目配置", @@ -231,6 +240,7 @@ "label": "记账日志", "script": "this.open_tab({name:'acc_log',label:'记账日志',url:'/accounting/accounting_log/index.ui',removable:true})" } +{% endif %} ] }, {