mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/unity.git
synced 2026-08-19 12:24:01 +00:00
contract template obligation contract template dependency UI
This commit is contained in:
@@ -32,7 +32,9 @@ class ContractTemplateObligationDependencyModule extends BaseController
|
||||
public static function list(Request $request)
|
||||
{
|
||||
General::storeCachePerviousQuery($request->query(), 'contract_template_obligation_dependency_query');
|
||||
|
||||
|
||||
$contract_template_obligation_hash_id = $contract_template_obligation_id = $request->get('contract_template_obligation_id', []);
|
||||
|
||||
$name = $request->get('name', null);
|
||||
$status = $request->get('status', []);
|
||||
$page = $request->get('page', null);
|
||||
@@ -40,7 +42,12 @@ class ContractTemplateObligationDependencyModule extends BaseController
|
||||
|
||||
$query = ContractTemplateObligationDependency::query();
|
||||
|
||||
if (strlen($name) > 0) {
|
||||
if (!empty($contract_template_obligation_id)) {
|
||||
$contract_template_obligation_id = Hasher::decodeArray('contract_template_obligations', $contract_template_obligation_id);
|
||||
$query->whereIn('contract_template_obligation_id', $contract_template_obligation_id);
|
||||
}
|
||||
|
||||
if (strlen($name) > 0) {
|
||||
$query->where('name', 'like', '%' . $name . '%');
|
||||
}
|
||||
|
||||
@@ -53,6 +60,7 @@ class ContractTemplateObligationDependencyModule extends BaseController
|
||||
$query->orderBy('id', 'desc');
|
||||
|
||||
$params = [
|
||||
'contract_template_obligation_id' => $contract_template_obligation_hash_id,
|
||||
'name' => $name,
|
||||
'status' => $status,
|
||||
'page' => $page
|
||||
@@ -154,12 +162,12 @@ class ContractTemplateObligationDependencyModule extends BaseController
|
||||
'required',
|
||||
new UnderCheck('contract_template_obligation'),
|
||||
new ExistCheck('contract_template_obligation'),
|
||||
new ContractTemplateObligationDependencyCheck($data['depend_contract_template_obligation_id'] ?? [])
|
||||
],
|
||||
'depend_contract_template_obligation_id' => [
|
||||
'required',
|
||||
new UnderCheck('contract_template_obligation'),
|
||||
new ExistCheck('contract_template_obligation')
|
||||
new ExistCheck('contract_template_obligation'),
|
||||
new ContractTemplateObligationDependencyCheck($data['contract_template_obligation_id'] ?? [])
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user