feat: 支持角色身份自定义名称全链路配置与动态展示
这个提交包含在:
@@ -23,7 +23,10 @@ class Agent extends Common
|
||||
'identity_text',
|
||||
'identities',
|
||||
'is_partner',
|
||||
'is_advanced',
|
||||
'maker_level_name',
|
||||
'role_names',
|
||||
'custom_role_names',
|
||||
'voucher_available',
|
||||
'active_30d',
|
||||
'madow_value',
|
||||
@@ -93,11 +96,26 @@ class Agent extends Common
|
||||
return \addons\shopro\service\partner\IdentityService::build($data)['is_partner'];
|
||||
}
|
||||
|
||||
public function getIsAdvancedAttr($value, $data)
|
||||
{
|
||||
return \addons\shopro\service\partner\IdentityService::build($data)['is_advanced'] ?? false;
|
||||
}
|
||||
|
||||
public function getMakerLevelNameAttr($value, $data)
|
||||
{
|
||||
return \addons\shopro\service\partner\IdentityService::build($data)['maker_level_name'];
|
||||
}
|
||||
|
||||
public function getRoleNamesAttr($value, $data)
|
||||
{
|
||||
return \addons\shopro\service\partner\IdentityService::build($data)['role_names'] ?? \addons\shopro\service\partner\PartnerConfig::roleNames();
|
||||
}
|
||||
|
||||
public function getCustomRoleNamesAttr($value, $data)
|
||||
{
|
||||
return $this->getRoleNamesAttr($value, $data);
|
||||
}
|
||||
|
||||
public function getVoucherAvailableAttr($value, $data)
|
||||
{
|
||||
$released = (float) ($data['voucher_released'] ?? 0);
|
||||
|
||||
在新工单中引用
屏蔽一个用户