Bläddra i källkod

Merge http://git.swisslink.com.my/SwissLink/allo into allo_data_retrieve

allo_data_retrieve
Muadz Azmi 4 år sedan
förälder
incheckning
bb18e36040

+ 4
- 3
app/Http/Controllers/Api/FormController.php Visa fil

@@ -97,7 +97,7 @@ class FormController extends BaseController

public function get_data_form(Request $request){

$dateS = Carbon::createFromFormat('Y-m-d', '2020-12-01');
$dateS = Carbon::createFromFormat('Y-m-d', '2020-01-01');
$start = $dateS->copy()->startOfDay();
$dateE = Carbon::createFromFormat('Y-m-d', '2021-12-31');
$end = $dateE->copy()->endOfDay();
@@ -179,8 +179,9 @@ class FormController extends BaseController
}
array_push($result,array(
'type_application' => $f->type_application,
"type_service" => $f->type_service,
'type_application' => $f->type_application,
'customer_category' => $f->customer_category,
"type_service" => $f->type_service,
"customer_name"=> $name,
"ic" => $ic,
//"company_reg" => $company_reg,

+ 8
- 7
app/Http/Controllers/Contractor/ContractorController.php Visa fil

@@ -826,21 +826,22 @@ class ContractorController extends Controller
public function deleteInstaller(Request $request){

$staff = Staff::where('_id',$request->id)->first();
info("delete installer" . $request->id);

if(!empty($staff)){
$st = StaffDetail::where('email',$staff->email)->first();
if(!empty($st)){
$st->delete();
$staff->delete();
}

$wo = WorkOrder::where('installer_id',$request->id)->where('status','like','%Pending%')->get();
foreach ($wo as $w){
$wo = WorkOrder::where('installer_id', $request->id)->where('status', 'like', '%Pending%')->get();
foreach ($wo as $w) {
$w->status = "Pending Contractor";
$w->installer_id = "";
$w->save();
}
if(!empty($st)){
$st->delete();
$staff->delete();
}
return 'true';
}else {

+ 11
- 9
app/Http/Controllers/Controller.php Visa fil

@@ -151,17 +151,19 @@ class Controller extends BaseController

public function getDatabase(Request $request)
{
$subscriber = Subscriber::where('name',$request->name)->first();
// $form = Form::where('_id',$subscriber->_id)->withTrashed()->first();
// $work_order = WorkOrder::where('_id',$subscriber->_id)->withTrashed()->first();

$formHistory = FormStatus::where('form_id',$subscriber->_id)->get();

return $formHistory;
$staff = Staff::with('staffdetail')->where('email', 'dealer@test.my')->first();
$company = Company::where('name', 'TNBX Sdn Bhd')->first();
$staff->company_id = $company->_id;
$staff->save();
$staffD = StaffDetail::where('_id',$staff->_id)->first();
$staffD->company_id = $company->_id;
$staffD->save();
return $company . $staff . $staffD;
}

public function adjustInstaller(){
$wo = WorkOrder::where('installer_id', '5f606ed1a1f29b50e429a422')->where('status', 'like', '%Pending%')->get();
public function adjustInstaller(Request $request){
$wo = WorkOrder::where('installer_id', $request->id)->where('status', 'like', '%Pending%')->get();
foreach ($wo as $w) {
$w->status = "Pending Contractor";
$w->installer_id = "";

+ 4
- 4
resources/views/pdf/agent-claim.blade.php Visa fil

@@ -67,7 +67,7 @@
<table width="100%">
<tr>
<td align="left" style="width: 50%;"><h3>{{ $com->name }}</h3></td>
<td align="right" style="width: 50%;"><h3>Allo Sdn. Bhd</h3></td>
<td align="right" style="width: 50%;"><h3>Allo Technology Sdn. Bhd.</h3></td>
</tr>
<tr>
<td align="left" style="width: 50%;">
@@ -196,7 +196,7 @@
<tr>
<th width="33%">Submitted By</th>
<th width="33%">Verified By</th>
<th width="33%">Approved By</th>
<th width="33%">Acknowledged By</th>
</tr>
<tr>
<td height="50"></td>
@@ -220,7 +220,7 @@
<table width="100%">
<tr style="width: 100%;">
<td align="left" style="width: 100%;">
&copy; Allo Sdn Bhd - All rights reserved.
&copy; Allo Technology Sdn. Bhd. - All rights reserved.
</td>
<!-- <td align="right" style="width: 50%;">
Company Slogan
@@ -230,4 +230,4 @@
</table>
</div>
</body>
</html>
</html>

Laddar…
Avbryt
Spara