Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Rik Jurgens committed Dec 13, 2019
2 parents 270afb7 + 3648600 commit c412fb0
Show file tree
Hide file tree
Showing 26 changed files with 571 additions and 97 deletions.
3 changes: 1 addition & 2 deletions app/Http/Controllers/Auth/RegisterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

namespace App\Http\Controllers\Auth;

use App\Companydetail;
use App\Http\Controllers\Controller;
use App\User;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\RegistersUsers;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Validator;
Expand Down
99 changes: 99 additions & 0 deletions app/Http/Controllers/OffermailController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
<?php

namespace App\Http\Controllers;

use App\lease;
use App\offermail;
use App\Quotation;
use Illuminate\Http\Request;

class OffermailController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
//
}

/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
return view('Sales.offermail');
}

/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
$quotation_id = $request->get('quotation_id');

//dd($quotation_id);
// dd($request);

// in de request staat een quotation_id;

return (new \App\Mail\OfferMail($request, $quotation_id) ); // stuur e-mail, maar geef quotation_id mee


//return redirect()->route('offermail.create');
}

/**
* Display the specified resource.
*
* @param \App\offermail $offermail
* @return \Illuminate\Http\Response
*/
public function show( $id )
{
$quotation = Quotation::find($id);

return view('Sales.offershow', ['quotation' => $quotation]);
}

/**
* Show the form for editing the specified resource.
*
* @param \App\offermail $offermail
* @return \Illuminate\Http\Response
*/
public function edit(offermail $offermail)
{
//
}

/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param \App\offermail $offermail
* @return \Illuminate\Http\Response
*/
public function update(Request $request, offermail $offermail)
{
//
}

/**
* Remove the specified resource from storage.
*
* @param \App\offermail $offermail
* @return \Illuminate\Http\Response
*/
public function destroy(offermail $offermail)
{
//
}
}
96 changes: 96 additions & 0 deletions app/Http/Controllers/WorkordermailController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<?php

namespace App\Http\Controllers;

use App\Workorder;
use App\workordermail;
use App\workproduct;
use Illuminate\Http\Request;

class WorkordermailController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
//
}

/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
return view('Maintenance.workordermail');
}

/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
$workorder_id = $request->get('workorder_id');
//echo '$workorder_id: ' . $workorder_id;
//dd($request);


// in de request staat een quotation_id;

return (new \App\Mail\workordermail($request, $workorder_id) );
}

/**
* Display the specified resource.
*
* @param \App\workordermail $workordermail
* @return \Illuminate\Http\Response
*/
public function show( $id)
{
$workorder_id = Workorder::find($id);
$workordersproduct_id = workproduct::find($id);

return view('Maintenance.workordershow', ['workorder' => $workorder_id], ['workproduct' => $workordersproduct_id]);
}
/**
* Show the form for editing the specified resource.
*
* @param \App\workordermail $workordermail
* @return \Illuminate\Http\Response
*/
public function edit(workordermail $workordermail)
{
//
}

/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param \App\workordermail $workordermail
* @return \Illuminate\Http\Response
*/
public function update(Request $request, workordermail $workordermail)
{
//
}

/**
* Remove the specified resource from storage.
*
* @param \App\workordermail $workordermail
* @return \Illuminate\Http\Response
*/
public function destroy(workordermail $workordermail)
{
//
}
}
2 changes: 1 addition & 1 deletion app/Http/Middleware/CheckForMaintenanceMode.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class CheckForMaintenanceMode extends Middleware
{
/**
* The URIs that should be reachable while maintenance mode is enabled.
* The URIs that should be reachable while headmaintenancemail mode is enabled.
*
* @var array
*/
Expand Down
39 changes: 39 additions & 0 deletions app/Mail/OfferMail.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php

namespace App\Mail;

use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Http\Request;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;

class OfferMail extends Mailable
{
use Queueable, SerializesModels;

public $quotation_id;

/**
* Create a new message instance.
*
* @return void
*/
public function __construct($request, $quotation_id)
{
$this->quotation_id = $quotation_id;
}

/**
* Build the message.
*
* @return $this
*/
public function build()
{
// Als het goed is, wordt hier nu (/straks) een quotation_id meegegeven.


return $this->markdown('emails.offermail')->with('quotation_id', $this->quotation_id); // Geef nog het quotation_id mee om de mail op te kunnen stellen.
}
}
33 changes: 0 additions & 33 deletions app/Mail/maintenance.php

This file was deleted.

38 changes: 38 additions & 0 deletions app/Mail/workordermail.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php

namespace App\Mail;

use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;

class workordermail extends Mailable
{
use Queueable, SerializesModels;

public $workorder_id;
public $workorderproduct_id;


/**
* Create a new message instance.
*
* @return void
*/
public function __construct($request, $workorder_id, $workorderproduct_id)
{
$this->workorder_id = $workorder_id;
$this->workorderproduct_id = $workorderproduct_id;
}

/**
* Build the message.
*
* @return $this
*/
public function build()
{
return $this->markdown('emails.workordermail')->with('workorder_id', $this->workorder_id, 'workorderproduct_id', $this->workorderproduct_id);
}
}
10 changes: 10 additions & 0 deletions app/offermail.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class offermail extends Model
{
//
}
10 changes: 10 additions & 0 deletions app/workordermail.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class workordermail extends Model
{
//
}
4 changes: 2 additions & 2 deletions database/seeds/users.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ public function run()
]);

\App\User::insert([
'email'=> 'maintenance@barroc.nl',
'name'=> 'maintenance',
'email'=> 'headmaintenancemail@barroc.nl',
'name'=> 'headmaintenancemail',
'password'=> Hash::make('barroc123'),
'role_id' => 3
]);
Expand Down
Loading

0 comments on commit c412fb0

Please sign in to comment.