add client api
This commit is contained in:
parent
7962b26c6c
commit
af3988ef0d
|
|
@ -38,7 +38,7 @@ public function create()
|
|||
{
|
||||
return response([
|
||||
'success' => false,
|
||||
'message' => trans('app.application.fill_profile_message'),
|
||||
'message' => trans('application.fill_profile_message'),
|
||||
],400);
|
||||
}
|
||||
//validate legalization number exists
|
||||
|
|
@ -48,7 +48,7 @@ public function create()
|
|||
|
||||
return response([
|
||||
'success' => false,
|
||||
'message' => trans('app.application.expire_message')
|
||||
'message' => trans('application.expire_message')
|
||||
],400);
|
||||
}
|
||||
|
||||
|
|
@ -76,7 +76,7 @@ public function create()
|
|||
{
|
||||
return response([
|
||||
'success' => false,
|
||||
'message' => trans('app.application.list_not_found')
|
||||
'message' => trans('application.list_not_found')
|
||||
],400);
|
||||
}
|
||||
|
||||
|
|
@ -136,7 +136,7 @@ public function apply()
|
|||
{
|
||||
return response([
|
||||
'success' => false,
|
||||
'message' => trans('app.application.required_docs_message')
|
||||
'message' => trans('application.required_docs_message')
|
||||
],422);
|
||||
}
|
||||
|
||||
|
|
@ -146,14 +146,14 @@ public function apply()
|
|||
//todo send email to operators
|
||||
return response([
|
||||
'success' => true,
|
||||
'message' => trans('app.application.app_success_message')
|
||||
'message' => trans('application.app_success_message')
|
||||
]);
|
||||
|
||||
}
|
||||
|
||||
return response([
|
||||
'success' => false,
|
||||
'message' => trans('app.application.app_error_message')
|
||||
'message' => trans('application.app_error_message')
|
||||
],400);
|
||||
|
||||
}
|
||||
|
|
@ -197,7 +197,7 @@ public function upload(DocumentUploadRequest $request,$attachment_id)
|
|||
$attachment->type = $uploadedFile->getClientOriginalExtension();
|
||||
$attachment->save();
|
||||
|
||||
return response()->json(['success' => true, 'message' =>'Uploaded successfully']);
|
||||
return response()->json(['success' => true, 'message' =>trans('')]);
|
||||
|
||||
//todo make attachment relation
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,20 +16,12 @@ public function exportAccount($hashedTooken){
|
|||
$account = $user->account()->with('profile')->first();
|
||||
//dd(json_decode($account->bank));
|
||||
|
||||
if($account->type == 'business'){
|
||||
$headers = array(
|
||||
"Content-type"=>"text/html",
|
||||
"Content-Disposition"=>"attachment;Filename=" . $account->profile->name . "_" . $account->profile->surname . ".doc"
|
||||
);
|
||||
$content = view('oprosniki.business', ['account' => $account])->render();
|
||||
}
|
||||
else{
|
||||
$headers = array(
|
||||
"Content-type"=>"text/html",
|
||||
"Content-Disposition"=>"attachment;Filename=" . $account->profile->name ?? '_' . ".doc"
|
||||
);
|
||||
$content = view('oprosniki.company', ['account' => $account])->render();
|
||||
}
|
||||
$headers = array(
|
||||
"Content-type"=>"text/html",
|
||||
"Content-Disposition"=>"attachment;Filename=Sowalnama.doc"
|
||||
);
|
||||
|
||||
$content = view('oprosniki.'.$account->type, ['account' => $account])->render();
|
||||
return \Response::make($content,200, $headers);
|
||||
}
|
||||
|
||||
|
|
@ -37,20 +29,12 @@ public function export($id){
|
|||
$account = Account::with('profile')->find($id);
|
||||
//dd(json_decode($account->bank));
|
||||
|
||||
if($account->type == 'business'){
|
||||
$headers = array(
|
||||
"Content-type"=>"text/html",
|
||||
"Content-Disposition"=>"attachment;Filename=" . $account->profile->name . "_" . $account->profile->surname . ".doc"
|
||||
);
|
||||
$content = view('oprosniki.business', ['account' => $account])->render();
|
||||
}
|
||||
else{
|
||||
$headers = array(
|
||||
"Content-type"=>"text/html",
|
||||
"Content-Disposition"=>"attachment;Filename=" . $account->profile->name . ".doc"
|
||||
);
|
||||
$content = view('oprosniki.company', ['account' => $account])->render();
|
||||
}
|
||||
$headers = array(
|
||||
"Content-type"=>"text/html",
|
||||
"Content-Disposition"=>"attachment;Filename=Sowalnama.doc"
|
||||
);
|
||||
|
||||
$content = view('oprosniki.'.$account->type, ['account' => $account])->render();
|
||||
return \Response::make($content,200, $headers);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
'required_docs_message' => 'Upload all required documents first!',
|
||||
'app_success_message' => 'Application successful',
|
||||
'app_error_message' => 'This application is not applicable',
|
||||
'upload_success' => 'Uploaded successfully'
|
||||
],
|
||||
'ticket' =>[
|
||||
'not_found' => "There is no ticket id with value: :id"
|
||||
|
|
|
|||
|
|
@ -11,5 +11,14 @@
|
|||
],
|
||||
'account'=> [
|
||||
"not_found" => 'Account not found',
|
||||
]
|
||||
];
|
||||
],
|
||||
'application' => [
|
||||
'fill_profile_message' => 'Please fill your profile information first!',
|
||||
'expire_message' => 'Dine Legalizasia nomerinizin mohletinin gutarmagyna 1 ay wagt galanda arza doredip bilyaniz',
|
||||
'list_not_found' => 'Required documents list was not found',
|
||||
'required_docs_message' => 'Upload all required documents first!',
|
||||
'app_success_message' => 'Application successful',
|
||||
'app_error_message' => 'This application is not applicable',
|
||||
'upload_success' => 'Uploaded successfully'
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -11,5 +11,14 @@
|
|||
],
|
||||
'account'=> [
|
||||
"not_found" => 'Akkaunt tapylmady',
|
||||
]
|
||||
],
|
||||
'application' => [
|
||||
'fill_profile_message' => 'Please fill your profile information first!',
|
||||
'expire_message' => 'Dine Legalizasia nomerinizin mohletinin gutarmagyna 1 ay wagt galanda arza doredip bilyaniz',
|
||||
'list_not_found' => 'Required documents list was not found',
|
||||
'required_docs_message' => 'Upload all required documents first!',
|
||||
'app_success_message' => 'Application successful',
|
||||
'app_error_message' => 'This application is not applicable',
|
||||
'upload_success' => 'Uploaded successfully'
|
||||
],
|
||||
];
|
||||
|
|
|
|||
Loading…
Reference in New Issue