diff --git a/wwwroot/index.ui b/wwwroot/index.ui index f77aebe..e6f53e0 100644 --- a/wwwroot/index.ui +++ b/wwwroot/index.ui @@ -1,5 +1,7 @@ {% 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) %} +{% set is_customer = ('customer.customer' in roles) or ('*.customer' in roles) %} +{% set is_admin = ('owner.superuser' in roles) or ('owner.admin' in roles) or ('*.superuser' in roles) or ('*.admin' in roles) %} { "id": "app", "widgettype": "VBox", @@ -107,12 +109,36 @@ "height": "100%", "target": "app.main_content", "items": [ +{% if is_customer and not is_admin %} { - "name": "pipeline_core", - "label": "产线管理", - "icon": "{{entire_url('/imgs/cubes.svg')}}", - "script": "this.open_tab({name:'pipeline_core',label:'产线管理',url:'/pipeline_core',removable:true})" + "name": "product_showcase", + "label": "产品展示", + "icon": "", + "script": "this.open_tab({name:'product_showcase',label:'产品展示',url:'/product_management/storefront/index.ui',removable:true})" }, + { + "name": "cust_account", + "label": "我的账户", + "icon": "", + "items": [ + { + "name": "cust_recharge", + "label": "充值", + "script": "this.open_tab({name:'cust_recharge',label:'充值',url:'/unipay/recharge.ui',removable:true})" + }, + { + "name": "cust_myaccounts", + "label": "我的账户", + "script": "this.open_tab({name:'cust_myaccounts',label:'我的账户',url:'/accounting/myaccounts.ui',removable:true})" + }, + { + "name": "cust_subscriptions", + "label": "我的权益", + "script": "this.open_tab({name:'cust_subscriptions',label:'我的权益',url:'/product_management/storefront/api/my_subscriptions.dspy',removable:true})" + } + ] + } +{% else %} { "name": "llm_manage", "label": "模型管理", @@ -486,6 +512,7 @@ } ] } +{% endif %} ] } }