-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master'
- Loading branch information
Showing
26 changed files
with
571 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
{ | ||
// | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
{ | ||
// | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
{ | ||
// | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
{ | ||
// | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.