Compare commits
21 Commits
master
...
correct_an
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dd26c4ec4e | ||
|
|
56f0dd1b8a | ||
|
|
a5b90015a3 | ||
|
|
3d64ba9bc6 | ||
|
|
fb4612fd15 | ||
|
|
fa669b7419 | ||
|
|
fdbb662fba | ||
|
|
9d510ab765 | ||
|
|
599fd6bf7a | ||
|
|
f622782eae | ||
|
|
4e737a48bd | ||
|
|
d83552e106 | ||
|
|
3db065ae53 | ||
|
|
0238996df9 | ||
|
|
44e0a3f373 | ||
|
|
ef5536a0d3 | ||
|
|
a57af0d118 | ||
|
|
c387eae375 | ||
|
|
1da54d43f4 | ||
|
|
567605ceb9 | ||
|
|
7f4defa009 |
0
.editorconfig
Normal file → Executable file
0
.editorconfig
Normal file → Executable file
78
.env
Executable file
78
.env
Executable file
|
|
@ -0,0 +1,78 @@
|
|||
APP_NAME=ISPT4.0
|
||||
APP_ENV=local
|
||||
APP_KEY=base64:ahx5/AvVGu/iHQx1mjX/EQg4m1NHLvtjzb6pFa49TlE=
|
||||
APP_DEBUG=true
|
||||
APP_URL=http://localhost
|
||||
APP_VERSION = 1.0.0
|
||||
|
||||
LOG_CHANNEL=stack
|
||||
LOG_DEPRECATIONS_CHANNEL=null
|
||||
LOG_LEVEL=debug
|
||||
|
||||
DB_CONNECTION=mysql
|
||||
DB_PORT=3306
|
||||
# DB_HOST=127.0.0.1
|
||||
# DB_DATABASE=ispt_4.0
|
||||
# DB_USERNAME=root
|
||||
# DB_PASSWORD=123456789
|
||||
|
||||
# Alteracoes para funcionar com o servidor, porem nao funciona na firma
|
||||
DB_HOST=ispt-innovation.com
|
||||
DB_DATABASE=ispt40
|
||||
DB_USERNAME=ispt40
|
||||
DB_PASSWORD=qu3ro3ntr@r
|
||||
|
||||
|
||||
BROADCAST_DRIVER=log
|
||||
CACHE_DRIVER=file
|
||||
FILESYSTEM_DISK=local
|
||||
QUEUE_CONNECTION=sync
|
||||
SESSION_DRIVER=file
|
||||
SESSION_LIFETIME=120
|
||||
|
||||
MEMCACHED_HOST=127.0.0.1
|
||||
|
||||
REDIS_HOST=127.0.0.1
|
||||
REDIS_PASSWORD=null
|
||||
REDIS_PORT=6379
|
||||
|
||||
|
||||
# ***For MailGiun***
|
||||
# MAIL_MAILER=mailgun
|
||||
# MAILGUN_DOMAIN=sandboxdef4c3b1ceca4a53aa14d91d69bfe8a0.mailgun.org
|
||||
# MAILGUN_SECRET=9b87b9ff449885a1b7ea856d8e4cad73-181449aa-479369f2
|
||||
# MAIL_FROM_ADDRESS=ubuntu@ispt-innovation.com
|
||||
# MAIL_FROM_NAME="Ispt-4.0"
|
||||
|
||||
MAIL_MAILER=smtp
|
||||
# MAIL_HOST=smtp.sendgrid.net
|
||||
MAIL_HOST= mail.ispt-innovation.com
|
||||
# MAIL_PORT=587
|
||||
MAIL_PORT= 465
|
||||
# MAIL_USERNAME=apikey
|
||||
MAIL_USERNAME= ubuntu
|
||||
# MAIL_PASSWORD=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
|
||||
MAIL_PASSWORD= 6bhWUN62KYSD
|
||||
MAIL_ENCRYPTION=tls
|
||||
MAIL_FROM_ADDRESS=ubuntu@ispt-innovation.com
|
||||
MAIL_FROM_NAME="Ispt4.0"
|
||||
|
||||
AWS_ACCESS_KEY_ID=
|
||||
AWS_SECRET_ACCESS_KEY=
|
||||
AWS_DEFAULT_REGION=us-east-1
|
||||
AWS_BUCKET=
|
||||
AWS_USE_PATH_STYLE_ENDPOINT=false
|
||||
|
||||
PUSHER_APP_ID=
|
||||
PUSHER_APP_KEY=
|
||||
PUSHER_APP_SECRET=
|
||||
PUSHER_HOST=
|
||||
PUSHER_PORT=443
|
||||
PUSHER_SCHEME=https
|
||||
PUSHER_APP_CLUSTER=mt1
|
||||
|
||||
VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
|
||||
VITE_PUSHER_HOST="${PUSHER_HOST}"
|
||||
VITE_PUSHER_PORT="${PUSHER_PORT}"
|
||||
VITE_PUSHER_SCHEME="${PUSHER_SCHEME}"
|
||||
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
|
||||
0
.env.example
Normal file → Executable file
0
.env.example
Normal file → Executable file
0
.gitattributes
vendored
Normal file → Executable file
0
.gitattributes
vendored
Normal file → Executable file
38
.gitignore
vendored
Normal file → Executable file
38
.gitignore
vendored
Normal file → Executable file
|
|
@ -1,19 +1,19 @@
|
|||
/.phpunit.cache
|
||||
/node_modules
|
||||
/public/build
|
||||
/public/hot
|
||||
/public/storage
|
||||
/storage/*.key
|
||||
/vendor
|
||||
.env
|
||||
.env.backup
|
||||
.env.production
|
||||
.phpunit.result.cache
|
||||
Homestead.json
|
||||
Homestead.yaml
|
||||
auth.json
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
/.fleet
|
||||
/.idea
|
||||
/.vscode
|
||||
#/.phpunit.cache
|
||||
#/node_modules
|
||||
#/public/build
|
||||
#/public/hot
|
||||
#/public/storage
|
||||
#/storage/*.key
|
||||
#/vendor
|
||||
#.env
|
||||
#.env.backup
|
||||
#.env.production
|
||||
#.phpunit.result.cache
|
||||
#Homestead.json
|
||||
#Homestead.yaml
|
||||
#auth.json
|
||||
#npm-debug.log
|
||||
#yarn-error.log
|
||||
#/.fleet
|
||||
#/.idea
|
||||
#/.vscode
|
||||
|
|
|
|||
33
app/Actions/Fortify/CreateNewUser.php
Normal file → Executable file
33
app/Actions/Fortify/CreateNewUser.php
Normal file → Executable file
|
|
@ -8,6 +8,8 @@
|
|||
use Illuminate\Validation\Rule;
|
||||
use Laravel\Fortify\Contracts\CreatesNewUsers;
|
||||
|
||||
use Illuminate\Auth\Events\Registered;
|
||||
|
||||
class CreateNewUser implements CreatesNewUsers
|
||||
{
|
||||
use PasswordValidationRules;
|
||||
|
|
@ -19,22 +21,31 @@ class CreateNewUser implements CreatesNewUsers
|
|||
*/
|
||||
public function create(array $input): User
|
||||
{
|
||||
Validator::make($input, [
|
||||
'name' => ['required', 'string', 'max:255'],
|
||||
'email' => [
|
||||
'required',
|
||||
'string',
|
||||
'email',
|
||||
'max:255',
|
||||
Rule::unique(User::class),
|
||||
],
|
||||
'password' => $this->passwordRules(),
|
||||
])->validate();
|
||||
// dd($input);
|
||||
|
||||
// Validator::make($input, [
|
||||
// 'name' => ['required', 'string', 'max:255'],
|
||||
// 'email' => [
|
||||
// 'required',
|
||||
// 'string',
|
||||
// 'email',
|
||||
// 'max:255',
|
||||
// Rule::unique(User::class),
|
||||
// ],
|
||||
// 'user_type' => ['required', Rule::in(['Cliente', 'Administrador', 'Super_Administrador','Gestor_Obra','Tecnicos','inspetor'])],
|
||||
// 'user_phone' => ['required', 'integer'],
|
||||
// 'user_nif' => ['required', 'string', 'max:15'],
|
||||
// 'password' => $this->passwordRules(),
|
||||
// ])->validate();
|
||||
|
||||
return User::create([
|
||||
'name' => $input['name'],
|
||||
'email' => $input['email'],
|
||||
'password' => Hash::make($input['password']),
|
||||
'user_type' => $input['user_type'],
|
||||
'user_phone' => $input['user_phone'],
|
||||
'user_nif' => $input['user_nif'],
|
||||
]);
|
||||
// event(new Registered($user));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
0
app/Actions/Fortify/PasswordValidationRules.php
Normal file → Executable file
0
app/Actions/Fortify/PasswordValidationRules.php
Normal file → Executable file
0
app/Actions/Fortify/ResetUserPassword.php
Normal file → Executable file
0
app/Actions/Fortify/ResetUserPassword.php
Normal file → Executable file
0
app/Actions/Fortify/UpdateUserPassword.php
Normal file → Executable file
0
app/Actions/Fortify/UpdateUserPassword.php
Normal file → Executable file
0
app/Actions/Fortify/UpdateUserProfileInformation.php
Normal file → Executable file
0
app/Actions/Fortify/UpdateUserProfileInformation.php
Normal file → Executable file
0
app/Console/Kernel.php
Normal file → Executable file
0
app/Console/Kernel.php
Normal file → Executable file
0
app/Exceptions/Handler.php
Normal file → Executable file
0
app/Exceptions/Handler.php
Normal file → Executable file
15
app/Http/Controllers/Auth/PasswordResetLinkController.php
Executable file
15
app/Http/Controllers/Auth/PasswordResetLinkController.php
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use Laravel\Fortify\Contracts\SendPasswordResetLinkViewResponse;
|
||||
|
||||
class PasswordResetLinkController extends Controller
|
||||
{
|
||||
public function create()
|
||||
{
|
||||
return view('auth.forgot-password');
|
||||
}
|
||||
}
|
||||
60
app/Http/Controllers/Auth/ResetPasswordController.php
Executable file
60
app/Http/Controllers/Auth/ResetPasswordController.php
Executable file
|
|
@ -0,0 +1,60 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
use Illuminate\Support\Facades\Password;
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class ResetPasswordController extends Controller
|
||||
{
|
||||
// public function create(Request $request, $token)
|
||||
// {
|
||||
// return view('auth.reset-password', ['token' => $token, 'email' => $request->email]);
|
||||
// }
|
||||
|
||||
public function reset(Request $request)
|
||||
{
|
||||
$request->validate([
|
||||
'token' => 'required',
|
||||
'email' => 'required|email',
|
||||
'password' => 'required|min:8|confirmed',
|
||||
]);
|
||||
|
||||
$response = Password::reset(
|
||||
$request->only('email', 'password', 'password_confirmation', 'token'),
|
||||
function ($user, $password) {
|
||||
$user->forceFill([
|
||||
'password' => bcrypt($password)
|
||||
])->save();
|
||||
|
||||
$user->setRememberToken(Str::random(60));
|
||||
}
|
||||
);
|
||||
|
||||
if ($response == Password::PASSWORD_RESET) {
|
||||
return response()->json(['message' => 'Password reset successfully.']);
|
||||
} else {
|
||||
return response()->json(['message' => 'Failed to reset the password.'], 400);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// use App\Http\Controllers\ResetPasswordController;
|
||||
|
||||
// Route::post('/reset-password', [ResetPasswordController::class, 'reset'])->name('password.update');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
0
app/Http/Controllers/Controller.php
Normal file → Executable file
0
app/Http/Controllers/Controller.php
Normal file → Executable file
1426
app/Http/Controllers/CreateProjectController.php
Executable file
1426
app/Http/Controllers/CreateProjectController.php
Executable file
File diff suppressed because it is too large
Load Diff
61
app/Http/Controllers/CustomRegistrationController.php
Executable file
61
app/Http/Controllers/CustomRegistrationController.php
Executable file
|
|
@ -0,0 +1,61 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
use App\Actions\Fortify\CreateNewUser;
|
||||
use Illuminate\Auth\Events\Registered;
|
||||
use Illuminate\Foundation\Auth\EmailVerificationRequest;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Redirect;
|
||||
|
||||
use Illuminate\Auth\Events\Verified;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Models\PendingUser;
|
||||
|
||||
use App\Mail\NewUserNotification;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
|
||||
|
||||
class CustomRegistrationController extends Controller
|
||||
{
|
||||
public function store(Request $request): RedirectResponse
|
||||
{
|
||||
$user = app(CreateNewUser::class)->create($request->all());
|
||||
|
||||
event(new Registered($user));
|
||||
// Chame sendEmailVerificationNotification para enviar o e-mail de verificação
|
||||
$user->sendEmailVerificationNotification();
|
||||
|
||||
|
||||
$pendingUser = PendingUser::where('pending_email', $user->email)->first();
|
||||
if ($pendingUser) {
|
||||
$pendingUser->delete();
|
||||
}
|
||||
|
||||
return $request->wantsJson()
|
||||
? new JsonResponse([], 201)
|
||||
: Redirect::to('/CreateUsers')->with('success', 'Usuário criado com sucesso, aguarda confirmacao por Email!!');
|
||||
}
|
||||
|
||||
|
||||
public function yourVerificationMethod(Request $request, $id, $hash)
|
||||
{
|
||||
$user = User::findOrFail($id);
|
||||
|
||||
if (!hash_equals((string) $hash, sha1($user->getEmailForVerification()))) {
|
||||
abort(403, 'Unauthorized action.');
|
||||
}
|
||||
|
||||
if ($user->markEmailAsVerified()) {
|
||||
event(new Verified($user));
|
||||
}
|
||||
|
||||
// Redirecione para a rota desejada após a verificação bem-sucedida
|
||||
return redirect()->route('CreateUsers')->with('message', 'E-mail verificado com sucesso!');
|
||||
}
|
||||
}
|
||||
111
app/Http/Controllers/ExecutionProjectController.php
Executable file
111
app/Http/Controllers/ExecutionProjectController.php
Executable file
|
|
@ -0,0 +1,111 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Models\CompanyProject;
|
||||
use App\Models\ConstructionWorkstation;
|
||||
use App\Models\ControlEquipmentWorkstation;
|
||||
use App\Models\Equipment;
|
||||
use App\Models\EquipmentComments;
|
||||
use App\Models\EquipmentType;
|
||||
use App\Models\OrderEquipmentTasks;
|
||||
|
||||
use Yajra\DataTables\Facades\DataTables;
|
||||
|
||||
class ExecutionProjectController extends Controller
|
||||
{
|
||||
public function enterWorkstation()
|
||||
{
|
||||
return view('enterWorkstation');
|
||||
}
|
||||
|
||||
public function receiveExecutionProject($ProjectId)
|
||||
{
|
||||
$DatasProject = CompanyProject::find($ProjectId);
|
||||
$equipmentsTypes = EquipmentType::all();
|
||||
|
||||
// return view('projectsClients/executionProject')
|
||||
return view('projectsClients/executionProject')
|
||||
->with('DatasProject', $DatasProject)
|
||||
->with('equipmentsTypes', $equipmentsTypes);
|
||||
}
|
||||
|
||||
public function receiveWorkstationExecutionProject($receiveNumberProject)
|
||||
{
|
||||
$model = ConstructionWorkstation::where('company_projects_id', $receiveNumberProject)->with('workstationsAssociationTasks');
|
||||
|
||||
return DataTables::of($model)
|
||||
->addColumn('workstations_Association_Tasks', function ($row) {
|
||||
return $row->workstationsAssociationTasks->map(function ($task) {
|
||||
return $task->elementalTask->elemental_tasks_code;
|
||||
})->implode('-');
|
||||
})
|
||||
|
||||
->toJson();
|
||||
}
|
||||
|
||||
public function receiveEquipmentIdForShowModal($EquipmentID)
|
||||
{
|
||||
// Recebe e encontra os dados do Equipamento indicada na Tabela.
|
||||
$equipment = Equipment::find($EquipmentID);
|
||||
|
||||
// Recebe todas as tarefas e devolve em um Array
|
||||
$task_codes = $equipment->orderEquipmentTasks->map(function ($task) {
|
||||
return $task->elementalTask->elemental_tasks_code;
|
||||
})->toArray();
|
||||
|
||||
$receveControlEquipment = ControlEquipmentWorkstation::where('equipment_id',$EquipmentID)->get();
|
||||
|
||||
$receiveCommentsEquipment = EquipmentComments::where('equipment_id',$EquipmentID)->get();
|
||||
|
||||
// return view('projectsClients/executionProject',['receveControlEquipment'=>$receveControlEquipment]);
|
||||
return response()->json(['task_codes' => $task_codes,'receveControlEquipment' => $receveControlEquipment, 'receiveCommentsEquipment' => $receiveCommentsEquipment]);
|
||||
}
|
||||
|
||||
// public function receiveEquipmentsExecutionProject($receiveNumberProject)
|
||||
// {
|
||||
// // Recebe os dados vindos da funcao 'data' criada na view
|
||||
// $equipment_type_id = request('equipment_type_id');
|
||||
// $ambits_id = request('ambits_id');
|
||||
|
||||
// //Recebe sempre apenas os equipamentos relacionados a obra
|
||||
// $model = Equipment::where('company_projects_id', $receiveNumberProject);
|
||||
|
||||
// // Caso 'equipment_type_id' seja '#', mostra todos os equipamentos
|
||||
// if ($equipment_type_id == '#') {
|
||||
// $model = Equipment::query()->with(['equipmentType', 'unit', 'equipmentAssociationAmbit.ambitsEquipment']);
|
||||
// }
|
||||
// // Caso 'equipment_type_id' não seja '#', filtra os equipamentos por tipo e Âmbito (caso 'ambits_id' não seja '#')
|
||||
// else {
|
||||
// $equipment_type_id = intval($equipment_type_id);
|
||||
// $model = Equipment::where('equipments.equipment_type_id', $equipment_type_id)
|
||||
// ->join('equipment_association_ambits', 'equipments.equipment_id', '=', 'equipment_association_ambits.equipment_id')
|
||||
// ->with(['equipmentType', 'unit', 'equipmentAssociationAmbit.ambitsEquipment']);
|
||||
|
||||
// if ($ambits_id != '#') {
|
||||
// $ambits_id = intval($ambits_id);
|
||||
// $model->where('equipment_association_ambits.ambits_id', $ambits_id);
|
||||
// }
|
||||
// }
|
||||
|
||||
// return DataTables::of($model)
|
||||
// ->addColumn('equipment_type', function ($row) {
|
||||
// return $row->equipmentType->equipment_type_name;
|
||||
// })
|
||||
// ->addColumn('Ambits', function ($row) {
|
||||
// return $row->equipmentAssociationAmbit->ambitsEquipment->ambits_description;
|
||||
// })
|
||||
// ->addColumn('order_tasks', function ($row) {
|
||||
// return $row->orderEquipmentTasks->map(function ($task) {
|
||||
// return $task->elementalTask->elemental_tasks_code;
|
||||
// })->implode('-');
|
||||
// })
|
||||
// ->addColumn('current_task', function ($row) {
|
||||
// return $row->controlEquipmentWorkstation->map(function ($task) {
|
||||
// return $task->elementalTask->elemental_tasks_code;
|
||||
// })->implode('-');
|
||||
// })
|
||||
// ->toJson();
|
||||
// }
|
||||
}
|
||||
22
app/Http/Controllers/FormController.php
Executable file
22
app/Http/Controllers/FormController.php
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
|
||||
class FormController extends Controller
|
||||
{
|
||||
public function enviarEmail(Request $request)
|
||||
{
|
||||
$email = $request->input('email');
|
||||
|
||||
Mail::send('email.email', [], function ($message) use ($email) {
|
||||
$message->to($email);
|
||||
$message->subject('Assunto do email');
|
||||
});
|
||||
|
||||
return back()->with('status', 'Email enviado com sucesso!');
|
||||
}
|
||||
}
|
||||
72
app/Http/Controllers/Pending_UserController.php
Executable file
72
app/Http/Controllers/Pending_UserController.php
Executable file
|
|
@ -0,0 +1,72 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
|
||||
use App\Mail\NewUserNotification;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
|
||||
use App\Models\PendingUser;
|
||||
use App\Models\User;
|
||||
use App\Models\TypeUser;
|
||||
|
||||
class Pending_UserController extends Controller
|
||||
{
|
||||
public function ListPendingUsers()
|
||||
{
|
||||
$pend_users = PendingUser::all();
|
||||
return view('email/pendingUsers', compact('pend_users'));
|
||||
}
|
||||
|
||||
public function ShowFormUser($id){
|
||||
$pend_users = PendingUser::findOrFail($id);
|
||||
$types = TypeUser::all();
|
||||
return view ('Admin.CrudUsers.createUser', compact('pend_users','types'));
|
||||
}
|
||||
|
||||
|
||||
public function store(Request $request){
|
||||
|
||||
$request->validate([
|
||||
'name' => 'required',
|
||||
'lastName' => 'required',
|
||||
'pending_email' => 'required|email|unique:pending_users,pending_user_email|unique:users,email',
|
||||
'pending_phone' => 'required',
|
||||
'pending_nif' => 'required',
|
||||
'pending_password' => 'required|min:8|confirmed',
|
||||
]);
|
||||
|
||||
$joinName = $request->get('name') . ' ' . $request->get('lastName');
|
||||
|
||||
// $pendingUser = new PendingUser([
|
||||
// 'pending_user_name' => $joinName,
|
||||
// 'pending_user_email' => $request->get('pending_email'),
|
||||
// 'pending_user_phone' => $request->get('pending_phone'),
|
||||
// 'pending_user_nif' => $request->get('pending_nif'),
|
||||
// 'pending_user_password' => Hash::make($request->get('pending_password')),
|
||||
// ]);
|
||||
|
||||
$pendingUser = new PendingUser();
|
||||
$pendingUser->pending_user_name = $joinName;
|
||||
$pendingUser->pending_user_email = $request->get('pending_email');
|
||||
$pendingUser->pending_user_phone = $request->get('pending_phone');
|
||||
$pendingUser->pending_user_nif = $request->get('pending_nif');
|
||||
$pendingUser->pending_user_password = Hash::make($request->get('pending_password'));
|
||||
|
||||
$pendingUser->save();
|
||||
|
||||
// Enviar email de notificação para todos os Super_Administrador
|
||||
$superAdmins = User::where('type_users', 'Super_Administrador')->get();
|
||||
$newUserNotification = new NewUserNotification();
|
||||
|
||||
foreach ($superAdmins as $superAdmin) {
|
||||
Mail::to($superAdmin->email)->send($newUserNotification);
|
||||
}
|
||||
|
||||
return redirect('/formulario')->with('success', 'O seu registro foi enviado e aguarda aprovação.');
|
||||
}
|
||||
|
||||
}
|
||||
118
app/Http/Controllers/PreparedProjectController.php
Executable file
118
app/Http/Controllers/PreparedProjectController.php
Executable file
|
|
@ -0,0 +1,118 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
use Yajra\DataTables\DataTables;
|
||||
|
||||
|
||||
use App\Models\CompanyProject;
|
||||
use App\Models\Equipment;
|
||||
use App\Models\EquipmentType;
|
||||
use App\Models\Unit;
|
||||
use App\Models\AmbitsEquipment;
|
||||
|
||||
|
||||
class PreparedProjectController extends Controller
|
||||
{
|
||||
public function PreparedProject($ProjectId)
|
||||
{
|
||||
|
||||
$numberProject = CompanyProject::find($ProjectId);
|
||||
|
||||
$equipmentsProjects = Equipment::all()->where('company_projects_id', $ProjectId);
|
||||
$equipmentsTypes = EquipmentType::all();
|
||||
|
||||
//Retorna todas as Fabricas Unit, com base na Instalação
|
||||
$checkUnits = DB::table('units')
|
||||
->join('plants', 'units.plant_id', '=', 'plants.plant_id')
|
||||
->join('company_projects', 'plants.plant_id', '=', 'company_projects.plant_id')
|
||||
->select('units.*')
|
||||
->where('company_projects.company_projects_id', '=', $numberProject->company_projects_id)
|
||||
->get();
|
||||
|
||||
return view('projectsClients/preparedProject')
|
||||
// ->with('equipmentsProjects', $equipmentsProjects)
|
||||
->with('equipmentsTypes', $equipmentsTypes)
|
||||
->with('units', $checkUnits)
|
||||
->with('numberProject', $numberProject);
|
||||
}
|
||||
|
||||
public function getAmbits($equipmentType)
|
||||
{
|
||||
$ambits = DB::table('ambits_equipments')
|
||||
->select('ambits_equipments.*')
|
||||
->where('ambits_equipments.equipment_type_id', $equipmentType)
|
||||
->get();
|
||||
return response()->json($ambits);
|
||||
}
|
||||
|
||||
public function editProjectForArticulated(Request $request)
|
||||
{
|
||||
|
||||
$numberProject = CompanyProject::find($request->ProjectId);
|
||||
|
||||
$numberProject->order_project = 1;
|
||||
$numberProject->save();
|
||||
|
||||
return redirect()->route('home');
|
||||
}
|
||||
|
||||
public function getData1()
|
||||
{
|
||||
|
||||
$equipment_type_id = request('equipment_type_id');
|
||||
$unit_id = request('unit_id');
|
||||
$ambits_id = request('ambits_id');
|
||||
|
||||
// Equipment::all()->where('company_projects_id', $ProjectId);
|
||||
|
||||
// Caso 'equipment_type_id' seja '#', mostra todos os equipamentos
|
||||
if ($equipment_type_id == '#') {
|
||||
$model = Equipment::query()->with(['equipmentType', 'unit', 'equipmentAssociationAmbit.ambitsEquipment']);
|
||||
}
|
||||
// Caso 'equipment_type_id' não seja '#', filtra os equipamentos por tipo e Âmbito (caso 'ambits_id' não seja '#')
|
||||
else {
|
||||
$equipment_type_id = intval($equipment_type_id);
|
||||
$model = Equipment::where('equipments.equipment_type_id', $equipment_type_id)
|
||||
->join('equipment_association_ambits', 'equipments.equipment_id', '=', 'equipment_association_ambits.equipment_id')
|
||||
->with(['equipmentType', 'unit', 'equipmentAssociationAmbit.ambitsEquipment']);
|
||||
|
||||
if ($ambits_id != '#') {
|
||||
$ambits_id = intval($ambits_id);
|
||||
$model->where('equipment_association_ambits.ambits_id', $ambits_id);
|
||||
}
|
||||
}
|
||||
if(request()->has('inspec') && request('inspec') != '#') {
|
||||
$inspectionFilter = request('inspec') === 'Sim';
|
||||
$model->whereHas('orderEquipmentTasks', function ($query) use ($inspectionFilter) {
|
||||
$query->where('inspection', $inspectionFilter ? 'Sim' : 'Nao');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// Aplica o filtro de 'unit_id', se aplicável
|
||||
if ($unit_id != '#') {
|
||||
$unit_id = intval($unit_id);
|
||||
$model->where('equipments.unit_id', $unit_id);
|
||||
}
|
||||
|
||||
// Gera a tabela de dados
|
||||
return DataTables::of($model)
|
||||
->addColumn('equipment_type', function ($row) {
|
||||
return $row->equipmentType->equipment_type_name;
|
||||
})
|
||||
->addColumn('Unit', function ($row) {
|
||||
return $row->unit->unit_name;
|
||||
})
|
||||
->addColumn('Ambits', function ($row) {
|
||||
return $row->equipmentAssociationAmbit->ambitsEquipment->ambits_description;
|
||||
})
|
||||
->addColumn('Inspec', function ($row) {
|
||||
return $row->hasInspectionYes() ? 'Sim' : 'Nao';
|
||||
})
|
||||
->toJson();
|
||||
}
|
||||
}
|
||||
173
app/Http/Controllers/ProjectoDatacontroller.php
Executable file
173
app/Http/Controllers/ProjectoDatacontroller.php
Executable file
|
|
@ -0,0 +1,173 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\AmbitsEquipment;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
use Yajra\DataTables\Facades\DataTables;
|
||||
|
||||
use App\Models\Equipment;
|
||||
use App\Models\Plant;
|
||||
use App\Models\CompanyProject;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
use App\Models\ConstructionWorkstation;
|
||||
|
||||
class ProjectoDatacontroller extends Controller
|
||||
{
|
||||
public function getEquipmentDetails($receiveListEquipmentId)
|
||||
{
|
||||
$ids = explode(',', $receiveListEquipmentId);
|
||||
|
||||
$equipments = Equipment::whereIn('equipment_id', $ids)->get();
|
||||
|
||||
// Pegar os unique "equipment_type_id"s
|
||||
$equipmentTypeIds = $equipments->pluck('equipment_type_id')->unique();
|
||||
|
||||
// Obter todos os "AmbitsEquipment" para esses "equipment_type_id"s
|
||||
$ambitsEquipments = AmbitsEquipment::whereIn('equipment_type_id', $equipmentTypeIds)->get();
|
||||
|
||||
// Mapear os "AmbitsEquipment" de volta aos equipamentos correspondentes
|
||||
foreach ($equipments as $equipment) {
|
||||
$equipment->ambits = $ambitsEquipments->where('equipment_type_id', $equipment->equipment_type_id);
|
||||
}
|
||||
return response()->json($equipments);
|
||||
}
|
||||
|
||||
|
||||
public function receiveAllInstallationEquipment($receiveNumberProject)
|
||||
{
|
||||
|
||||
$receveProject = CompanyProject::find($receiveNumberProject);
|
||||
$receveEquipments = Equipment::whereHas('unit.plant', function ($query) use ($receveProject) {
|
||||
$query->where('plants.plant_id', '=', $receveProject->plant_id);
|
||||
})
|
||||
->where('company_projects_id', null) // Adiciona a condição aqui
|
||||
->with(['equipmentType', 'unit', 'equipmentAssociationAmbit.ambitsEquipment'])
|
||||
->get();
|
||||
|
||||
|
||||
return DataTables::of($receveEquipments)
|
||||
->addColumn('equipment_type', function ($row) {
|
||||
return $row->equipmentType->equipment_type_name;
|
||||
})
|
||||
->addColumn('unit', function ($row) {
|
||||
return $row->unit->unit_name;
|
||||
})
|
||||
->toJson();
|
||||
}
|
||||
|
||||
|
||||
public function HomePage()
|
||||
{
|
||||
$CompanyProject = CompanyProject::all();
|
||||
|
||||
return view('Admin/index')
|
||||
// return view('codePronto');
|
||||
->with("CompanyProject", $CompanyProject);
|
||||
}
|
||||
|
||||
public function ManageAssets()
|
||||
{
|
||||
|
||||
$units = DB::table('plants')
|
||||
->join('units', 'plants.plant_id', '=', 'units.plant_id')
|
||||
->join('users', 'plants.user_id', '=', 'users.user_id')
|
||||
->select('plants.*', 'units.unit_name', 'users.user_name as user_name')
|
||||
->get();
|
||||
$equipments = Equipment::all();
|
||||
// $equipaments = DB::table('equipaments')
|
||||
// ->join('factories','equipaments.factory_id', '=', 'factories.factories_id')
|
||||
// ->join('equipament_types', 'equipaments.equipament_type_id', '=' , 'equipament_types.equipament_type_id')
|
||||
// ->select('equipaments.*', 'factories.factories_name', 'equipament_types.equipment_type_name')
|
||||
// ->get();
|
||||
|
||||
// return view('Admin/DataManagement/manageassets', compact('units','equipaments'));
|
||||
return view('Admin/DataManagement/manageassets', compact('units', 'equipments'));
|
||||
}
|
||||
|
||||
public function showUnit($id)
|
||||
{
|
||||
|
||||
$equipaments = Equipment::where('equipment_id', $id)->firstOrFail();
|
||||
return view('Admin/DataManagement/showEquipament', compact('equipaments'));
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function receiveEquipmentsProject($receiveNumberProject)
|
||||
{
|
||||
// Recebe os dados vindos da funcao 'data' criada na view
|
||||
$equipment_type_id = request('equipment_type_id');
|
||||
$ambits_id = request('ambits_id');
|
||||
|
||||
//Recebe sempre apenas os equipamentos relacionados a obra
|
||||
// $model = Equipment::where('company_projects_id', $receiveNumberProject);
|
||||
|
||||
// Caso 'equipment_type_id' seja '#', mostra todos os equipamentos
|
||||
if ($equipment_type_id == '#') {
|
||||
$model = Equipment::query()
|
||||
->where('company_projects_id', $receiveNumberProject)
|
||||
->with(['equipmentType', 'unit', 'equipmentAssociationAmbit.ambitsEquipment']);
|
||||
}
|
||||
// Caso 'equipment_type_id' não seja '#', filtra os equipamentos por tipo e Âmbito (caso 'ambits_id' não seja '#')
|
||||
else {
|
||||
$equipment_type_id = intval($equipment_type_id);
|
||||
$model = Equipment::where('equipments.equipment_type_id', $equipment_type_id)
|
||||
->where('company_projects_id', $receiveNumberProject)
|
||||
->join('equipment_association_ambits', 'equipments.equipment_id', '=', 'equipment_association_ambits.equipment_id')
|
||||
->with(['equipmentType', 'unit', 'equipmentAssociationAmbit.ambitsEquipment']);
|
||||
|
||||
if ($ambits_id != '#') {
|
||||
$ambits_id = intval($ambits_id);
|
||||
$model->where('equipment_association_ambits.ambits_id', $ambits_id)
|
||||
->where('company_projects_id', $receiveNumberProject);
|
||||
}
|
||||
}
|
||||
|
||||
return DataTables::of($model)
|
||||
->addColumn('equipment_type', function ($row) {
|
||||
return $row->equipmentType->equipment_type_name;
|
||||
})
|
||||
->addColumn('Unit', function ($row) {
|
||||
return $row->unit->unit_name;
|
||||
})
|
||||
->addColumn('Ambits', function ($row) {
|
||||
return $row->equipmentAssociationAmbit->ambitsEquipment->ambits_description;
|
||||
})
|
||||
->addColumn('order_tasks', function ($row) {
|
||||
return $row->orderEquipmentTasks->map(function ($task) {
|
||||
return $task->elementalTask->elemental_tasks_code;
|
||||
})->implode(' ||');
|
||||
})
|
||||
->addColumn('current_task', function ($row) {
|
||||
return $row->controlEquipmentWorkstation->map(function ($task) {
|
||||
return $task->elementalTask->elemental_tasks_code;
|
||||
})->implode(' ||');
|
||||
})
|
||||
->addColumn('Inspec', function ($row) {
|
||||
return $row->hasInspectionYes() ? 'Sim' : 'Nao';
|
||||
})
|
||||
->toJson();
|
||||
}
|
||||
|
||||
public function receiveWorkstationProject($receiveNumberProject)
|
||||
{
|
||||
$model = ConstructionWorkstation::where('company_projects_id', $receiveNumberProject)->with('workstationsAssociationTasks');
|
||||
|
||||
return DataTables::of($model)
|
||||
->addColumn('workstations_Association_Tasks', function ($row) {
|
||||
return $row->workstationsAssociationTasks->map(function ($task) {
|
||||
return $task->elementalTask->elemental_tasks_code;
|
||||
})->implode(' ||');
|
||||
})
|
||||
|
||||
->toJson();
|
||||
}
|
||||
}
|
||||
163
app/Http/Controllers/userController.php
Executable file
163
app/Http/Controllers/userController.php
Executable file
|
|
@ -0,0 +1,163 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\TypeUser;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Laravel\Fortify\Contracts\LoginResponse as LoginResponseContract;
|
||||
use Laravel\Fortify\Contracts\LogoutResponse as LogoutResponseContract;
|
||||
use Laravel\Fortify\Fortify;
|
||||
use Laravel\Fortify\Http\Controllers\AuthenticatedSessionController as FortifyAuthenticatedSessionController;
|
||||
|
||||
use Illuminate\Auth\Events\Verified;
|
||||
|
||||
use App\Models\User;
|
||||
|
||||
class userController extends Controller
|
||||
{
|
||||
public function UserProfile($id)
|
||||
{
|
||||
$user = User::find($id);
|
||||
return view('Admin.profile', compact('user'));
|
||||
}
|
||||
|
||||
public function yourVerificationMethod(Request $request, $id, $hash)
|
||||
{
|
||||
$user = User::findOrFail($id);
|
||||
|
||||
if (!hash_equals((string) $hash, sha1($user->getEmailForVerification()))) {
|
||||
abort(403, 'Unauthorized action.');
|
||||
}
|
||||
|
||||
if ($user->markEmailAsVerified()) {
|
||||
event(new Verified($user));
|
||||
}
|
||||
|
||||
// Redirecione para a rota desejada após a verificação bem-sucedida
|
||||
return redirect()->route('CreateUsers')->with('message', 'E-mail verificado com sucesso!');
|
||||
}
|
||||
|
||||
|
||||
public function authenticate(Request $request)
|
||||
{
|
||||
$request->validate([
|
||||
Fortify::username() => 'required|string',
|
||||
'password' => 'required|string',
|
||||
]);
|
||||
|
||||
$user = User::where('email', $request->email)->first();
|
||||
|
||||
if ($user && Hash::check($request->password, $user->password)) {
|
||||
return $user;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static function authenticateAndRedirect(Request $request)
|
||||
{
|
||||
$user = User::where('email', $request->email)->first();
|
||||
|
||||
if ($user && Hash::check($request->password, $user->password)) {
|
||||
Auth::login($user);
|
||||
|
||||
return redirect()->route('CreateUsers');
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public function ListCompanies()
|
||||
{
|
||||
$users = User::with('userType')->where('type_users', '=', 3)->get();
|
||||
|
||||
return view('Admin.CrudUsers.listCompany', compact('users'));
|
||||
}
|
||||
|
||||
//Busca Todos os utilizadores Exeto as 'Empresas'
|
||||
public function ListUsers()
|
||||
{
|
||||
$users = User::with('userType')->where('type_users', '<>', 3)->get();
|
||||
|
||||
return view('Admin.CrudUsers.listUsers', compact('users'));
|
||||
}
|
||||
|
||||
public function show($id)
|
||||
{
|
||||
$user = User::findOrFail($id);
|
||||
return view('Admin.CrudUsers.showUsers', compact('user'));
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$user = User::findOrFail($id);
|
||||
return view('Admin.CrudUsers.editUsers', compact('user'));
|
||||
}
|
||||
|
||||
public function update(Request $request, User $user)
|
||||
{
|
||||
$request->validate([
|
||||
'name' => 'required',
|
||||
'email' => 'required|email|unique:users,email,' . $user->user_id,
|
||||
'password' => 'nullable|min:8|confirmed',
|
||||
'user_type' => 'required',
|
||||
'user_phone' => 'required',
|
||||
'user_nif' => 'required',
|
||||
]);
|
||||
|
||||
$user->update([
|
||||
'name' => $request->get('name'),
|
||||
'email' => $request->get('email'),
|
||||
'password' => $request->filled('password') ? Hash::make($request->get('password')) : $user->password,
|
||||
'user_type' => $request->get('user_type'),
|
||||
'user_phone' => $request->get('user_phone'),
|
||||
'user_nif' => $request->get('user_nif'),
|
||||
]);
|
||||
|
||||
return redirect('/users/ListUsers')->with('success', 'Usuario atualizado com Sucesso!!');
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function create()
|
||||
{
|
||||
return view('users.create');
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
{
|
||||
$request->validate([
|
||||
'name' => 'required',
|
||||
'email' => 'required|email|unique:users',
|
||||
'password' => 'required|min:8|confirmed',
|
||||
'user_type' => 'required',
|
||||
'user_phone' => 'required',
|
||||
'user_nif' => 'required',
|
||||
]);
|
||||
|
||||
$user = new User([
|
||||
'name' => $request->get('name'),
|
||||
'email' => $request->get('email'),
|
||||
'password' => Hash::make($request->get('password')),
|
||||
'user_type' => $request->get('user_type'),
|
||||
'user_phone' => $request->get('user_phone'),
|
||||
'user_nif' => $request->get('user_nif'),
|
||||
]);
|
||||
|
||||
$user->save();
|
||||
return redirect('/users')->with('success', 'User created successfully!');
|
||||
}
|
||||
|
||||
public function destroy(User $user)
|
||||
{
|
||||
$user->delete();
|
||||
return redirect('/users/ListUsers')->with('success', 'User deleted successfully!');
|
||||
}
|
||||
}
|
||||
3
app/Http/Kernel.php
Normal file → Executable file
3
app/Http/Kernel.php
Normal file → Executable file
|
|
@ -53,6 +53,8 @@ class Kernel extends HttpKernel
|
|||
* @var array<string, class-string|string>
|
||||
*/
|
||||
protected $middlewareAliases = [
|
||||
'checksuperadmin' => \App\Http\Middleware\CheckSuperAdmin::class,
|
||||
'checkUserType' => \App\Http\Middleware\CheckUserType::class,
|
||||
'auth' => \App\Http\Middleware\Authenticate::class,
|
||||
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
||||
'auth.session' => \Illuminate\Session\Middleware\AuthenticateSession::class,
|
||||
|
|
@ -63,5 +65,6 @@ class Kernel extends HttpKernel
|
|||
'signed' => \App\Http\Middleware\ValidateSignature::class,
|
||||
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
||||
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
|
||||
|
||||
];
|
||||
}
|
||||
|
|
|
|||
0
app/Http/Middleware/Authenticate.php
Normal file → Executable file
0
app/Http/Middleware/Authenticate.php
Normal file → Executable file
24
app/Http/Middleware/CheckSuperAdmin.php
Executable file
24
app/Http/Middleware/CheckSuperAdmin.php
Executable file
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Http\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
class CheckSuperAdmin
|
||||
{
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
|
||||
*/
|
||||
public function handle(Request $request, Closure $next): Response
|
||||
{
|
||||
if (auth()->user() && auth()->user()->userType->type_user == 'Super_Administrador') {
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
return abort(403, 'Acesso não autorizado.');
|
||||
}
|
||||
}
|
||||
33
app/Http/Middleware/CheckUserType.php
Executable file
33
app/Http/Middleware/CheckUserType.php
Executable file
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Http\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
class CheckUserType
|
||||
{
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
|
||||
*/
|
||||
public function handle(Request $request, Closure $next)
|
||||
{
|
||||
if (auth()->user()) {
|
||||
$currentRoute = Route::currentRouteName();
|
||||
$userType = auth()->user()->userType->type_user;
|
||||
|
||||
if ($userType == 'Super_Administrador' && $currentRoute != 'home') {
|
||||
return redirect()->route('home');
|
||||
} elseif ($userType == 'Tecnicos' && $currentRoute != 'enterWorkstation') {
|
||||
return redirect()->route('enterWorkstation');
|
||||
}
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
}
|
||||
0
app/Http/Middleware/EncryptCookies.php
Normal file → Executable file
0
app/Http/Middleware/EncryptCookies.php
Normal file → Executable file
0
app/Http/Middleware/PreventRequestsDuringMaintenance.php
Normal file → Executable file
0
app/Http/Middleware/PreventRequestsDuringMaintenance.php
Normal file → Executable file
22
app/Http/Middleware/RedirectIfAuthenticated.php
Normal file → Executable file
22
app/Http/Middleware/RedirectIfAuthenticated.php
Normal file → Executable file
|
|
@ -19,9 +19,27 @@ public function handle(Request $request, Closure $next, string ...$guards): Resp
|
|||
{
|
||||
$guards = empty($guards) ? [null] : $guards;
|
||||
|
||||
// foreach ($guards as $guard) {
|
||||
// if (Auth::guard($guard)->check()) {
|
||||
// return redirect(RouteServiceProvider::HOME);
|
||||
// }
|
||||
// }
|
||||
|
||||
foreach ($guards as $guard) {
|
||||
if (Auth::guard($guard)->check()) {
|
||||
return redirect(RouteServiceProvider::HOME);
|
||||
if (Auth::guard($guard)->check() && ! $request->is('register') && ! $request->is('email/verify')) {
|
||||
$user = Auth::guard($guard)->user();
|
||||
|
||||
switch ($user->user_type) {
|
||||
case 'Cliente':
|
||||
return redirect(RouteServiceProvider::CLIENTE);
|
||||
case 'Tecnicos':
|
||||
return redirect(RouteServiceProvider::TECNICO);
|
||||
case 'inspetor':
|
||||
return redirect(RouteServiceProvider::INSPETOR);
|
||||
// Adicione outros tipos de usuário e suas rotas aqui
|
||||
default:
|
||||
return redirect(RouteServiceProvider::HOME);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
0
app/Http/Middleware/TrimStrings.php
Normal file → Executable file
0
app/Http/Middleware/TrimStrings.php
Normal file → Executable file
0
app/Http/Middleware/TrustHosts.php
Normal file → Executable file
0
app/Http/Middleware/TrustHosts.php
Normal file → Executable file
0
app/Http/Middleware/TrustProxies.php
Normal file → Executable file
0
app/Http/Middleware/TrustProxies.php
Normal file → Executable file
0
app/Http/Middleware/ValidateSignature.php
Normal file → Executable file
0
app/Http/Middleware/ValidateSignature.php
Normal file → Executable file
6
app/Http/Middleware/VerifyCsrfToken.php
Normal file → Executable file
6
app/Http/Middleware/VerifyCsrfToken.php
Normal file → Executable file
|
|
@ -11,7 +11,7 @@ class VerifyCsrfToken extends Middleware
|
|||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $except = [
|
||||
//
|
||||
];
|
||||
// protected $except = [
|
||||
// '/create-equipament-project',
|
||||
// ];
|
||||
}
|
||||
|
|
|
|||
59
app/Mail/NewUserNotification.php
Executable file
59
app/Mail/NewUserNotification.php
Executable file
|
|
@ -0,0 +1,59 @@
|
|||
<?php
|
||||
|
||||
namespace App\Mail;
|
||||
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Mail\Mailables\Content;
|
||||
use Illuminate\Mail\Mailables\Envelope;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class NewUserNotification extends Mailable
|
||||
{
|
||||
use Queueable, SerializesModels;
|
||||
|
||||
/**
|
||||
* Create a new message instance.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
public function build()
|
||||
{
|
||||
return $this->subject('Um novo usuário para criar')
|
||||
->view('emails.new_user_notification');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the message envelope.
|
||||
*/
|
||||
public function envelope(): Envelope
|
||||
{
|
||||
return new Envelope(
|
||||
subject: 'New User Notification',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the message content definition.
|
||||
*/
|
||||
public function content(): Content
|
||||
{
|
||||
return new Content(
|
||||
view: 'email.new_user_notification',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the attachments for the message.
|
||||
*
|
||||
* @return array<int, \Illuminate\Mail\Mailables\Attachment>
|
||||
*/
|
||||
public function attachments(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
21
app/Models/AmbitsEquipment.php
Executable file
21
app/Models/AmbitsEquipment.php
Executable file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class AmbitsEquipment extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'ambits_equipments';
|
||||
protected $primaryKey = 'ambits_equipment_id';
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
|
||||
public function equipmentAssociationAmbit(){
|
||||
return $this->hasMany(EquipmentAssociationAmbit::class, 'ambits_id', 'ambits_id');
|
||||
}
|
||||
}
|
||||
25
app/Models/CompanyProject.php
Executable file
25
app/Models/CompanyProject.php
Executable file
|
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class CompanyProject extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
protected $table = 'company_projects';
|
||||
|
||||
protected $primaryKey = 'company_projects_id';
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
public function plants(){
|
||||
|
||||
return $this->hasMany(Plant::class,'plant_id', 'plant_id');
|
||||
}
|
||||
|
||||
public function user(){
|
||||
return $this->hasOneThrough(User::class, Plant::class, 'plant_id', 'user_id');
|
||||
}
|
||||
}
|
||||
22
app/Models/ConstructionWorkstation.php
Executable file
22
app/Models/ConstructionWorkstation.php
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class ConstructionWorkstation extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
protected $table = 'construction_workstations';
|
||||
|
||||
protected $primaryKey = 'id_workstations';
|
||||
|
||||
public function workstationsAssociationTasks()
|
||||
{
|
||||
return $this->hasMany(WorkstationsAssociationTasks::class, 'id_workstations','id_workstations');
|
||||
}
|
||||
}
|
||||
27
app/Models/ControlEquipmentWorkstation.php
Executable file
27
app/Models/ControlEquipmentWorkstation.php
Executable file
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class ControlEquipmentWorkstation extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
protected $table = 'control_equipment_workstation';
|
||||
|
||||
// protected $primaryKey = 'id';
|
||||
|
||||
public function equipment()
|
||||
{
|
||||
return $this->belongsTo(Equipment::class, 'equipment_id', 'equipment_id');
|
||||
}
|
||||
|
||||
public function elementalTask()
|
||||
{
|
||||
return $this->belongsTo(ElementalTasks::class,'elemental_tasks_id','elemental_tasks_id');
|
||||
}
|
||||
}
|
||||
31
app/Models/ElementalTasks.php
Executable file
31
app/Models/ElementalTasks.php
Executable file
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class ElementalTasks extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
public $timestamps = false;
|
||||
|
||||
protected $table = 'elemental_tasks';
|
||||
|
||||
protected $primaryKey = 'elemental_tasks_id';
|
||||
|
||||
public function orderEquipmentTasks()
|
||||
{
|
||||
return $this->hasMany(OrderEquipmentTasks::class,'elemental_tasks_id','elemental_tasks_id');
|
||||
}
|
||||
|
||||
public function controlEquipmentWorkstation()
|
||||
{
|
||||
return $this->hasMany(ControlEquipmentWorkstation::class, 'elemental_tasks_id', 'elemental_tasks_id');
|
||||
}
|
||||
|
||||
public function workstationsAssociationTasks()
|
||||
{
|
||||
return $this->hasMany(WorkstationsAssociationTasks::class,'elemental_tasks_id','elemental_tasks_id');
|
||||
}
|
||||
}
|
||||
67
app/Models/Equipment.php
Executable file
67
app/Models/Equipment.php
Executable file
|
|
@ -0,0 +1,67 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use APP\Models\equipament_type;
|
||||
use App\Models\factorie;
|
||||
use App\Models\specific_Attributes_Equipament_Type;
|
||||
use App\Models\installation;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Equipment extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
protected $table = 'equipments';
|
||||
|
||||
protected $primaryKey = 'equipment_id';
|
||||
|
||||
public function unit()
|
||||
{
|
||||
return $this->belongsTo(Unit::class, 'unit_id', 'unit_id');
|
||||
}
|
||||
|
||||
public function equipmentType()
|
||||
{
|
||||
return $this->belongsTo(EquipmentType::class, 'equipment_type_id', 'equipment_type_id');
|
||||
}
|
||||
|
||||
public function specificAttributes()
|
||||
{
|
||||
return $this->hasMany(SpecificAttributesEquipmentType::class, 'equipment_id', 'equipment_id')
|
||||
->join('general_attributes_equipaments', 'specific_attributes_equipament_types.general_attributes_equipment_id', '=', 'general_attributes_equipaments.general_attributes_equipment_id')
|
||||
->orderBy('general_attributes_equipaments.general_attributes_equipment_description', 'asc');
|
||||
}
|
||||
|
||||
public function equipmentAssociationAmbit()
|
||||
{
|
||||
//Antiga hasMany , apenas colocado hasOne para funcionar o datatables
|
||||
return $this->hasOne(EquipmentAssociationAmbit::class, 'equipment_id', 'equipment_id');
|
||||
}
|
||||
|
||||
public function orderEquipmentTasks()
|
||||
{
|
||||
return $this->hasMany(OrderEquipmentTasks::class, 'equipment_id', 'equipment_id');
|
||||
}
|
||||
|
||||
public function equipmentComments()
|
||||
{
|
||||
return $this->hasMany(EquipmentComments::class, 'equipment_id', 'equipment_id');
|
||||
}
|
||||
|
||||
public function controlEquipmentWorkstation()
|
||||
{
|
||||
return $this->hasMany(ControlEquipmentWorkstation::class, 'equipment_id', 'equipment_id');
|
||||
}
|
||||
|
||||
public function hasInspectionYes()
|
||||
{
|
||||
return $this->orderEquipmentTasks()->where('inspection', 'Sim')->exists();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
28
app/Models/EquipmentAssociationAmbit.php
Executable file
28
app/Models/EquipmentAssociationAmbit.php
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class EquipmentAssociationAmbit extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
protected $table = 'equipment_association_ambits';
|
||||
|
||||
public function equipmentType(){
|
||||
return $this->belongsTo(EquipmentType::class,'equipment_type_id', 'equipment_type_id');
|
||||
}
|
||||
|
||||
public function ambitsEquipment(){
|
||||
return $this->belongsTo(AmbitsEquipment::class,'ambits_id', 'ambits_id');
|
||||
}
|
||||
|
||||
public function Equipment(){
|
||||
return $this->belongsTo(Equipment::class,'equipment_id', 'equipment_id');
|
||||
|
||||
}
|
||||
}
|
||||
23
app/Models/EquipmentComments.php
Executable file
23
app/Models/EquipmentComments.php
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class EquipmentComments extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
protected $table = 'equipment_comments';
|
||||
|
||||
protected $primaryKey = 'equipment_comment_id';
|
||||
|
||||
|
||||
public function equipment()
|
||||
{
|
||||
return $this->belongsTo(Equipment::class, 'equipment_id', 'equipment_id');
|
||||
}
|
||||
}
|
||||
32
app/Models/EquipmentType.php
Executable file
32
app/Models/EquipmentType.php
Executable file
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class EquipmentType extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'equipment_types';
|
||||
|
||||
protected $primaryKey = 'equipament_type_id';
|
||||
|
||||
public function equipments(){
|
||||
return $this->hasMany(Equipment::class, 'equipment_type_id', 'equipment_type_id');
|
||||
}
|
||||
|
||||
public function pendingEquipments(){
|
||||
return $this->hasMany(PendingEquipment::class, 'pending_equipment_type_id', 'equipment_type_id');
|
||||
}
|
||||
|
||||
|
||||
public function specificAttributesEquipamentTypes(){
|
||||
return $this->hasMany(SpecificAttributesEquipmentType::class, 'equipment_type_id', 'equipment_type_id');
|
||||
}
|
||||
|
||||
public function equipmentAssociationAmbits(){
|
||||
return $this->hasMany(EquipmentAssociationAmbit::class,'equipment_type_id', 'equipment_type_id');
|
||||
}
|
||||
}
|
||||
19
app/Models/FurtherTasks.php
Executable file
19
app/Models/FurtherTasks.php
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class FurtherTasks extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
protected $table = 'further_tasks';
|
||||
|
||||
protected $primaryKey = 'further_tasks_id';
|
||||
|
||||
|
||||
}
|
||||
20
app/Models/GeneralAttributesEquipment.php
Executable file
20
app/Models/GeneralAttributesEquipment.php
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class GeneralAttributesEquipment extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'general_attributes_equipaments';
|
||||
|
||||
protected $primaryKey = 'general_attributes_equipment_id';
|
||||
|
||||
public function specificAttributes()
|
||||
{
|
||||
return $this->hasMany(SpecificAttributesEquipmentType::class, 'general_attributes_equipment_id', 'general_attributes_equipment_id');
|
||||
}
|
||||
}
|
||||
24
app/Models/OrderEquipmentTasks.php
Executable file
24
app/Models/OrderEquipmentTasks.php
Executable file
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class OrderEquipmentTasks extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
public $timestamps = false;
|
||||
|
||||
protected $table = 'ordered_equipment_tasks';
|
||||
|
||||
public function equipment()
|
||||
{
|
||||
return $this->belongsTo(Equipment::class, 'equipment_id', 'equipment_id');
|
||||
}
|
||||
|
||||
public function elementalTask()
|
||||
{
|
||||
return $this->belongsTo(ElementalTasks::class,'elemental_tasks_id','elemental_tasks_id');
|
||||
}
|
||||
}
|
||||
28
app/Models/PendingEquipment.php
Executable file
28
app/Models/PendingEquipment.php
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class PendingEquipment extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
protected $table = 'pending_equipments';
|
||||
|
||||
protected $primaryKey = 'pending_equipment_id';
|
||||
|
||||
public function unit()
|
||||
{
|
||||
return $this->belongsTo(Unit::class, 'pending_equipment_unit_id', 'unit_id');
|
||||
}
|
||||
|
||||
public function equipmentType()
|
||||
{
|
||||
return $this->belongsTo(EquipmentType::class, 'pending_equipment_type_id', 'equipment_type_id');
|
||||
}
|
||||
|
||||
}
|
||||
38
app/Models/PendingUser.php
Executable file
38
app/Models/PendingUser.php
Executable file
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class PendingUser extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'pending_users';
|
||||
|
||||
protected $primaryKey = 'pending_user_id';
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $fillable = [
|
||||
'pending_name',
|
||||
'pending_email',
|
||||
'pending_phone',
|
||||
'pending_nif',
|
||||
'pending_password',
|
||||
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be hidden for serialization.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $hidden = [
|
||||
'password',
|
||||
];
|
||||
}
|
||||
29
app/Models/Plant.php
Executable file
29
app/Models/Plant.php
Executable file
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Plant extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'plants';
|
||||
|
||||
protected $primaryKey = 'plant_id';
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
public function user(){
|
||||
return $this->belongsTo(User::class, 'user_id', 'user_id');
|
||||
}
|
||||
|
||||
public function companyProjects(){
|
||||
return $this->hasMany(CompanyProject::class, 'plant_id', 'plant_id');
|
||||
}
|
||||
|
||||
public function units(){
|
||||
return $this->hasMany(Unit::class, 'plant_id', 'plant_id');
|
||||
}
|
||||
}
|
||||
34
app/Models/SpecificAttributesEquipmentType.php
Executable file
34
app/Models/SpecificAttributesEquipmentType.php
Executable file
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class SpecificAttributesEquipmentType extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
protected $table = 'specific_attributes_equipament_types';
|
||||
|
||||
public function equipmentType(){
|
||||
return $this->belongsTo(EquipmentType::class,'equipment_type_id', 'equipment_type_id');
|
||||
}
|
||||
|
||||
public function equipment()
|
||||
{
|
||||
return $this->belongsTo(Equipment::class, 'equipment_id', 'equipment_id');
|
||||
}
|
||||
|
||||
public function generalAttributesEquipment()
|
||||
{
|
||||
return $this->belongsTo(GeneralAttributesEquipament::class, 'general_attributes_equipment_id', 'general_attributes_equipment_id');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
13
app/Models/TasksAssociationAmbits.php
Executable file
13
app/Models/TasksAssociationAmbits.php
Executable file
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class TasksAssociationAmbits extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'tasks_association_ambits';
|
||||
}
|
||||
20
app/Models/TypeUser.php
Executable file
20
app/Models/TypeUser.php
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class TypeUser extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'type_users';
|
||||
|
||||
protected $primaryKey = 'type_user_id';
|
||||
|
||||
public function users()
|
||||
{
|
||||
return $this->hasMany(User::class, 'type_users', 'type_user_id');
|
||||
}
|
||||
}
|
||||
31
app/Models/Unit.php
Executable file
31
app/Models/Unit.php
Executable file
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Unit extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
public $timestamps = false;
|
||||
|
||||
protected $table = 'units';
|
||||
|
||||
protected $primaryKey = 'unit_id';
|
||||
public function equipments(){
|
||||
|
||||
return $this->hasMany(Equipment::class, 'unit_id', 'unit_id');
|
||||
}
|
||||
|
||||
public function pendingEquipments(){
|
||||
return $this->hasMany(PendingEquipment::class, 'pending_equipment_unit_id', 'unit_id');
|
||||
}
|
||||
|
||||
public function plant()
|
||||
{
|
||||
return $this->belongsTo(Plant::class, 'plant_id');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
26
app/Models/User.php
Normal file → Executable file
26
app/Models/User.php
Normal file → Executable file
|
|
@ -8,10 +8,19 @@
|
|||
use Illuminate\Notifications\Notifiable;
|
||||
use Laravel\Sanctum\HasApiTokens;
|
||||
|
||||
|
||||
// use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||
|
||||
|
||||
class User extends Authenticatable
|
||||
// implements MustVerifyEmail
|
||||
{
|
||||
use HasApiTokens, HasFactory, Notifiable;
|
||||
|
||||
protected $table = 'users';
|
||||
|
||||
protected $primaryKey = 'user_id';
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
|
|
@ -21,6 +30,10 @@ class User extends Authenticatable
|
|||
'name',
|
||||
'email',
|
||||
'password',
|
||||
'user_type',
|
||||
'user_phone',
|
||||
'user_nif'
|
||||
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
@ -41,4 +54,17 @@ class User extends Authenticatable
|
|||
protected $casts = [
|
||||
'email_verified_at' => 'datetime',
|
||||
];
|
||||
|
||||
// public function typeUser(){
|
||||
// return $this->belongsTo(TypeUser::class, 'type_users', 'type_user_id');
|
||||
// }
|
||||
|
||||
public function userType() {
|
||||
return $this->belongsTo(TypeUser::class, 'type_users', 'type_user_id');
|
||||
}
|
||||
|
||||
public function plants(){
|
||||
return $this->hasMany(Plant::class,'user_id', 'user_id');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
25
app/Models/WorkstationsAssociationTasks.php
Executable file
25
app/Models/WorkstationsAssociationTasks.php
Executable file
|
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class WorkstationsAssociationTasks extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
protected $table = 'workstations_association_tasks';
|
||||
|
||||
|
||||
public function constructionWorkstation()
|
||||
{
|
||||
return $this->belongsTo(ConstructionWorkstation::class, 'id_workstations','id_workstations');
|
||||
}
|
||||
public function elementalTask()
|
||||
{
|
||||
return $this->belongsTo(ElementalTasks::class,'elemental_tasks_id','elemental_tasks_id');
|
||||
}
|
||||
}
|
||||
0
app/Providers/AppServiceProvider.php
Normal file → Executable file
0
app/Providers/AppServiceProvider.php
Normal file → Executable file
0
app/Providers/AuthServiceProvider.php
Normal file → Executable file
0
app/Providers/AuthServiceProvider.php
Normal file → Executable file
0
app/Providers/BroadcastServiceProvider.php
Normal file → Executable file
0
app/Providers/BroadcastServiceProvider.php
Normal file → Executable file
0
app/Providers/EventServiceProvider.php
Normal file → Executable file
0
app/Providers/EventServiceProvider.php
Normal file → Executable file
67
app/Providers/FortifyServiceProvider.php
Normal file → Executable file
67
app/Providers/FortifyServiceProvider.php
Normal file → Executable file
|
|
@ -10,6 +10,16 @@
|
|||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\RateLimiter;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
|
||||
|
||||
use Laravel\Fortify\Contracts\ResetPasswordViewResponse;
|
||||
|
||||
use App\Http\Controllers\Auth\ResetPasswordController;
|
||||
use App\Http\Controllers\Auth\PasswordResetLinkController;
|
||||
|
||||
use Laravel\Fortify\Fortify;
|
||||
|
||||
class FortifyServiceProvider extends ServiceProvider
|
||||
|
|
@ -19,7 +29,9 @@ class FortifyServiceProvider extends ServiceProvider
|
|||
*/
|
||||
public function register(): void
|
||||
{
|
||||
//
|
||||
$this->app->singleton(ResetPasswordController::class, function () {
|
||||
return new ResetPasswordController();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -32,20 +44,69 @@ public function boot(): void
|
|||
return view('auth.login');
|
||||
});
|
||||
|
||||
Fortify::registerView(function () {
|
||||
return view('auth.register');
|
||||
});
|
||||
|
||||
Fortify::verifyEmailView(function () {
|
||||
return view('auth.verify-email');
|
||||
});
|
||||
|
||||
Fortify::authenticateUsing(function (Request $request) {
|
||||
$email = $request->input('email');
|
||||
|
||||
// Verifica se "@" já está presente no e-mail. Se não, adiciona "@isptgroup.com" ao final.
|
||||
if (!str_contains($email, '@')) {
|
||||
$email .= '@isptgroup.com';
|
||||
}
|
||||
|
||||
$password = $request->input('password');
|
||||
|
||||
$user = User::where('email', $email)->first();
|
||||
|
||||
if ($user && Hash::check($password, $user->password)) {
|
||||
return $user;
|
||||
}
|
||||
});
|
||||
|
||||
Fortify::createUsersUsing(CreateNewUser::class);
|
||||
Fortify::updateUserProfileInformationUsing(UpdateUserProfileInformation::class);
|
||||
Fortify::updateUserPasswordsUsing(UpdateUserPassword::class);
|
||||
Fortify::resetUserPasswordsUsing(ResetUserPassword::class);
|
||||
|
||||
|
||||
RateLimiter::for('login', function (Request $request) {
|
||||
$email = (string) $request->email;
|
||||
|
||||
return Limit::perMinute(5)->by($email.$request->ip());
|
||||
return Limit::perMinute(5)->by($email . $request->ip());
|
||||
});
|
||||
|
||||
RateLimiter::for('two-factor', function (Request $request) {
|
||||
return Limit::perMinute(5)->by($request->session()->get('login.id'));
|
||||
});
|
||||
|
||||
|
||||
Fortify::resetUserPasswordsUsing(ResetUserPassword::class);
|
||||
|
||||
|
||||
Fortify::requestPasswordResetLinkView(function () {
|
||||
return view('auth.forgot-password');
|
||||
});
|
||||
|
||||
$this->registerPasswordResetResponseBindings();
|
||||
Fortify::resetPasswordView(function ($request) {
|
||||
return view('auth.reset-password', ['token' => $request->route('token')]);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
protected function registerPasswordResetResponseBindings()
|
||||
{
|
||||
$this->app->singleton(SendPasswordResetLinkViewResponse::class, function () {
|
||||
return view('auth.forgot-password');
|
||||
});
|
||||
|
||||
$this->app->singleton(ResetPasswordViewResponse::class, function () {
|
||||
return view('auth.reset-password');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
5
app/Providers/RouteServiceProvider.php
Normal file → Executable file
5
app/Providers/RouteServiceProvider.php
Normal file → Executable file
|
|
@ -19,6 +19,11 @@ class RouteServiceProvider extends ServiceProvider
|
|||
*/
|
||||
public const HOME = '/';
|
||||
|
||||
// public const HOME = '/home';
|
||||
public const CLIENTE = '/cliente';
|
||||
public const TECNICO = '/Tecnicos';
|
||||
public const INSPETOR = '/inspetor';
|
||||
|
||||
/**
|
||||
* Define your route model bindings, pattern filters, and other route configuration.
|
||||
*/
|
||||
|
|
|
|||
0
bootstrap/app.php
Normal file → Executable file
0
bootstrap/app.php
Normal file → Executable file
0
bootstrap/cache/.gitignore
vendored
Normal file → Executable file
0
bootstrap/cache/.gitignore
vendored
Normal file → Executable file
8
composer.json
Normal file → Executable file
8
composer.json
Normal file → Executable file
|
|
@ -6,11 +6,15 @@
|
|||
"license": "MIT",
|
||||
"require": {
|
||||
"php": "^8.1",
|
||||
"guzzlehttp/guzzle": "^7.2",
|
||||
"guzzlehttp/guzzle": "^7.5",
|
||||
"laravel/fortify": "^1.17",
|
||||
"laravel/framework": "^10.8",
|
||||
"laravel/sanctum": "^3.2",
|
||||
"laravel/tinker": "^2.8"
|
||||
"laravel/tinker": "^2.8",
|
||||
"phpoffice/phpspreadsheet": "^1.28",
|
||||
"symfony/http-client": "^6.2",
|
||||
"symfony/mailgun-mailer": "^6.2",
|
||||
"yajra/laravel-datatables-oracle": "^10.3.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"fakerphp/faker": "^1.9.1",
|
||||
|
|
|
|||
786
composer.lock
generated
Normal file → Executable file
786
composer.lock
generated
Normal file → Executable file
|
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "245aaa8f3ba6d74abbfa93a3545386ff",
|
||||
"content-hash": "51ebbc942093bdb678f8cecc025df588",
|
||||
"packages": [
|
||||
{
|
||||
"name": "bacon/bacon-qr-code",
|
||||
|
|
@ -536,6 +536,67 @@
|
|||
],
|
||||
"time": "2023-01-14T14:17:03+00:00"
|
||||
},
|
||||
{
|
||||
"name": "ezyang/htmlpurifier",
|
||||
"version": "v4.16.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/ezyang/htmlpurifier.git",
|
||||
"reference": "523407fb06eb9e5f3d59889b3978d5bfe94299c8"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/523407fb06eb9e5f3d59889b3978d5bfe94299c8",
|
||||
"reference": "523407fb06eb9e5f3d59889b3978d5bfe94299c8",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "~5.6.0 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"cerdic/css-tidy": "^1.7 || ^2.0",
|
||||
"simpletest/simpletest": "dev-master"
|
||||
},
|
||||
"suggest": {
|
||||
"cerdic/css-tidy": "If you want to use the filter 'Filter.ExtractStyleBlocks'.",
|
||||
"ext-bcmath": "Used for unit conversion and imagecrash protection",
|
||||
"ext-iconv": "Converts text to and from non-UTF-8 encodings",
|
||||
"ext-tidy": "Used for pretty-printing HTML"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"library/HTMLPurifier.composer.php"
|
||||
],
|
||||
"psr-0": {
|
||||
"HTMLPurifier": "library/"
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"/library/HTMLPurifier/Language/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"LGPL-2.1-or-later"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Edward Z. Yang",
|
||||
"email": "admin@htmlpurifier.org",
|
||||
"homepage": "http://ezyang.com"
|
||||
}
|
||||
],
|
||||
"description": "Standards compliant HTML filter written in PHP",
|
||||
"homepage": "http://htmlpurifier.org/",
|
||||
"keywords": [
|
||||
"html"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/ezyang/htmlpurifier/issues",
|
||||
"source": "https://github.com/ezyang/htmlpurifier/tree/v4.16.0"
|
||||
},
|
||||
"time": "2022-09-18T07:06:19+00:00"
|
||||
},
|
||||
{
|
||||
"name": "fruitcake/php-cors",
|
||||
"version": "v1.2.0",
|
||||
|
|
@ -1869,6 +1930,191 @@
|
|||
],
|
||||
"time": "2022-04-17T13:12:02+00:00"
|
||||
},
|
||||
{
|
||||
"name": "maennchen/zipstream-php",
|
||||
"version": "v2.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/maennchen/ZipStream-PHP.git",
|
||||
"reference": "3fa72e4c71a43f9e9118752a5c90e476a8dc9eb3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/3fa72e4c71a43f9e9118752a5c90e476a8dc9eb3",
|
||||
"reference": "3fa72e4c71a43f9e9118752a5c90e476a8dc9eb3",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-mbstring": "*",
|
||||
"myclabs/php-enum": "^1.5",
|
||||
"php": "^8.0",
|
||||
"psr/http-message": "^1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-zip": "*",
|
||||
"friendsofphp/php-cs-fixer": "^3.9",
|
||||
"guzzlehttp/guzzle": "^6.5.3 || ^7.2.0",
|
||||
"mikey179/vfsstream": "^1.6",
|
||||
"php-coveralls/php-coveralls": "^2.4",
|
||||
"phpunit/phpunit": "^8.5.8 || ^9.4.2",
|
||||
"vimeo/psalm": "^5.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"ZipStream\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Paul Duncan",
|
||||
"email": "pabs@pablotron.org"
|
||||
},
|
||||
{
|
||||
"name": "Jonatan Männchen",
|
||||
"email": "jonatan@maennchen.ch"
|
||||
},
|
||||
{
|
||||
"name": "Jesse Donat",
|
||||
"email": "donatj@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "András Kolesár",
|
||||
"email": "kolesar@kolesar.hu"
|
||||
}
|
||||
],
|
||||
"description": "ZipStream is a library for dynamically streaming dynamic zip files from PHP without writing to the disk at all on the server.",
|
||||
"keywords": [
|
||||
"stream",
|
||||
"zip"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/maennchen/ZipStream-PHP/issues",
|
||||
"source": "https://github.com/maennchen/ZipStream-PHP/tree/v2.4.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/maennchen",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://opencollective.com/zipstream",
|
||||
"type": "open_collective"
|
||||
}
|
||||
],
|
||||
"time": "2022-12-08T12:29:14+00:00"
|
||||
},
|
||||
{
|
||||
"name": "markbaker/complex",
|
||||
"version": "3.0.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/MarkBaker/PHPComplex.git",
|
||||
"reference": "95c56caa1cf5c766ad6d65b6344b807c1e8405b9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/95c56caa1cf5c766ad6d65b6344b807c1e8405b9",
|
||||
"reference": "95c56caa1cf5c766ad6d65b6344b807c1e8405b9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.2 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"dealerdirect/phpcodesniffer-composer-installer": "dev-master",
|
||||
"phpcompatibility/php-compatibility": "^9.3",
|
||||
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0",
|
||||
"squizlabs/php_codesniffer": "^3.7"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Complex\\": "classes/src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Mark Baker",
|
||||
"email": "mark@lange.demon.co.uk"
|
||||
}
|
||||
],
|
||||
"description": "PHP Class for working with complex numbers",
|
||||
"homepage": "https://github.com/MarkBaker/PHPComplex",
|
||||
"keywords": [
|
||||
"complex",
|
||||
"mathematics"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/MarkBaker/PHPComplex/issues",
|
||||
"source": "https://github.com/MarkBaker/PHPComplex/tree/3.0.2"
|
||||
},
|
||||
"time": "2022-12-06T16:21:08+00:00"
|
||||
},
|
||||
{
|
||||
"name": "markbaker/matrix",
|
||||
"version": "3.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/MarkBaker/PHPMatrix.git",
|
||||
"reference": "728434227fe21be27ff6d86621a1b13107a2562c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/728434227fe21be27ff6d86621a1b13107a2562c",
|
||||
"reference": "728434227fe21be27ff6d86621a1b13107a2562c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"dealerdirect/phpcodesniffer-composer-installer": "dev-master",
|
||||
"phpcompatibility/php-compatibility": "^9.3",
|
||||
"phpdocumentor/phpdocumentor": "2.*",
|
||||
"phploc/phploc": "^4.0",
|
||||
"phpmd/phpmd": "2.*",
|
||||
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0",
|
||||
"sebastian/phpcpd": "^4.0",
|
||||
"squizlabs/php_codesniffer": "^3.7"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Matrix\\": "classes/src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Mark Baker",
|
||||
"email": "mark@demon-angel.eu"
|
||||
}
|
||||
],
|
||||
"description": "PHP Class for working with matrices",
|
||||
"homepage": "https://github.com/MarkBaker/PHPMatrix",
|
||||
"keywords": [
|
||||
"mathematics",
|
||||
"matrix",
|
||||
"vector"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/MarkBaker/PHPMatrix/issues",
|
||||
"source": "https://github.com/MarkBaker/PHPMatrix/tree/3.0.1"
|
||||
},
|
||||
"time": "2022-12-02T22:17:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "monolog/monolog",
|
||||
"version": "3.3.1",
|
||||
|
|
@ -1970,6 +2216,69 @@
|
|||
],
|
||||
"time": "2023-02-06T13:46:10+00:00"
|
||||
},
|
||||
{
|
||||
"name": "myclabs/php-enum",
|
||||
"version": "1.8.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/myclabs/php-enum.git",
|
||||
"reference": "a867478eae49c9f59ece437ae7f9506bfaa27483"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/myclabs/php-enum/zipball/a867478eae49c9f59ece437ae7f9506bfaa27483",
|
||||
"reference": "a867478eae49c9f59ece437ae7f9506bfaa27483",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"php": "^7.3 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^9.5",
|
||||
"squizlabs/php_codesniffer": "1.*",
|
||||
"vimeo/psalm": "^4.6.2"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"MyCLabs\\Enum\\": "src/"
|
||||
},
|
||||
"classmap": [
|
||||
"stubs/Stringable.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "PHP Enum contributors",
|
||||
"homepage": "https://github.com/myclabs/php-enum/graphs/contributors"
|
||||
}
|
||||
],
|
||||
"description": "PHP Enum implementation",
|
||||
"homepage": "http://github.com/myclabs/php-enum",
|
||||
"keywords": [
|
||||
"enum"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/myclabs/php-enum/issues",
|
||||
"source": "https://github.com/myclabs/php-enum/tree/1.8.4"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/mnapoli",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/myclabs/php-enum",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-08-04T09:53:51+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nesbot/carbon",
|
||||
"version": "2.66.0",
|
||||
|
|
@ -2223,16 +2532,16 @@
|
|||
},
|
||||
{
|
||||
"name": "nikic/php-parser",
|
||||
"version": "v4.15.4",
|
||||
"version": "v4.15.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nikic/PHP-Parser.git",
|
||||
"reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290"
|
||||
"reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/6bb5176bc4af8bcb7d926f88718db9b96a2d4290",
|
||||
"reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290",
|
||||
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/11e2663a5bc9db5d714eedb4277ee300403b4a9e",
|
||||
"reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -2273,9 +2582,9 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/nikic/PHP-Parser/issues",
|
||||
"source": "https://github.com/nikic/PHP-Parser/tree/v4.15.4"
|
||||
"source": "https://github.com/nikic/PHP-Parser/tree/v4.15.5"
|
||||
},
|
||||
"time": "2023-03-05T19:49:14+00:00"
|
||||
"time": "2023-05-19T20:20:00+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nunomaduro/termwind",
|
||||
|
|
@ -2430,6 +2739,111 @@
|
|||
},
|
||||
"time": "2022-06-14T06:56:20+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpoffice/phpspreadsheet",
|
||||
"version": "1.28.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHPOffice/PhpSpreadsheet.git",
|
||||
"reference": "6e81cf39bbd93ebc3a4e8150444c41e8aa9b769a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/6e81cf39bbd93ebc3a4e8150444c41e8aa9b769a",
|
||||
"reference": "6e81cf39bbd93ebc3a4e8150444c41e8aa9b769a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-ctype": "*",
|
||||
"ext-dom": "*",
|
||||
"ext-fileinfo": "*",
|
||||
"ext-gd": "*",
|
||||
"ext-iconv": "*",
|
||||
"ext-libxml": "*",
|
||||
"ext-mbstring": "*",
|
||||
"ext-simplexml": "*",
|
||||
"ext-xml": "*",
|
||||
"ext-xmlreader": "*",
|
||||
"ext-xmlwriter": "*",
|
||||
"ext-zip": "*",
|
||||
"ext-zlib": "*",
|
||||
"ezyang/htmlpurifier": "^4.15",
|
||||
"maennchen/zipstream-php": "^2.1",
|
||||
"markbaker/complex": "^3.0",
|
||||
"markbaker/matrix": "^3.0",
|
||||
"php": "^7.4 || ^8.0",
|
||||
"psr/http-client": "^1.0",
|
||||
"psr/http-factory": "^1.0",
|
||||
"psr/simple-cache": "^1.0 || ^2.0 || ^3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"dealerdirect/phpcodesniffer-composer-installer": "dev-main",
|
||||
"dompdf/dompdf": "^1.0 || ^2.0",
|
||||
"friendsofphp/php-cs-fixer": "^3.2",
|
||||
"mitoteam/jpgraph": "^10.2.4",
|
||||
"mpdf/mpdf": "^8.1.1",
|
||||
"phpcompatibility/php-compatibility": "^9.3",
|
||||
"phpstan/phpstan": "^1.1",
|
||||
"phpstan/phpstan-phpunit": "^1.0",
|
||||
"phpunit/phpunit": "^8.5 || ^9.0",
|
||||
"squizlabs/php_codesniffer": "^3.7",
|
||||
"tecnickcom/tcpdf": "^6.5"
|
||||
},
|
||||
"suggest": {
|
||||
"dompdf/dompdf": "Option for rendering PDF with PDF Writer",
|
||||
"ext-intl": "PHP Internationalization Functions",
|
||||
"mitoteam/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers",
|
||||
"mpdf/mpdf": "Option for rendering PDF with PDF Writer",
|
||||
"tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"PhpOffice\\PhpSpreadsheet\\": "src/PhpSpreadsheet"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Maarten Balliauw",
|
||||
"homepage": "https://blog.maartenballiauw.be"
|
||||
},
|
||||
{
|
||||
"name": "Mark Baker",
|
||||
"homepage": "https://markbakeruk.net"
|
||||
},
|
||||
{
|
||||
"name": "Franck Lefevre",
|
||||
"homepage": "https://rootslabs.net"
|
||||
},
|
||||
{
|
||||
"name": "Erik Tilt"
|
||||
},
|
||||
{
|
||||
"name": "Adrien Crivelli"
|
||||
}
|
||||
],
|
||||
"description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine",
|
||||
"homepage": "https://github.com/PHPOffice/PhpSpreadsheet",
|
||||
"keywords": [
|
||||
"OpenXML",
|
||||
"excel",
|
||||
"gnumeric",
|
||||
"ods",
|
||||
"php",
|
||||
"spreadsheet",
|
||||
"xls",
|
||||
"xlsx"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues",
|
||||
"source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.28.0"
|
||||
},
|
||||
"time": "2023-02-25T12:24:49+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpoption/phpoption",
|
||||
"version": "1.9.1",
|
||||
|
|
@ -2769,16 +3183,16 @@
|
|||
},
|
||||
{
|
||||
"name": "psr/http-message",
|
||||
"version": "2.0",
|
||||
"version": "1.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/http-message.git",
|
||||
"reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71"
|
||||
"reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71",
|
||||
"reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71",
|
||||
"url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba",
|
||||
"reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -2787,7 +3201,7 @@
|
|||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.0.x-dev"
|
||||
"dev-master": "1.1.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
|
|
@ -2802,7 +3216,7 @@
|
|||
"authors": [
|
||||
{
|
||||
"name": "PHP-FIG",
|
||||
"homepage": "https://www.php-fig.org/"
|
||||
"homepage": "http://www.php-fig.org/"
|
||||
}
|
||||
],
|
||||
"description": "Common interface for HTTP messages",
|
||||
|
|
@ -2816,9 +3230,9 @@
|
|||
"response"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/php-fig/http-message/tree/2.0"
|
||||
"source": "https://github.com/php-fig/http-message/tree/1.1"
|
||||
},
|
||||
"time": "2023-04-04T09:54:51+00:00"
|
||||
"time": "2023-04-04T09:50:52+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/log",
|
||||
|
|
@ -3224,16 +3638,16 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/console",
|
||||
"version": "v6.2.8",
|
||||
"version": "v6.2.10",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/console.git",
|
||||
"reference": "3582d68a64a86ec25240aaa521ec8bc2342b369b"
|
||||
"reference": "12288d9f4500f84a4d02254d4aa968b15488476f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/3582d68a64a86ec25240aaa521ec8bc2342b369b",
|
||||
"reference": "3582d68a64a86ec25240aaa521ec8bc2342b369b",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/12288d9f4500f84a4d02254d4aa968b15488476f",
|
||||
"reference": "12288d9f4500f84a4d02254d4aa968b15488476f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -3300,7 +3714,7 @@
|
|||
"terminal"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/console/tree/v6.2.8"
|
||||
"source": "https://github.com/symfony/console/tree/v6.2.10"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -3316,7 +3730,7 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2023-03-29T21:42:15+00:00"
|
||||
"time": "2023-04-28T13:37:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/css-selector",
|
||||
|
|
@ -3747,6 +4161,175 @@
|
|||
],
|
||||
"time": "2023-02-16T09:57:23+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/http-client",
|
||||
"version": "v6.2.9",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/http-client.git",
|
||||
"reference": "7daf5d24c21a683164688b95bb73b7a4bd3b32fc"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/http-client/zipball/7daf5d24c21a683164688b95bb73b7a4bd3b32fc",
|
||||
"reference": "7daf5d24c21a683164688b95bb73b7a4bd3b32fc",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=8.1",
|
||||
"psr/log": "^1|^2|^3",
|
||||
"symfony/deprecation-contracts": "^2.1|^3",
|
||||
"symfony/http-client-contracts": "^3",
|
||||
"symfony/service-contracts": "^1.0|^2|^3"
|
||||
},
|
||||
"provide": {
|
||||
"php-http/async-client-implementation": "*",
|
||||
"php-http/client-implementation": "*",
|
||||
"psr/http-client-implementation": "1.0",
|
||||
"symfony/http-client-implementation": "3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"amphp/amp": "^2.5",
|
||||
"amphp/http-client": "^4.2.1",
|
||||
"amphp/http-tunnel": "^1.0",
|
||||
"amphp/socket": "^1.1",
|
||||
"guzzlehttp/promises": "^1.4",
|
||||
"nyholm/psr7": "^1.0",
|
||||
"php-http/httplug": "^1.0|^2.0",
|
||||
"psr/http-client": "^1.0",
|
||||
"symfony/dependency-injection": "^5.4|^6.0",
|
||||
"symfony/http-kernel": "^5.4|^6.0",
|
||||
"symfony/process": "^5.4|^6.0",
|
||||
"symfony/stopwatch": "^5.4|^6.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\HttpClient\\": ""
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicolas Grekas",
|
||||
"email": "p@tchwork.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Provides powerful methods to fetch HTTP resources synchronously or asynchronously",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"http"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/http-client/tree/v6.2.9"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://symfony.com/sponsor",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/fabpot",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2023-04-11T16:03:19+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/http-client-contracts",
|
||||
"version": "v3.2.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/http-client-contracts.git",
|
||||
"reference": "df2ecd6cb70e73c1080e6478aea85f5f4da2c48b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/df2ecd6cb70e73c1080e6478aea85f5f4da2c48b",
|
||||
"reference": "df2ecd6cb70e73c1080e6478aea85f5f4da2c48b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=8.1"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/http-client-implementation": ""
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "3.3-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/contracts",
|
||||
"url": "https://github.com/symfony/contracts"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Contracts\\HttpClient\\": ""
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"/Test/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicolas Grekas",
|
||||
"email": "p@tchwork.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Generic abstractions related to HTTP clients",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"abstractions",
|
||||
"contracts",
|
||||
"decoupling",
|
||||
"interfaces",
|
||||
"interoperability",
|
||||
"standards"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/http-client-contracts/tree/v3.2.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://symfony.com/sponsor",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/fabpot",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2023-03-01T10:32:47+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/http-foundation",
|
||||
"version": "v6.2.8",
|
||||
|
|
@ -4015,6 +4598,71 @@
|
|||
],
|
||||
"time": "2023-03-14T15:00:05+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/mailgun-mailer",
|
||||
"version": "v6.2.7",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/mailgun-mailer.git",
|
||||
"reference": "9e27b8ec2f6ee7575c6229a61be1578a5a4b21ee"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/mailgun-mailer/zipball/9e27b8ec2f6ee7575c6229a61be1578a5a4b21ee",
|
||||
"reference": "9e27b8ec2f6ee7575c6229a61be1578a5a4b21ee",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=8.1",
|
||||
"symfony/mailer": "^5.4.21|^6.2.7"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/http-client": "^5.4|^6.0"
|
||||
},
|
||||
"type": "symfony-mailer-bridge",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\Mailer\\Bridge\\Mailgun\\": ""
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony Mailgun Mailer Bridge",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/mailgun-mailer/tree/v6.2.7"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://symfony.com/sponsor",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/fabpot",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2023-02-21T10:35:38+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/mime",
|
||||
"version": "v6.2.7",
|
||||
|
|
@ -5685,6 +6333,90 @@
|
|||
"source": "https://github.com/webmozarts/assert/tree/1.11.0"
|
||||
},
|
||||
"time": "2022-06-03T18:03:27+00:00"
|
||||
},
|
||||
{
|
||||
"name": "yajra/laravel-datatables-oracle",
|
||||
"version": "v10.6.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/yajra/laravel-datatables.git",
|
||||
"reference": "66299d930c1dd626e9d264cd8b0cfa0ddee13366"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/yajra/laravel-datatables/zipball/66299d930c1dd626e9d264cd8b0cfa0ddee13366",
|
||||
"reference": "66299d930c1dd626e9d264cd8b0cfa0ddee13366",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"illuminate/database": "^9|^10",
|
||||
"illuminate/filesystem": "^9|^10",
|
||||
"illuminate/http": "^9|^10",
|
||||
"illuminate/support": "^9|^10",
|
||||
"illuminate/view": "^9|^10",
|
||||
"php": "^8.0.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"nunomaduro/larastan": "^2.4",
|
||||
"orchestra/testbench": "^8",
|
||||
"yajra/laravel-datatables-html": "^9.3.4|^10"
|
||||
},
|
||||
"suggest": {
|
||||
"yajra/laravel-datatables-buttons": "Plugin for server-side exporting of dataTables.",
|
||||
"yajra/laravel-datatables-editor": "Plugin to use DataTables Editor (requires a license).",
|
||||
"yajra/laravel-datatables-export": "Plugin for server-side exporting using livewire and queue worker.",
|
||||
"yajra/laravel-datatables-fractal": "Plugin for server-side response using Fractal.",
|
||||
"yajra/laravel-datatables-html": "Plugin for server-side HTML builder of dataTables."
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "10.x-dev"
|
||||
},
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Yajra\\DataTables\\DataTablesServiceProvider"
|
||||
],
|
||||
"aliases": {
|
||||
"DataTables": "Yajra\\DataTables\\Facades\\DataTables"
|
||||
}
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"files": [
|
||||
"src/helper.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"Yajra\\DataTables\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Arjay Angeles",
|
||||
"email": "aqangeles@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "jQuery DataTables API for Laravel 4|5|6|7|8|9|10",
|
||||
"keywords": [
|
||||
"datatables",
|
||||
"jquery",
|
||||
"laravel"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/yajra/laravel-datatables/issues",
|
||||
"source": "https://github.com/yajra/laravel-datatables/tree/v10.6.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/sponsors/yajra",
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2023-06-29T10:05:01+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [
|
||||
|
|
@ -7069,16 +7801,16 @@
|
|||
},
|
||||
{
|
||||
"name": "sebastian/diff",
|
||||
"version": "5.0.1",
|
||||
"version": "5.0.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/diff.git",
|
||||
"reference": "aae9a0a43bff37bd5d8d0311426c87bf36153f02"
|
||||
"reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/aae9a0a43bff37bd5d8d0311426c87bf36153f02",
|
||||
"reference": "aae9a0a43bff37bd5d8d0311426c87bf36153f02",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/912dc2fbe3e3c1e7873313cc801b100b6c68c87b",
|
||||
"reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -7124,7 +7856,7 @@
|
|||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/diff/issues",
|
||||
"security": "https://github.com/sebastianbergmann/diff/security/policy",
|
||||
"source": "https://github.com/sebastianbergmann/diff/tree/5.0.1"
|
||||
"source": "https://github.com/sebastianbergmann/diff/tree/5.0.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -7132,7 +7864,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2023-03-23T05:12:41+00:00"
|
||||
"time": "2023-05-01T07:48:21+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/environment",
|
||||
|
|
|
|||
8
config/app.php
Normal file → Executable file
8
config/app.php
Normal file → Executable file
|
|
@ -83,7 +83,9 @@
|
|||
|
|
||||
*/
|
||||
|
||||
'locale' => 'en',
|
||||
// 'locale' => 'en',
|
||||
'locale' => 'pt',
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
@ -170,7 +172,9 @@
|
|||
App\Providers\RouteServiceProvider::class,
|
||||
|
||||
// Laravel\Fortify\FortifyServiceProvider::class,
|
||||
App\Providers\FortifyServiceProvider::class
|
||||
App\Providers\FortifyServiceProvider::class,
|
||||
|
||||
|
||||
])->toArray(),
|
||||
|
||||
/*
|
||||
|
|
|
|||
0
config/auth.php
Normal file → Executable file
0
config/auth.php
Normal file → Executable file
0
config/broadcasting.php
Normal file → Executable file
0
config/broadcasting.php
Normal file → Executable file
0
config/cache.php
Normal file → Executable file
0
config/cache.php
Normal file → Executable file
0
config/cors.php
Normal file → Executable file
0
config/cors.php
Normal file → Executable file
0
config/database.php
Normal file → Executable file
0
config/database.php
Normal file → Executable file
0
config/filesystems.php
Normal file → Executable file
0
config/filesystems.php
Normal file → Executable file
8
config/fortify.php
Normal file → Executable file
8
config/fortify.php
Normal file → Executable file
|
|
@ -63,6 +63,7 @@
|
|||
|
||||
'home' => RouteServiceProvider::HOME,
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Fortify Routes Prefix / Subdomain
|
||||
|
|
@ -134,8 +135,8 @@
|
|||
'features' => [
|
||||
Features::registration(),
|
||||
Features::resetPasswords(),
|
||||
|
||||
// Features::emailVerification(),
|
||||
|
||||
// Features::updateProfileInformation(),
|
||||
// Features::updatePasswords(),
|
||||
// Features::twoFactorAuthentication([
|
||||
|
|
@ -144,9 +145,4 @@
|
|||
// // 'window' => 0,
|
||||
// ]),
|
||||
],
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
];
|
||||
|
|
|
|||
0
config/hashing.php
Normal file → Executable file
0
config/hashing.php
Normal file → Executable file
0
config/logging.php
Normal file → Executable file
0
config/logging.php
Normal file → Executable file
2
config/mail.php
Normal file → Executable file
2
config/mail.php
Normal file → Executable file
|
|
@ -51,6 +51,8 @@
|
|||
|
||||
'mailgun' => [
|
||||
'transport' => 'mailgun',
|
||||
'domain' => env('MAILGUN_DOMAIN'),
|
||||
'secret' => env('MAILGUN_SECRET'),
|
||||
// 'client' => [
|
||||
// 'timeout' => 5,
|
||||
// ],
|
||||
|
|
|
|||
0
config/queue.php
Normal file → Executable file
0
config/queue.php
Normal file → Executable file
0
config/sanctum.php
Normal file → Executable file
0
config/sanctum.php
Normal file → Executable file
0
config/services.php
Normal file → Executable file
0
config/services.php
Normal file → Executable file
0
config/session.php
Normal file → Executable file
0
config/session.php
Normal file → Executable file
0
config/view.php
Normal file → Executable file
0
config/view.php
Normal file → Executable file
0
database/.gitignore
vendored
Normal file → Executable file
0
database/.gitignore
vendored
Normal file → Executable file
0
database/factories/UserFactory.php
Normal file → Executable file
0
database/factories/UserFactory.php
Normal file → Executable file
0
database/migrations/2014_10_12_000000_create_users_table.php
Normal file → Executable file
0
database/migrations/2014_10_12_000000_create_users_table.php
Normal file → Executable file
0
database/migrations/2014_10_12_100000_create_password_reset_tokens_table.php
Normal file → Executable file
0
database/migrations/2014_10_12_100000_create_password_reset_tokens_table.php
Normal file → Executable file
12
database/migrations/2014_10_12_200000_add_two_factor_columns_to_users_table.php
Normal file → Executable file
12
database/migrations/2014_10_12_200000_add_two_factor_columns_to_users_table.php
Normal file → Executable file
|
|
@ -14,17 +14,17 @@ public function up(): void
|
|||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->text('two_factor_secret')
|
||||
->after('password')
|
||||
->nullable();
|
||||
->after('password')
|
||||
->nullable();
|
||||
|
||||
$table->text('two_factor_recovery_codes')
|
||||
->after('two_factor_secret')
|
||||
->nullable();
|
||||
->after('two_factor_secret')
|
||||
->nullable();
|
||||
|
||||
if (Fortify::confirmsTwoFactorAuthentication()) {
|
||||
$table->timestamp('two_factor_confirmed_at')
|
||||
->after('two_factor_recovery_codes')
|
||||
->nullable();
|
||||
->after('two_factor_recovery_codes')
|
||||
->nullable();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
0
database/migrations/2019_08_19_000000_create_failed_jobs_table.php
Normal file → Executable file
0
database/migrations/2019_08_19_000000_create_failed_jobs_table.php
Normal file → Executable file
0
database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php
Normal file → Executable file
0
database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php
Normal file → Executable file
38
database/migrations/2023_04_24_113644_add_custom_columns_to_users_table.php
Executable file
38
database/migrations/2023_04_24_113644_add_custom_columns_to_users_table.php
Executable file
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->enum('user_type', ['Cliente', 'Administrador', 'Super_Administrador','Gestor_Obra','Tecnicos','inspetor'])
|
||||
->default('Cliente')
|
||||
->after('password');
|
||||
|
||||
$table->integer('user_phone')
|
||||
->after('user_type')
|
||||
->nullable();
|
||||
|
||||
$table->string('user_nif', 15)->after('user_phone');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->dropColumn('user_type');
|
||||
$table->dropColumn('user_phone');
|
||||
$table->dropColumn('user_nif');
|
||||
});
|
||||
}
|
||||
};
|
||||
0
database/seeders/DatabaseSeeder.php
Normal file → Executable file
0
database/seeders/DatabaseSeeder.php
Normal file → Executable file
0
package.json
Normal file → Executable file
0
package.json
Normal file → Executable file
0
phpunit.xml
Normal file → Executable file
0
phpunit.xml
Normal file → Executable file
0
public/.htaccess
Normal file → Executable file
0
public/.htaccess
Normal file → Executable file
53187
public/StyleAdmin/css/adminlte.css
Executable file
53187
public/StyleAdmin/css/adminlte.css
Executable file
File diff suppressed because it is too large
Load Diff
1
public/StyleAdmin/css/adminlte.css.map
Executable file
1
public/StyleAdmin/css/adminlte.css.map
Executable file
File diff suppressed because one or more lines are too long
12
public/StyleAdmin/css/adminlte.min.css
vendored
Executable file
12
public/StyleAdmin/css/adminlte.min.css
vendored
Executable file
File diff suppressed because one or more lines are too long
1
public/StyleAdmin/css/adminlte.min.css.map
Executable file
1
public/StyleAdmin/css/adminlte.min.css.map
Executable file
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user