|
...
|
...
|
@@ -42,14 +42,14 @@ class Channel extends Model |
|
|
|
return [
|
|
|
|
'zone_id' => $channel['zone_id'] ?? 0,
|
|
|
|
'channel_id' => $channel['id'] ?? 0,
|
|
|
|
'user_id' => $user['id'] ?? 0,
|
|
|
|
'user_id' => $user['id'] ?? $sales,
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
public static function getChannelText($sales_id){
|
|
|
|
$user = User::where('id', $sales_id)->select(['name', 'channel_id'])->first();
|
|
|
|
if(!$user){
|
|
|
|
return '';
|
|
|
|
return $sales_id;
|
|
|
|
}
|
|
|
|
$channel_alias = self::where('id', $user['channel_id'])->value('alias');
|
|
|
|
return $channel_alias . '-' . $user['name'];
|
...
|
...
|
|