generated from liutk/owl-admin-base
workflow
parent
cb8a32101b
commit
5772c4f002
|
|
@ -211,9 +211,7 @@ class WorkFlowService extends BaseService
|
||||||
}
|
}
|
||||||
$checkValue = [$user->id];
|
$checkValue = [$user->id];
|
||||||
if ($user->jobs && $user->jobs->count() > 0) {
|
if ($user->jobs && $user->jobs->count() > 0) {
|
||||||
$max = $user->jobs->max('sort');
|
foreach($user->jobs as $item) {
|
||||||
$jobs = Keyword::where('parent_key', 'job')->where('sort', '<', $max)->get();
|
|
||||||
foreach($user->jobs->merge($jobs) as $item) {
|
|
||||||
array_push($checkValue, $user->store_id . '-' . $item->key);
|
array_push($checkValue, $user->store_id . '-' . $item->key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ class EmployeePromotionResource extends JsonResource
|
||||||
'promotion_status_text' => $this->promotion_status->text(),
|
'promotion_status_text' => $this->promotion_status->text(),
|
||||||
'employee_data' => $this->employee_data,
|
'employee_data' => $this->employee_data,
|
||||||
'created_at' => $this->created_at->timestamp,
|
'created_at' => $this->created_at->timestamp,
|
||||||
|
'created_format' => $this->created_at->format('Y-m-d H:i:s'),
|
||||||
|
|
||||||
'workflow_check' => WorkflowCheckResource::make($this->whenLoaded('workflow')),
|
'workflow_check' => WorkflowCheckResource::make($this->whenLoaded('workflow')),
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -40,9 +40,7 @@ class WorkflowLog extends Model
|
||||||
$checkValue = [$user->id];
|
$checkValue = [$user->id];
|
||||||
$userJobs = $user->jobs;
|
$userJobs = $user->jobs;
|
||||||
if ($userJobs && $userJobs->count() > 0) {
|
if ($userJobs && $userJobs->count() > 0) {
|
||||||
$max = $userJobs->max('sort');
|
foreach($userJobs->unique('key') as $item) {
|
||||||
$jobs = Keyword::where('parent_key', 'job')->where('sort', '<=', $max)->get();
|
|
||||||
foreach($userJobs->merge($jobs)->unique('key') as $item) {
|
|
||||||
array_push($checkValue, $user->store_id . '-' . $item->key);
|
array_push($checkValue, $user->store_id . '-' . $item->key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue