1
0
forked from s421507/eOSP2

Push między komputerami

This commit is contained in:
s421507 2020-03-25 00:20:45 +01:00
parent 7a9272b865
commit 4e3e3eecc1
19 changed files with 420 additions and 26 deletions

2
.idea/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# Datasource local storage ignored files
/dataSources.local.xml

11
.idea/dataSources.xml Normal file
View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
<data-source source="LOCAL" name="MySQL - homestead@127.0.0.1" uuid="c1b0f5b5-72cf-4997-ad36-886071681a36">
<driver-ref>mysql.8</driver-ref>
<synchronize>true</synchronize>
<jdbc-driver>com.mysql.cj.jdbc.Driver</jdbc-driver>
<jdbc-url>jdbc:mysql://127.0.0.1:3306/homestead</jdbc-url>
</data-source>
</component>
</project>

View File

@ -101,6 +101,9 @@
<path value="$PROJECT_DIR$/vendor/nexmo/client-core" /> <path value="$PROJECT_DIR$/vendor/nexmo/client-core" />
<path value="$PROJECT_DIR$/vendor/codedge/laravel-fpdf" /> <path value="$PROJECT_DIR$/vendor/codedge/laravel-fpdf" />
<path value="$PROJECT_DIR$/vendor/twbs/bootstrap" /> <path value="$PROJECT_DIR$/vendor/twbs/bootstrap" />
<path value="$PROJECT_DIR$/vendor/setasign/fpdf" />
<path value="$PROJECT_DIR$/vendor/setasign/fpdi" />
<path value="$PROJECT_DIR$/vendor/setasign/fpdi-fpdf" />
</include_path> </include_path>
</component> </component>
<component name="PhpProjectSharedConfiguration" php_language_level="7.1" /> <component name="PhpProjectSharedConfiguration" php_language_level="7.1" />

View File

@ -2,8 +2,20 @@
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="adc1032e-2c5f-4e68-bc22-d140f965f9d5" name="Default Changelist" comment=""> <list default="true" id="adc1032e-2c5f-4e68-bc22-d140f965f9d5" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/.idea/.gitignore" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/dataSources.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/app/Http/Controllers/wniosek_o_nadanie_odznaczenia.pdf" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resources/views/documentApplicationForm.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/php.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/php.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/operationsController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/operationsController.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/app/Http/Controllers/RegistrationController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/RegistrationController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/documentCreators.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/documentCreators.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/composer.json" beforeDir="false" afterPath="$PROJECT_DIR$/composer.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/composer.lock" beforeDir="false" afterPath="$PROJECT_DIR$/composer.lock" afterDir="false" />
<change beforePath="$PROJECT_DIR$/database/seeds/DatabaseSeeder.php" beforeDir="false" afterPath="$PROJECT_DIR$/database/seeds/DatabaseSeeder.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/documents.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/documents.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/inc/menu.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/inc/menu.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/routes/web.php" beforeDir="false" afterPath="$PROJECT_DIR$/routes/web.php" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -16,10 +28,36 @@
<executable /> <executable />
</execution> </execution>
</component> </component>
<component name="DatabaseView">
<option name="SHOW_INTERMEDIATE" value="true" />
<option name="GROUP_DATA_SOURCES" value="true" />
<option name="GROUP_SCHEMA" value="true" />
<option name="GROUP_CONTENTS" value="false" />
<option name="SORT_POSITIONED" value="false" />
<option name="SHOW_EMPTY_GROUPS" value="false" />
<option name="AUTO_SCROLL_FROM_SOURCE" value="false" />
<option name="HIDDEN_KINDS">
<set />
</option>
<expand>
<path>
<item name="Database" type="3277223f:DatabaseStructure$DbRootGroup" />
<item name="MySQL - homestead@127.0.0.1" type="feb32156:DbDataSourceImpl" />
</path>
</expand>
<select />
</component>
<component name="Git.Settings"> <component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" /> <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component> </component>
<component name="PhpWorkspaceProjectConfiguration"> <component name="IgnoredFileRootStore">
<option name="generatedRoots">
<set>
<option value="C:\Users\czup\PhpstormProjects\eOSP2\.idea" />
</set>
</option>
</component>
<component name="PhpWorkspaceProjectConfiguration" interpreter_name="PHP 7.2">
<include_path> <include_path>
<path value="$PROJECT_DIR$/vendor/monolog/monolog" /> <path value="$PROJECT_DIR$/vendor/monolog/monolog" />
<path value="$PROJECT_DIR$/vendor/lcobucci/jwt" /> <path value="$PROJECT_DIR$/vendor/lcobucci/jwt" />
@ -120,6 +158,9 @@
<path value="$PROJECT_DIR$/vendor/nexmo/client-core" /> <path value="$PROJECT_DIR$/vendor/nexmo/client-core" />
<path value="$PROJECT_DIR$/vendor/codedge/laravel-fpdf" /> <path value="$PROJECT_DIR$/vendor/codedge/laravel-fpdf" />
<path value="$PROJECT_DIR$/vendor/twbs/bootstrap" /> <path value="$PROJECT_DIR$/vendor/twbs/bootstrap" />
<path value="$PROJECT_DIR$/vendor/setasign/fpdf" />
<path value="$PROJECT_DIR$/vendor/setasign/fpdi" />
<path value="$PROJECT_DIR$/vendor/setasign/fpdi-fpdf" />
</include_path> </include_path>
</component> </component>
<component name="ProjectId" id="1W91DnkrissSXi0FRsBOInYJNVt" /> <component name="ProjectId" id="1W91DnkrissSXi0FRsBOInYJNVt" />
@ -129,22 +170,57 @@
<option name="showLibraryContents" value="true" /> <option name="showLibraryContents" value="true" />
</component> </component>
<component name="PropertiesComponent"> <component name="PropertiesComponent">
<property name="DatabaseDriversLRU" value="mysql" />
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" /> <property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" /> <property name="WebServerToolWindowFactoryState" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/database/migrations/x" /> <property name="js.buildTools.grunt.grunt-cli.package" value="" />
<property name="js.buildTools.gulp.gulp_package_dir" value="" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/public/img/left_menu_icon" />
<property name="nodejs.jest.jest_package" value="" />
<property name="nodejs.mocha.mocha_node_package_dir" value="" />
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" /> <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
<property name="nodejs_npm_path_reset_for_default_project" value="true" /> <property name="nodejs_npm_path_reset_for_default_project" value="true" />
<property name="nodejs_package_manager_path" value="npm" /> <property name="nodejs_package_manager_path" value="npm" />
<property name="settings.editor.selected.configurable" value="database.main" />
</component> </component>
<component name="RecentsManager"> <component name="RecentsManager">
<key name="MoveFile.RECENT_KEYS"> <key name="MoveFile.RECENT_KEYS">
<recent name="C:\Users\czup\PhpstormProjects\eOSP2\resources\views" />
<recent name="$PROJECT_DIR$/database/migrations" /> <recent name="$PROJECT_DIR$/database/migrations" />
</key> </key>
<key name="CopyFile.RECENT_KEYS"> <key name="CopyFile.RECENT_KEYS">
<recent name="C:\Users\czup\PhpstormProjects\eOSP2\public\img\left_menu_icon" />
<recent name="C:\Users\czup\PhpstormProjects\eOSP2\app\Http\Controllers" />
<recent name="C:\Users\czup\PhpstormProjects\eOSP2" />
<recent name="C:\Users\czup\PhpstormProjects\eOSP2\vendor" />
<recent name="$PROJECT_DIR$/database/migrations/x" /> <recent name="$PROJECT_DIR$/database/migrations/x" />
<recent name="$PROJECT_DIR$" />
</key> </key>
</component> </component>
<component name="RunManager">
<configuration name="Unnamed" type="docker-deploy" factoryName="docker-compose.yml" server-name="Docker">
<deployment type="docker-compose.yml">
<settings>
<option name="sourceFilePath" value="composer.json" />
</settings>
</deployment>
<method v="2" />
</configuration>
<configuration default="true" type="js.build_tools.grunt">
<node-interpreter value="project" />
<envs />
<method v="2" />
</configuration>
<configuration default="true" type="js.build_tools.gulp">
<node-interpreter>project</node-interpreter>
<node-options />
<gulpfile />
<tasks />
<arguments />
<envs />
<method v="2" />
</configuration>
</component>
<component name="ServiceViewManager"> <component name="ServiceViewManager">
<option name="viewStates"> <option name="viewStates">
<list> <list>
@ -173,7 +249,20 @@
<workItem from="1578546881124" duration="357000" /> <workItem from="1578546881124" duration="357000" />
<workItem from="1578547239701" duration="71154000" /> <workItem from="1578547239701" duration="71154000" />
<workItem from="1579902704711" duration="32414000" /> <workItem from="1579902704711" duration="32414000" />
<workItem from="1582764640549" duration="784000" /> <workItem from="1582764640549" duration="1792000" />
<workItem from="1583241286680" duration="2723000" />
<workItem from="1583256092210" duration="1716000" />
<workItem from="1583259193503" duration="1024000" />
<workItem from="1583260243594" duration="455000" />
<workItem from="1583260725384" duration="4320000" />
<workItem from="1583291158284" duration="2109000" />
<workItem from="1583293521736" duration="3253000" />
<workItem from="1583481374417" duration="1883000" />
<workItem from="1583491952975" duration="11797000" />
<workItem from="1583814153373" duration="3685000" />
<workItem from="1583818172415" duration="297000" />
<workItem from="1584513032559" duration="4015000" />
<workItem from="1585008405211" duration="1264000" />
</task> </task>
<servers /> <servers />
</component> </component>
@ -181,26 +270,53 @@
<option name="version" value="1" /> <option name="version" value="1" />
</component> </component>
<component name="WindowStateProjectService"> <component name="WindowStateProjectService">
<state x="703" y="357" width="559" height="390" key="#com.intellij.fileTypes.FileTypeChooser" timestamp="1578547861249"> <state x="348" y="67" key="#CLI_Interpreters" timestamp="1583241317032">
<screen x="67" y="27" width="1853" height="1053" /> <screen x="0" y="0" width="1536" height="824" />
</state> </state>
<state x="348" y="67" key="#CLI_Interpreters/0.0.1536.824@0.0.1536.824" timestamp="1583241317032" />
<state x="360" y="70" key="#Docker" timestamp="1583254845348">
<screen x="0" y="0" width="1536" height="824" />
</state>
<state x="360" y="70" key="#Docker/0.0.1536.824@0.0.1536.824" timestamp="1583254845348" />
<state x="468" y="42" key="#com.intellij.execution.impl.EditConfigurationsDialog" timestamp="1583262355627">
<screen x="0" y="0" width="1536" height="824" />
</state>
<state x="468" y="42" key="#com.intellij.execution.impl.EditConfigurationsDialog/0.0.1536.824@0.0.1536.824" timestamp="1583262355627" />
<state x="527" y="258" width="559" height="390" key="#com.intellij.fileTypes.FileTypeChooser" timestamp="1583256847898">
<screen x="0" y="0" width="1536" height="824" />
</state>
<state x="527" y="258" key="#com.intellij.fileTypes.FileTypeChooser/0.0.1536.824@0.0.1536.824" timestamp="1583256847898" />
<state x="703" y="357" width="559" height="390" key="#com.intellij.fileTypes.FileTypeChooser/67.27.1853.1053@67.27.1853.1053" timestamp="1578547861249" /> <state x="703" y="357" width="559" height="390" key="#com.intellij.fileTypes.FileTypeChooser/67.27.1853.1053@67.27.1853.1053" timestamp="1578547861249" />
<state x="726" y="310" width="524" height="484" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog" timestamp="1579901649291"> <state x="546" y="221" width="524" height="484" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog" timestamp="1583817494217">
<screen x="67" y="27" width="1853" height="1053" /> <screen x="0" y="0" width="1536" height="824" />
</state> </state>
<state x="546" y="221" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog/0.0.1536.824@0.0.1536.824" timestamp="1583817494217" />
<state x="726" y="310" width="524" height="484" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog/67.27.1853.1053@67.27.1853.1053" timestamp="1579901649290" /> <state x="726" y="310" width="524" height="484" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog/67.27.1853.1053@67.27.1853.1053" timestamp="1579901649290" />
<state x="167" y="125" width="1653" height="855" key="DiffContextDialog" timestamp="1579394466035"> <state x="167" y="125" width="1653" height="855" key="DiffContextDialog" timestamp="1579394466035">
<screen x="67" y="27" width="1853" height="1053" /> <screen x="67" y="27" width="1853" height="1053" />
</state> </state>
<state x="167" y="125" width="1653" height="855" key="DiffContextDialog/67.27.1853.1053@67.27.1853.1053" timestamp="1579394466035" /> <state x="167" y="125" width="1653" height="855" key="DiffContextDialog/67.27.1853.1053@67.27.1853.1053" timestamp="1579394466035" />
<state x="776" y="310" width="424" height="484" key="FileChooserDialogImpl" timestamp="1578547803408"> <state x="607" y="301" key="DockerComposeFileDialog" timestamp="1583254880063">
<screen x="67" y="27" width="1853" height="1053" />
</state>
<state x="776" y="310" width="424" height="484" key="FileChooserDialogImpl/67.27.1853.1053@67.27.1853.1053" timestamp="1578547803408" />
<state x="482" y="276" key="com.intellij.ide.util.TipDialog" timestamp="1582764836356">
<screen x="0" y="0" width="1536" height="824" /> <screen x="0" y="0" width="1536" height="824" />
</state> </state>
<state x="482" y="276" key="com.intellij.ide.util.TipDialog/0.0.1536.824@0.0.1536.824" timestamp="1582764836356" /> <state x="607" y="301" key="DockerComposeFileDialog/0.0.1536.824@0.0.1536.824" timestamp="1583254880063" />
<state x="912" y="146" width="424" height="484" key="FileChooserDialogImpl" timestamp="1583254878286">
<screen x="0" y="0" width="1536" height="824" />
</state>
<state x="912" y="146" key="FileChooserDialogImpl/0.0.1536.824@0.0.1536.824" timestamp="1583254878286" />
<state x="776" y="310" width="424" height="484" key="FileChooserDialogImpl/67.27.1853.1053@67.27.1853.1053" timestamp="1578547803408" />
<state x="604" y="336" key="NewPhpFileDialog" timestamp="1583816251531">
<screen x="0" y="0" width="1536" height="824" />
</state>
<state x="604" y="336" key="NewPhpFileDialog/0.0.1536.824@0.0.1536.824" timestamp="1583816251531" />
<state x="277" y="55" key="SettingsEditor" timestamp="1583262148541">
<screen x="0" y="0" width="1536" height="824" />
</state>
<state x="277" y="55" key="SettingsEditor/0.0.1536.824@0.0.1536.824" timestamp="1583262148541" />
<state x="482" y="276" key="com.intellij.ide.util.TipDialog" timestamp="1585008421135">
<screen x="0" y="0" width="1536" height="824" />
</state>
<state x="482" y="276" key="com.intellij.ide.util.TipDialog/0.0.1536.824@0.0.1536.824" timestamp="1585008421135" />
<state x="649" y="380" key="com.intellij.ide.util.TipDialog/67.27.1853.1053@67.27.1853.1053" timestamp="1579902711879" /> <state x="649" y="380" key="com.intellij.ide.util.TipDialog/67.27.1853.1053@67.27.1853.1053" timestamp="1579902711879" />
<state x="647" y="170" width="683" height="764" key="com.intellij.openapi.editor.actions.MultiplePasteAction$ClipboardContentChooser" timestamp="1579395082597"> <state x="647" y="170" width="683" height="764" key="com.intellij.openapi.editor.actions.MultiplePasteAction$ClipboardContentChooser" timestamp="1579395082597">
<screen x="67" y="27" width="1853" height="1053" /> <screen x="67" y="27" width="1853" height="1053" />

View File

@ -55,9 +55,9 @@ class RegistrationController extends Controller
'confirmation_code' => $confirmation_code 'confirmation_code' => $confirmation_code
]); ]);
Mail::send('emails.verify', compact('confirmation_code'), function($message) { // Mail::send('emails.verify', compact('confirmation_code'), function($message) {
$message->to(Input::get('email'), Input::get('name'))->subject('Weryfikacja adresu e-mail'); // $message->to(Input::get('email'), Input::get('name'))->subject('Weryfikacja adresu e-mail');
}); // });
//Flash::message('Thanks for signing up! Please check your email.'); //Flash::message('Thanks for signing up! Please check your email.');

BIN
app/Http/Controllers/a.pdf Normal file

Binary file not shown.

View File

@ -0,0 +1,28 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class documentApplicationController extends Controller
{
public function create(){
if(auth()->user() != null && auth()->user()->fireStationID != null ){
$fireFighters = DB::table('users')->where("fireStationID", "=", auth()->user()->fireStationID )->get();
return view("documentApplicationForm", ["fireFighters" => $fireFighters]);
} else{
return view('home');
}
}
public function printPDF(){
if(auth()->user() != null && auth()->user()->fireStationID != null ) {
$request = request();
$test = new documentOverlayController();
$test->testPdf($request->fireFighterID);
}
}
}

View File

@ -149,7 +149,6 @@ class documentCreators extends Fpdf
} }
public function createAllOperationsPDF($fireSationID){ public function createAllOperationsPDF($fireSationID){
$operations = DB::table('operations')->where('operations.fireStationID', "=", $fireSationID) $operations = DB::table('operations')->where('operations.fireStationID', "=", $fireSationID)
->whereNull('deleted_at') ->whereNull('deleted_at')
->leftJoin('users', 'operations.commanderID', '=', 'users.id') ->leftJoin('users', 'operations.commanderID', '=', 'users.id')

View File

@ -0,0 +1,50 @@
<?php
namespace App\Http\Controllers;
use Codedge\Fpdf\Fpdf\Fpdf;
use Illuminate\Http\Request;
use setasign\Fpdi\Fpdi;
class documentOverlayController extends Controller
{
//
public function testPdf($fireFighterID){
// initiate FPDI
$pdf = new Fpdi();
// set the source file
$pageCount = $pdf->setSourceFile("../app/Http/Controllers/documentTemplates/a.pdf");
// import page 1
for ($pageNo = 1; $pageNo <= $pageCount; $pageNo++) {
// import a page
$templateId = $pdf->importPage($pageNo);
// get the size of the imported page
$size = $pdf->getTemplateSize($templateId);
// create a page (landscape or portrait depending on the imported page size)
if ($size[0] > $size[1]) {
$pdf->AddPage('L', array($size[0], $size[1]));
} else {
$pdf->AddPage('P', array($size[0], $size[1]));
}
$pdf->useTemplate($templateId);
if($pageNo == 1){
$str = iconv('UTF-8', 'cp1250', 'zazółcić gęślą jaźń');
$xyz = iconv('UTF-8', 'cp1250', $fireFighterID);
// now write some text above the imported page
$pdf->SetFont('times');
$pdf->SetTextColor(255, 0, 0);
$pdf->SetXY(30, 30);
$pdf->Write(0, $xyz);
}
}
$pdf->Output();
}
}

Binary file not shown.

Binary file not shown.

View File

@ -13,6 +13,7 @@
"fideloper/proxy": "^4.0", "fideloper/proxy": "^4.0",
"laravel/framework": "5.7.*", "laravel/framework": "5.7.*",
"laravel/tinker": "^1.0", "laravel/tinker": "^1.0",
"setasign/fpdi-fpdf": "2.3",
"twbs/bootstrap": "4.4.1" "twbs/bootstrap": "4.4.1"
}, },
"require-dev": { "require-dev": {

146
composer.lock generated
View File

@ -1,10 +1,10 @@
{ {
"_readme": [ "_readme": [
"This file locks the dependencies of your project to a known state", "This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "011fdaa7e037ee2376644be6d63383e1", "content-hash": "678c4b77784d933eca474ac17be3aab3",
"packages": [ "packages": [
{ {
"name": "codedge/laravel-fpdf", "name": "codedge/laravel-fpdf",
@ -2218,6 +2218,148 @@
], ],
"time": "2019-12-17T08:18:51+00:00" "time": "2019-12-17T08:18:51+00:00"
}, },
{
"name": "setasign/fpdf",
"version": "1.8.2",
"source": {
"type": "git",
"url": "https://github.com/Setasign/FPDF.git",
"reference": "d77904018090c17dc9f3ab6e944679a7a47e710a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Setasign/FPDF/zipball/d77904018090c17dc9f3ab6e944679a7a47e710a",
"reference": "d77904018090c17dc9f3ab6e944679a7a47e710a",
"shasum": ""
},
"type": "library",
"autoload": {
"classmap": [
"fpdf.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Olivier Plathey",
"email": "oliver@fpdf.org",
"homepage": "http://fpdf.org/"
}
],
"description": "FPDF is a PHP class which allows to generate PDF files with pure PHP. F from FPDF stands for Free: you may use it for any kind of usage and modify it to suit your needs.",
"homepage": "http://www.fpdf.org",
"keywords": [
"fpdf",
"pdf"
],
"time": "2019-12-08T10:32:10+00:00"
},
{
"name": "setasign/fpdi",
"version": "v2.3.0",
"source": {
"type": "git",
"url": "https://github.com/Setasign/FPDI.git",
"reference": "ff7e43e07abb97feb4a1cceaf72d75ce0e175ca0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Setasign/FPDI/zipball/ff7e43e07abb97feb4a1cceaf72d75ce0e175ca0",
"reference": "ff7e43e07abb97feb4a1cceaf72d75ce0e175ca0",
"shasum": ""
},
"require": {
"ext-zlib": "*",
"php": "^5.6 || ^7.0"
},
"conflict": {
"setasign/tfpdf": "<1.31"
},
"require-dev": {
"phpunit/phpunit": "~5.7",
"setasign/fpdf": "~1.8",
"setasign/tfpdf": "1.31",
"tecnickcom/tcpdf": "~6.2"
},
"suggest": {
"setasign/fpdf": "FPDI will extend this class but as it is also possible to use TCPDF or tFPDF as an alternative. There's no fixed dependency configured.",
"setasign/fpdi-fpdf": "Use this package to automatically evaluate dependencies to FPDF.",
"setasign/fpdi-tcpdf": "Use this package to automatically evaluate dependencies to TCPDF.",
"setasign/fpdi-tfpdf": "Use this package to automatically evaluate dependencies to tFPDF."
},
"type": "library",
"autoload": {
"psr-4": {
"setasign\\Fpdi\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jan Slabon",
"email": "jan.slabon@setasign.com",
"homepage": "https://www.setasign.com"
},
{
"name": "Maximilian Kresse",
"email": "maximilian.kresse@setasign.com",
"homepage": "https://www.setasign.com"
}
],
"description": "FPDI is a collection of PHP classes facilitating developers to read pages from existing PDF documents and use them as templates in FPDF. Because it is also possible to use FPDI with TCPDF, there are no fixed dependencies defined. Please see suggestions for packages which evaluates the dependencies automatically.",
"homepage": "https://www.setasign.com/fpdi",
"keywords": [
"fpdf",
"fpdi",
"pdf"
],
"time": "2020-02-19T11:30:55+00:00"
},
{
"name": "setasign/fpdi-fpdf",
"version": "v2.3.0",
"source": {
"type": "git",
"url": "https://github.com/Setasign/FPDI-FPDF.git",
"reference": "f2fdc44e4d5247a3bb55ed2c2c1396ef05c02357"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Setasign/FPDI-FPDF/zipball/f2fdc44e4d5247a3bb55ed2c2c1396ef05c02357",
"reference": "f2fdc44e4d5247a3bb55ed2c2c1396ef05c02357",
"shasum": ""
},
"require": {
"setasign/fpdf": "^1.8.2",
"setasign/fpdi": "^2.3"
},
"type": "library",
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jan Slabon",
"email": "jan.slabon@setasign.com",
"homepage": "https://www.setasign.com"
}
],
"description": "Kind of metadata package for dependencies of the latest versions of FPDI and FPDF.",
"homepage": "https://www.setasign.com/fpdi",
"keywords": [
"fpdf",
"fpdi",
"pdf"
],
"time": "2020-02-19T12:21:53+00:00"
},
{ {
"name": "swiftmailer/swiftmailer", "name": "swiftmailer/swiftmailer",
"version": "v6.2.3", "version": "v6.2.3",

View File

@ -11,9 +11,9 @@ class DatabaseSeeder extends Seeder
*/ */
public function run() public function run()
{ {
/*
//województwa //województwa
DB::table('wojewodztwa')->insert([ 'id' => '1020000', 'name' => 'dolnośląskie' ]); DB::table('wojewodztwa')->insert([ 'id' => '1020000', 'name' => 'dolnośląskie' ]);
DB::table('wojewodztwa')->insert([ 'id' => '1040000', 'name' => 'kujawsko-pomorskie' ]); DB::table('wojewodztwa')->insert([ 'id' => '1040000', 'name' => 'kujawsko-pomorskie' ]);
DB::table('wojewodztwa')->insert([ 'id' => '1060000', 'name' => 'lubelskie' ]); DB::table('wojewodztwa')->insert([ 'id' => '1060000', 'name' => 'lubelskie' ]);
DB::table('wojewodztwa')->insert([ 'id' => '1080000', 'name' => 'lubuskie' ]); DB::table('wojewodztwa')->insert([ 'id' => '1080000', 'name' => 'lubuskie' ]);
@ -2928,7 +2928,7 @@ class DatabaseSeeder extends Seeder
DB::table('users')->insert(['id'=>'1203','password'=>'$2y$10$hSeo4pAvQLmV8KzQWoOEXuMEiN7dqOb4jEU80g.xsUS6W5.sh5I4m','name'=>'Michał','surname'=>'Rogozinski','PESEL'=>'74073147926','phoneNumber'=>'501234567','email'=>'michal.rogozinski@eosp.projektstudencki.pl','fireStationID'=>'1200','functionID'=>'3','degreeID'=>'3','number'=>'ABC123','statusID'=>'0','deleted'=>'0','creatorID'=>NULL,'changingID'=>NULL,'confirmed'=>'0','confirmation_code'=>NULL,'email_verified_at'=>NULL,'remember_token'=>NULL,'created_at'=>now(),'updated_at'=>now()]); DB::table('users')->insert(['id'=>'1203','password'=>'$2y$10$hSeo4pAvQLmV8KzQWoOEXuMEiN7dqOb4jEU80g.xsUS6W5.sh5I4m','name'=>'Michał','surname'=>'Rogozinski','PESEL'=>'74073147926','phoneNumber'=>'501234567','email'=>'michal.rogozinski@eosp.projektstudencki.pl','fireStationID'=>'1200','functionID'=>'3','degreeID'=>'3','number'=>'ABC123','statusID'=>'0','deleted'=>'0','creatorID'=>NULL,'changingID'=>NULL,'confirmed'=>'0','confirmation_code'=>NULL,'email_verified_at'=>NULL,'remember_token'=>NULL,'created_at'=>now(),'updated_at'=>now()]);
DB::table('users')->insert(['id'=>'1204','password'=>'$2y$10$hSeo4pAvQLmV8KzQWoOEXuMEiN7dqOb4jEU80g.xsUS6W5.sh5I4m','name'=>'Lidia','surname'=>'Kaczmarek','PESEL'=>'74073147926','phoneNumber'=>'501234567','email'=>'lidia.kaczmarek@eosp.projektstudencki.pl','fireStationID'=>'1200','functionID'=>'4','degreeID'=>'4','number'=>'ABC123','statusID'=>'0','deleted'=>'0','creatorID'=>NULL,'changingID'=>NULL,'confirmed'=>'0','confirmation_code'=>NULL,'email_verified_at'=>NULL,'remember_token'=>NULL,'created_at'=>now(),'updated_at'=>now()]); DB::table('users')->insert(['id'=>'1204','password'=>'$2y$10$hSeo4pAvQLmV8KzQWoOEXuMEiN7dqOb4jEU80g.xsUS6W5.sh5I4m','name'=>'Lidia','surname'=>'Kaczmarek','PESEL'=>'74073147926','phoneNumber'=>'501234567','email'=>'lidia.kaczmarek@eosp.projektstudencki.pl','fireStationID'=>'1200','functionID'=>'4','degreeID'=>'4','number'=>'ABC123','statusID'=>'0','deleted'=>'0','creatorID'=>NULL,'changingID'=>NULL,'confirmed'=>'0','confirmation_code'=>NULL,'email_verified_at'=>NULL,'remember_token'=>NULL,'created_at'=>now(),'updated_at'=>now()]);
DB::table('users')->insert(['id'=>'1205','password'=>'$2y$10$hSeo4pAvQLmV8KzQWoOEXuMEiN7dqOb4jEU80g.xsUS6W5.sh5I4m','name'=>'Michał','surname'=>'Nowak','PESEL'=>'74073147926','phoneNumber'=>'501234567','email'=>'michal.nowak@eosp.projektstudencki.pl','fireStationID'=>'1200','functionID'=>'5','degreeID'=>'5','number'=>'ABC123','statusID'=>'0','deleted'=>'0','creatorID'=>NULL,'changingID'=>NULL,'confirmed'=>'0','confirmation_code'=>NULL,'email_verified_at'=>NULL,'remember_token'=>NULL,'created_at'=>now(),'updated_at'=>now()]); DB::table('users')->insert(['id'=>'1205','password'=>'$2y$10$hSeo4pAvQLmV8KzQWoOEXuMEiN7dqOb4jEU80g.xsUS6W5.sh5I4m','name'=>'Michał','surname'=>'Nowak','PESEL'=>'74073147926','phoneNumber'=>'501234567','email'=>'michal.nowak@eosp.projektstudencki.pl','fireStationID'=>'1200','functionID'=>'5','degreeID'=>'5','number'=>'ABC123','statusID'=>'0','deleted'=>'0','creatorID'=>NULL,'changingID'=>NULL,'confirmed'=>'0','confirmation_code'=>NULL,'email_verified_at'=>NULL,'remember_token'=>NULL,'created_at'=>now(),'updated_at'=>now()]);
//pojazdy //pojazdy
DB::table('vehicles')->insert(['id'=>'1101','fireStationID'=>'1100','name'=>'Peugeot Boxer','codename'=>'649P28','brand'=>'Peugeot','registrationNumber'=>'PWL37998','productionYear'=>'2017','examExpirationDate'=>'2020-12-31','insuranceExpirationDate'=>'2020-12-31','driveType'=>'4x2','chassisType'=>'Peugeot Boxer GLBA','bodyProducer'=>'IUVO CARS','crewNumber'=>'6','foamAgent'=>'20','enginePower'=>'163','mass'=>'3500','chassisNumber'=>'1ABCD23EFGH456789','engineNumber'=>'123456','fuelType'=>'diesel','chassisPoductionYear'=>'2017','entryIntoServiceDate'=>'2017-02-08','fireEnginePumpDescription'=>'motopompa','deleted_at'=>NULL,'created_at'=>now(),'updated_at'=>now(),'status'=>'0']); DB::table('vehicles')->insert(['id'=>'1101','fireStationID'=>'1100','name'=>'Peugeot Boxer','codename'=>'649P28','brand'=>'Peugeot','registrationNumber'=>'PWL37998','productionYear'=>'2017','examExpirationDate'=>'2020-12-31','insuranceExpirationDate'=>'2020-12-31','driveType'=>'4x2','chassisType'=>'Peugeot Boxer GLBA','bodyProducer'=>'IUVO CARS','crewNumber'=>'6','foamAgent'=>'20','enginePower'=>'163','mass'=>'3500','chassisNumber'=>'1ABCD23EFGH456789','engineNumber'=>'123456','fuelType'=>'diesel','chassisPoductionYear'=>'2017','entryIntoServiceDate'=>'2017-02-08','fireEnginePumpDescription'=>'motopompa','deleted_at'=>NULL,'created_at'=>now(),'updated_at'=>now(),'status'=>'0']);
DB::table('vehicles')->insert(['id'=>'1102','fireStationID'=>'1100','name'=>'MAN','codename'=>'649P08','brand'=>'MAN','registrationNumber'=>'PWL32998','productionYear'=>'2016','examExpirationDate'=>'2020-12-31','insuranceExpirationDate'=>'2020-12-31','driveType'=>'4x4','chassisType'=>'MAN TGM 18.340 4x4','bodyProducer'=>'Stolarczyk','crewNumber'=>'6','foamAgent'=>'600','enginePower'=>'350','mass'=>'6000','chassisNumber'=>'1ABCD23EFGH456789','engineNumber'=>'123456','fuelType'=>'diesel','chassisPoductionYear'=>'2016','entryIntoServiceDate'=>'2016-02-16','fireEnginePumpDescription'=>'autopompa dwuzakresowa','deleted_at'=>NULL,'created_at'=>now(),'updated_at'=>now(),'status'=>'0']); DB::table('vehicles')->insert(['id'=>'1102','fireStationID'=>'1100','name'=>'MAN','codename'=>'649P08','brand'=>'MAN','registrationNumber'=>'PWL32998','productionYear'=>'2016','examExpirationDate'=>'2020-12-31','insuranceExpirationDate'=>'2020-12-31','driveType'=>'4x4','chassisType'=>'MAN TGM 18.340 4x4','bodyProducer'=>'Stolarczyk','crewNumber'=>'6','foamAgent'=>'600','enginePower'=>'350','mass'=>'6000','chassisNumber'=>'1ABCD23EFGH456789','engineNumber'=>'123456','fuelType'=>'diesel','chassisPoductionYear'=>'2016','entryIntoServiceDate'=>'2016-02-16','fireEnginePumpDescription'=>'autopompa dwuzakresowa','deleted_at'=>NULL,'created_at'=>now(),'updated_at'=>now(),'status'=>'0']);
@ -2950,7 +2950,7 @@ class DatabaseSeeder extends Seeder
DB::table('trainings')->insert(['id'=>'1120','fireStationID'=>'1100','trainingName'=>'Kurs drwali-pilarzy','created_at'=>now(),'updated_at'=>now(),'deleted_at'=>NULL]); DB::table('trainings')->insert(['id'=>'1120','fireStationID'=>'1100','trainingName'=>'Kurs drwali-pilarzy','created_at'=>now(),'updated_at'=>now(),'deleted_at'=>NULL]);
DB::table('trainings')->insert(['id'=>'1210','fireStationID'=>'1200','trainingName'=>'Kurs kwalifikowanej pierwszej pomocy','created_at'=>now(),'updated_at'=>now(),'deleted_at'=>NULL]); DB::table('trainings')->insert(['id'=>'1210','fireStationID'=>'1200','trainingName'=>'Kurs kwalifikowanej pierwszej pomocy','created_at'=>now(),'updated_at'=>now(),'deleted_at'=>NULL]);
DB::table('trainings')->insert(['id'=>'1220','fireStationID'=>'1200','trainingName'=>'Nabycie uprawnień do napełniania butli powietrzem','created_at'=>now(),'updated_at'=>now(),'deleted_at'=>NULL]); DB::table('trainings')->insert(['id'=>'1220','fireStationID'=>'1200','trainingName'=>'Nabycie uprawnień do napełniania butli powietrzem','created_at'=>now(),'updated_at'=>now(),'deleted_at'=>NULL]);
*/
DB::table('trainingsFirefighters')->insert(['id'=>'1111','firefighterID'=>'1101','trainingID'=>'1110','dateOfComplete'=>'2009-03-01','dateOfExpiry'=>'2021-12-31','lifetime'=>'1','created_at'=>now(),'updated_at'=>now()]); DB::table('trainingsFirefighters')->insert(['id'=>'1111','firefighterID'=>'1101','trainingID'=>'1110','dateOfComplete'=>'2009-03-01','dateOfExpiry'=>'2021-12-31','lifetime'=>'1','created_at'=>now(),'updated_at'=>now()]);
DB::table('trainingsFirefighters')->insert(['id'=>'1112','firefighterID'=>'1102','trainingID'=>'1110','dateOfComplete'=>'2009-03-01','dateOfExpiry'=>'2021-12-31','lifetime'=>'1','created_at'=>now(),'updated_at'=>now()]); DB::table('trainingsFirefighters')->insert(['id'=>'1112','firefighterID'=>'1102','trainingID'=>'1110','dateOfComplete'=>'2009-03-01','dateOfExpiry'=>'2021-12-31','lifetime'=>'1','created_at'=>now(),'updated_at'=>now()]);
DB::table('trainingsFirefighters')->insert(['id'=>'1113','firefighterID'=>'1103','trainingID'=>'1110','dateOfComplete'=>'2009-03-01','dateOfExpiry'=>'2021-12-31','lifetime'=>'1','created_at'=>now(),'updated_at'=>now()]); DB::table('trainingsFirefighters')->insert(['id'=>'1113','firefighterID'=>'1103','trainingID'=>'1110','dateOfComplete'=>'2009-03-01','dateOfExpiry'=>'2021-12-31','lifetime'=>'1','created_at'=>now(),'updated_at'=>now()]);

View File

@ -0,0 +1,33 @@
@extends('layout.app')
@section('center-area')
@parent
@if( auth()->check())
@if( auth()->user()->fireStationID == NULL)
Jednostka nie istnieje
@else
<form method="POST" action="/dokumentacja/wniosek/pdf">
{{ csrf_field() }}
<div class="form-group row">
<div class="col-auto">
<label for="location">Wnioskujacy:</label>
<select name="fireFighterID" class="form-control">
<option value="">--- Wybierz strażaka ---</option>
@foreach ($fireFighters as $fireFighter)
<option value="{{$fireFighter->id}}">{{ $fireFighter->name }} {{$fireFighter->surname }}</option>
@endforeach
</select>
</div>
</div>
<div class="form-group">
<button style="cursor:pointer" type="submit" class="btn btn-primary">Drukuj</button>
</div>
@include('inc.formerrors')
</form>
@endif
@else
Brak autoryzacji
@endif
@stop

View File

@ -23,6 +23,11 @@
{{ csrf_field() }} {{ csrf_field() }}
<button class="btn btn-info" type="submit">Wykaz strażaków wraz z kontaktem</button> <button class="btn btn-info" type="submit">Wykaz strażaków wraz z kontaktem</button>
</form> </form>
<form action="/dokumentacja/wniosek" method="post">
{{ csrf_field() }}
<button class="btn btn-info" type="submit">Wniosek o przyznanie odznaczenia</button>
</form>
@endif @endif
@endif @endif
@stop @stop

View File

@ -6,6 +6,6 @@
<a href="/pojazdy"> <li name="pojazdy"><img src="/img/car.png">Pojazdy</li></a> <a href="/pojazdy"> <li name="pojazdy"><img src="/img/car.png">Pojazdy</li></a>
<a href="/sprzet"><li name="straznica"><img src="/img/straznica.png">Strażnica</li></a> <a href="/sprzet"><li name="straznica"><img src="/img/straznica.png">Strażnica</li></a>
<a href="/wyjazdy"><li name="wyjazdy"><img src="/img/wyjazdy.png">Wyjazdy</li></a> <a href="/wyjazdy"><li name="wyjazdy"><img src="/img/wyjazdy.png">Wyjazdy</li></a>
{{-- <a href="/dokumentacja"><li name="dokumentacja"><img src="/img/documents.png">Dokumentacja</li></a>--}} <a href="/dokumentacja"><li name="dokumentacja"><img src="/img/documents.png">Dokumentacja</li></a>
</ol> </ol>
</div> </div>

View File

@ -132,3 +132,7 @@ Route::post('/pdf/strazacy', 'pdfController@createViewFireFighters');
Route::get('/forgottenPassword', 'resetPasswordController@create'); Route::get('/forgottenPassword', 'resetPasswordController@create');
Route::post('/forgottenPassword', 'resetPasswordController@reset'); Route::post('/forgottenPassword', 'resetPasswordController@reset');
Route::get('/pdf/test', 'documentOverlayController@testPdf');
Route::post('/dokumentacja/wniosek', 'documentApplicationController@create');
Route::post('/dokumentacja/wniosek/pdf', 'documentApplicationController@printPDF');