updating best practices in project models and controllers, and linking tables.
- Creation of controller : CreateProject, for creation of the company works. - Controller : ProjectDatacontroller to manage data of the equipments and installations in general.
This commit is contained in:
parent
0238996df9
commit
3db065ae53
|
|
@ -1,88 +1,323 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use PhpOffice\PhpSpreadsheet\IOFactory;
|
||||||
|
|
||||||
use App\Models\company_project;
|
|
||||||
|
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
|
use App\Models\CompanyProject;
|
||||||
|
use App\Models\Unit;
|
||||||
|
use App\Models\EquipmentType;
|
||||||
|
use App\Models\Equipment;
|
||||||
|
use App\Models\Plant;
|
||||||
|
use App\Models\SpecificAttributesEquipmentType;
|
||||||
|
use App\Models\GeneralAttributesEquipment;
|
||||||
|
use App\Models\PendingEquipment;
|
||||||
|
|
||||||
use App\Models\installation;
|
|
||||||
|
|
||||||
class CreateProjectController extends Controller
|
class CreateProjectController extends Controller
|
||||||
{
|
{
|
||||||
public function listCompanies(){
|
|
||||||
$companies = User::where('user_type',3)->get();
|
// Nao vinculado ao project ainda
|
||||||
return view ('projectsClients/createProject', ['companies' => $companies]);
|
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
// $results = DB::table('equipaments')
|
||||||
|
// ->join('specific_attributes_equipament_types', 'equipaments.equipment_ID', '=', 'specific_attributes_equipament_types.tb_equipament_id')
|
||||||
|
// ->join('general_attributes_equipaments', 'specific_attributes_equipament_types.specific_Attributes_Equipment_Type_ID', '=', 'general_attributes_equipaments.general_Attributes_Equipment_ID')
|
||||||
|
// ->select('equipaments.tag', 'general_attributes_equipaments.description', 'specific_attributes_equipament_types.value')
|
||||||
|
// ->get();
|
||||||
|
|
||||||
|
$results = DB::table('equipments')
|
||||||
|
->join('specific_attributes_equipament_types', 'equipments.equipment_id', '=', 'specific_attributes_equipament_types.equipment_id')
|
||||||
|
->join('general_attributes_equipaments', 'specific_attributes_equipament_types.specific_attributes_equipment_type_id', '=', 'general_attributes_equipaments.general_attributes_equipment_id')
|
||||||
|
->select('equipments.equipment_tag', 'general_attributes_equipaments.general_attributes_equipment_description', 'specific_attributes_equipament_types.specific_attributes_value')
|
||||||
|
->get();
|
||||||
|
|
||||||
|
|
||||||
|
dd($results);
|
||||||
|
|
||||||
|
$groupedEquipments = [];
|
||||||
|
|
||||||
|
foreach ($results as $result) {
|
||||||
|
if (!isset($groupedEquipments[$result->tag])) {
|
||||||
|
$groupedEquipments[$result->tag] = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
$groupedEquipments[$result->tag][] = [
|
||||||
|
'description' => $result->description,
|
||||||
|
'value' => $result->value
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
$equipments = DB::table('equipments')->get();
|
||||||
|
|
||||||
|
foreach ($equipments as $equipment) {
|
||||||
|
if (isset($groupedEquipments[$equipment->tag])) {
|
||||||
|
$equipment->specific_attributes = $groupedEquipments[$equipment->tag];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$allPossibleAttributes = GeneralAttributesEquipment::all()->pluck('description')->toArray();
|
||||||
|
|
||||||
|
return view('test2', ['equipments' => $equipments, 'allAttributes' => $allPossibleAttributes]);
|
||||||
|
// Retorne a view com os dados
|
||||||
|
// return view('test', ['equipments' => $equipments]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function createProject(Request $request){
|
public function listCompanies()
|
||||||
// dd($request);
|
{
|
||||||
|
$companies = User::where('type_users', 3)->get();
|
||||||
// Validação...
|
return view('projectsClients/createProject', ['companies' => $companies]);
|
||||||
$installationId = $request->input('installation_id');
|
// return view('projectsClients/createProject', ['companies' => $companies]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function createProject(Request $request)
|
||||||
|
{
|
||||||
|
|
||||||
|
// Validação...
|
||||||
|
$installationId = $request->input('installation_id');
|
||||||
|
|
||||||
if ($installationId == 'new_install') {
|
if ($installationId == 'new_install') {
|
||||||
// Criar uma nova instalação...
|
// Criar uma nova instalação...
|
||||||
$newInstallation = new Installation;
|
$newInstallation = new Unit;
|
||||||
$newInstallation->installation_name = $request->input('new_company_name');
|
$newInstallation->installation_name = $request->input('new_company_name');
|
||||||
$newInstallation->address = $request->input('new_company_address');
|
$newInstallation->address = $request->input('new_company_address');
|
||||||
$newInstallation->user_id = $request->input('user_id');
|
$newInstallation->user_id = $request->input('user_id');
|
||||||
|
|
||||||
$newInstallation->save();
|
$newInstallation->save();
|
||||||
|
|
||||||
// Use o id da nova instalação.
|
// Use o id da nova instalação.
|
||||||
$installationId = $newInstallation->id;
|
$installationId = $newInstallation->id;
|
||||||
// dd($installationId);
|
// dd($installationId);
|
||||||
}
|
}
|
||||||
|
|
||||||
$project = new company_project;
|
$project = new CompanyProject;
|
||||||
|
|
||||||
$project->description_project = $request->input('description_project');
|
$project->description_project = $request->input('description_project');
|
||||||
$project->n_project_ispt = $request->input('n_project_ispt');
|
$project->n_project_ispt = $request->input('n_project_ispt');
|
||||||
$project->responsible_project_ispt = $request->input('responsible_project_ispt');
|
$project->responsible_project_ispt = $request->input('responsible_project_ispt');
|
||||||
$project->responsible_project_company = $request->input('responsible_project_company');
|
$project->responsible_project_company = $request->input('responsible_project_company');
|
||||||
$project->date_started = $request->input('date_started');
|
$project->date_started = $request->input('date_started');
|
||||||
|
|
||||||
$project->installation_ID = $installationId;
|
$project->installation_id = $installationId;
|
||||||
|
|
||||||
$project->save();
|
$project->save();
|
||||||
|
|
||||||
return redirect()->route('testExcel')->with('success', 'Dados guardados com sucesso');
|
return redirect()->route('createProject')->with('success', 'Dados guardados com sucesso');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function storeProject(Request $request)
|
public function storeProject(Request $request)
|
||||||
{
|
{
|
||||||
if ($request->input('company_id') == 'new') {
|
if ($request->input('company_id') == 'new') {
|
||||||
$company = new company_project; // Substitua "Company" pelo nome do seu modelo de empresas
|
$company = new CompanyProject; // Substitua "Company" pelo nome do seu modelo de empresas
|
||||||
$company->name = $request->input('new_company_name');
|
$company->name = $request->input('new_company_name');
|
||||||
$company->save();
|
$company->save();
|
||||||
|
|
||||||
$company_id = $company->id;
|
$company_id = $company->id;
|
||||||
} else {
|
} else {
|
||||||
$company_id = $request->input('company_id');
|
$company_id = $request->input('company_id');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Agora, você pode usar $company_id ao criar o projeto
|
||||||
}
|
}
|
||||||
|
|
||||||
// Agora, você pode usar $company_id ao criar o projeto
|
public function getByUserNif(Request $request)
|
||||||
}
|
{
|
||||||
|
|
||||||
public function getByUserNif (Request $request){
|
|
||||||
|
|
||||||
// dd(Installation::where('user_id', $request->input('user_id'))->get());
|
// dd(Installation::where('user_id', $request->input('user_id'))->get());
|
||||||
|
|
||||||
$user_id = $request->input('user_id'); //Check
|
$user_id = $request->input('user_id'); //Check
|
||||||
$installations = Installation::where('user_id', $user_id)->get();
|
$installations = Unit::where('user_id', $user_id)->get();
|
||||||
|
|
||||||
return response()->json($installations);
|
return response()->json($installations);
|
||||||
}
|
}
|
||||||
public function createEquipamentProject (Request $request){
|
|
||||||
|
|
||||||
dd($request->input('data'));
|
|
||||||
// $data = $request->input('data');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// public function createEquipamentProject(Request $request)
|
||||||
|
// {
|
||||||
|
// $file = $request->file('documento');
|
||||||
|
|
||||||
|
// // Certifique-se de que um arquivo foi enviado
|
||||||
|
// if ($file) {
|
||||||
|
// // Carregue o arquivo Excel
|
||||||
|
// $spreadsheet = IOFactory::load($file->path());
|
||||||
|
|
||||||
|
// // Obtenha a primeira planilha
|
||||||
|
// $worksheet = $spreadsheet->getSheet(0);
|
||||||
|
|
||||||
|
// // Transforme os dados da planilha em um array
|
||||||
|
// $data = $worksheet->toArray();
|
||||||
|
|
||||||
|
// $nomesColunas = $data[0];
|
||||||
|
|
||||||
|
// $dadosLinha6 = $data[6];
|
||||||
|
|
||||||
|
// $juntarArrays = array_combine($nomesColunas, $dadosLinha6);
|
||||||
|
|
||||||
|
// $datas = array_filter($juntarArrays, function ($chave) {
|
||||||
|
// return !empty($chave);
|
||||||
|
// }, ARRAY_FILTER_USE_KEY);
|
||||||
|
|
||||||
|
// $equipamentType = equipament_type::where('equipment_type_name', $datas['tipo_equipamento'])->first();
|
||||||
|
// $checkFactory = factorie::where('factories_name', $datas['fabrica'])->first();
|
||||||
|
|
||||||
|
|
||||||
|
// $newEquipament = new equipament;
|
||||||
|
// //Primeiro tem de derificar se a fabrica existe, senao cria uma.
|
||||||
|
// $newEquipament->factory_id = $checkFactory->factories_id;
|
||||||
|
// $newEquipament->equipament_type_id = $equipamentType->equipament_type_id;
|
||||||
|
// $newEquipament->equipment_Description = $datas['equipment_Description'];
|
||||||
|
// $newEquipament->tag = $datas['tag'];
|
||||||
|
// $newEquipament->serial_number = $datas['n_serie'];
|
||||||
|
// $newEquipament->model = $datas['modelo'];
|
||||||
|
|
||||||
|
// $newEquipament->save();
|
||||||
|
|
||||||
|
|
||||||
|
// $receveEquipment_ID = $newEquipament->id;
|
||||||
|
// $receveEquipament_type_ID = $newEquipament->equipament_type_id;
|
||||||
|
|
||||||
|
|
||||||
|
// // Atributos que você quer buscar e inserir
|
||||||
|
// $attributes = ["dimension", "dn_ent", "p&id", "n_sap", "isolation", "scaffolding", "grua", "interlocks"];
|
||||||
|
|
||||||
|
// // $attributes = array_slice($data[0], 7);
|
||||||
|
|
||||||
|
// foreach ($attributes as $attribute) {
|
||||||
|
|
||||||
|
// // Buscar o atributo na tabela general_attributes_equipament
|
||||||
|
// $generalAttribute = general_attributes_equipament::where('description', $attribute)->first();
|
||||||
|
|
||||||
|
|
||||||
|
// // Se o atributo foi encontrado
|
||||||
|
// if (!is_null($generalAttribute)) {
|
||||||
|
// // Criar um novo registro em specific_attributes_equipament_Types
|
||||||
|
// $specificAttribute = new specific_attributes_equipament_type;
|
||||||
|
|
||||||
|
// $specificAttribute->tb_equipament_id = $receveEquipment_ID;
|
||||||
|
// $specificAttribute->equipament_Type_id = $receveEquipament_type_ID;
|
||||||
|
// $specificAttribute->specific_attributes_equipment_type_id = $generalAttribute->general_attributes_equipment_id;
|
||||||
|
// $specificAttribute->value = $datas[$attribute];
|
||||||
|
|
||||||
|
// $specificAttribute->save();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// $listValves = equipament::all();
|
||||||
|
|
||||||
|
// return redirect()->route('testExcel')->with('success', 'Dados guardados com sucesso')->with('listValves', $listValves);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
public function createEquipamentProject(Request $request)
|
||||||
|
{
|
||||||
|
$file = $request->file('documento');
|
||||||
|
|
||||||
|
// Certifique-se de que um arquivo foi enviado
|
||||||
|
if ($file) {
|
||||||
|
// Carregue o arquivo Excel
|
||||||
|
$spreadsheet = IOFactory::load($file->path());
|
||||||
|
|
||||||
|
// Obtenha a primeira planilha
|
||||||
|
$worksheet = $spreadsheet->getSheet(0);
|
||||||
|
|
||||||
|
// Transforme os dados da planilha em um array
|
||||||
|
$data = $worksheet->toArray();
|
||||||
|
|
||||||
|
$nomesColunas = $data[0];
|
||||||
|
|
||||||
|
// Atributos que você quer buscar e inserir
|
||||||
|
$attributes = ["dimension", "dn_ent", "p&id", "n_sap", "isolation", "scaffolding", "grua", "interlocks"];
|
||||||
|
|
||||||
|
// Comece a partir da sexta linha
|
||||||
|
for ($i = 6; $i < count($data); $i++) {
|
||||||
|
$dadosLinha = $data[$i];
|
||||||
|
|
||||||
|
//Se nao preencher o campo $dadosLinha[0], nao cria um novo equipamento
|
||||||
|
//Trocar pelos 5 primeiros
|
||||||
|
if (empty($dadosLinha[0])) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$juntarArrays = array_combine($nomesColunas, $dadosLinha);
|
||||||
|
|
||||||
|
$datas = array_filter($juntarArrays, function ($chave) {
|
||||||
|
return !empty($chave);
|
||||||
|
}, ARRAY_FILTER_USE_KEY);
|
||||||
|
|
||||||
|
$equipmentType = EquipmentType::where('equipment_type_name', $datas['tipo_equipamento'])->first();
|
||||||
|
|
||||||
|
$checkFactory = Unit::where('unit_name', $datas['fabrica'])->first();
|
||||||
|
|
||||||
|
|
||||||
|
// Antes de criar o novo equipamento, verifique se já existe um equipamento
|
||||||
|
// com o mesmo factory_id e tag.
|
||||||
|
$existingEquipment = Equipment::where('unit_id', $checkFactory->unit_id)
|
||||||
|
->where('equipment_tag', $datas['tag'])
|
||||||
|
->first();
|
||||||
|
|
||||||
|
if ($existingEquipment) {
|
||||||
|
// Se o equipamento existir, crie o novo equipamento na tabela pending_equipaments.
|
||||||
|
$pendingEquipament = new PendingEquipment;
|
||||||
|
// Defina os atributos do pendingEquipament conforme necessário.
|
||||||
|
$pendingEquipament->pending_equipment_unit_id = $checkFactory->unit_id;
|
||||||
|
$pendingEquipament->pending_equipment_type_id = $equipmentType->equipment_type_id;
|
||||||
|
$pendingEquipament->pending_equipment_tag = $datas['tag'];
|
||||||
|
$pendingEquipament->pending_equipment_description = $datas['equipment_Description'];
|
||||||
|
$pendingEquipament->pending_equipment_serial_number = $datas['n_serie'];
|
||||||
|
$pendingEquipament->pending_equipment_brand = $datas['modelo'];
|
||||||
|
|
||||||
|
$pendingEquipament->save();
|
||||||
|
|
||||||
|
// Continue com o próximo loop.
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$newEquipament = new Equipment;
|
||||||
|
|
||||||
|
$newEquipament->unit_id = $checkFactory->unit_id;
|
||||||
|
$newEquipament->equipment_type_id = $equipmentType->equipment_type_id;
|
||||||
|
$newEquipament->equipment_Description = $datas['equipment_Description'];
|
||||||
|
$newEquipament->equipment_tag = $datas['tag'];
|
||||||
|
$newEquipament->equipment_serial_number = $datas['n_serie'];
|
||||||
|
$newEquipament->equipment_model = $datas['modelo'];
|
||||||
|
|
||||||
|
$newEquipament->save();
|
||||||
|
|
||||||
|
$receveEquipment_ID = $newEquipament->equipment_id;
|
||||||
|
|
||||||
|
$receveEquipament_type_ID = $newEquipament->equipment_type_id;
|
||||||
|
|
||||||
|
|
||||||
|
foreach ($attributes as $attribute) {
|
||||||
|
|
||||||
|
$generalAttribute = GeneralAttributesEquipment::where('general_attributes_equipment_description', $attribute)->first();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (!is_null($generalAttribute)) {
|
||||||
|
|
||||||
|
$specificAttribute = new SpecificAttributesEquipmentType;
|
||||||
|
|
||||||
|
$specificAttribute->equipment_id = $receveEquipment_ID;
|
||||||
|
$specificAttribute->equipment_type_id = $receveEquipament_type_ID;
|
||||||
|
$specificAttribute->specific_attributes_equipment_type_id = $generalAttribute->general_attributes_equipment_id;
|
||||||
|
$specificAttribute->specific_attributes_value = $datas[$attribute];
|
||||||
|
|
||||||
|
$specificAttribute->save();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$listValves = Equipment::all();
|
||||||
|
return redirect()->route('createProject')->with('success', 'Dados guardados com sucesso')->with('listValves', $listValves);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
use Illuminate\Auth\Events\Verified;
|
use Illuminate\Auth\Events\Verified;
|
||||||
|
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use App\Models\pending_user;
|
use App\Models\PendingUser;
|
||||||
|
|
||||||
use App\Mail\NewUserNotification;
|
use App\Mail\NewUserNotification;
|
||||||
use Illuminate\Support\Facades\Mail;
|
use Illuminate\Support\Facades\Mail;
|
||||||
|
|
@ -33,7 +33,7 @@ public function store(Request $request): RedirectResponse
|
||||||
|
|
||||||
// // Auth::login($user);
|
// // Auth::login($user);
|
||||||
|
|
||||||
$pendingUser = pending_user::where('pending_email', $user->email)->first();
|
$pendingUser = PendingUser::where('pending_email', $user->email)->first();
|
||||||
if ($pendingUser) {
|
if ($pendingUser) {
|
||||||
$pendingUser->delete();
|
$pendingUser->delete();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Http\Controllers;
|
|
||||||
|
|
||||||
use APP\Models\equipament_Type;
|
|
||||||
use App\Models\factorie;
|
|
||||||
use App\Models\specific_Attributes_Equipament_Type;
|
|
||||||
use App\Models\installation;
|
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
|
|
||||||
class EquipamentsCOntroller extends Controller
|
|
||||||
{
|
|
||||||
public function CreateEquipaments (){
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
use App\Mail\NewUserNotification;
|
use App\Mail\NewUserNotification;
|
||||||
use Illuminate\Support\Facades\Mail;
|
use Illuminate\Support\Facades\Mail;
|
||||||
|
|
||||||
use App\Models\pending_user;
|
use App\Models\PendingUser;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use App\Models\TypeUser;
|
use App\Models\TypeUser;
|
||||||
|
|
||||||
|
|
@ -17,12 +17,12 @@ class Pending_UserController extends Controller
|
||||||
{
|
{
|
||||||
public function ListPendingUsers()
|
public function ListPendingUsers()
|
||||||
{
|
{
|
||||||
$pend_users = pending_user::all();
|
$pend_users = PendingUser::all();
|
||||||
return view('email/pendingUsers', compact('pend_users'));
|
return view('email/pendingUsers', compact('pend_users'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function ShowFormUser($id){
|
public function ShowFormUser($id){
|
||||||
$pend_users = pending_user::findOrFail($id);
|
$pend_users = PendingUser::findOrFail($id);
|
||||||
$types = TypeUser::all();
|
$types = TypeUser::all();
|
||||||
return view ('Admin.CrudUsers.createUser', compact('pend_users','types'));
|
return view ('Admin.CrudUsers.createUser', compact('pend_users','types'));
|
||||||
}
|
}
|
||||||
|
|
@ -41,7 +41,7 @@ public function store(Request $request){
|
||||||
|
|
||||||
$joinName = $request->get('name') . ' ' . $request->get('lastName');
|
$joinName = $request->get('name') . ' ' . $request->get('lastName');
|
||||||
|
|
||||||
$pendingUser = new pending_user([
|
$pendingUser = new PendingUser([
|
||||||
'pending_name' => $joinName,
|
'pending_name' => $joinName,
|
||||||
'pending_email' => $request->get('pending_email'),
|
'pending_email' => $request->get('pending_email'),
|
||||||
'pending_phone' => $request->get('pending_phone'),
|
'pending_phone' => $request->get('pending_phone'),
|
||||||
|
|
|
||||||
38
app/Http/Controllers/ProjectoDatacontroller.php
Normal file
38
app/Http/Controllers/ProjectoDatacontroller.php
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Models\Equipment;
|
||||||
|
use App\Models\Plant;
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class ProjectoDatacontroller extends Controller
|
||||||
|
{
|
||||||
|
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();
|
||||||
|
|
||||||
|
// $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'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function showUnit($id)
|
||||||
|
{
|
||||||
|
|
||||||
|
$equipaments = Equipment::where('equipment_id', $id)->firstOrFail();
|
||||||
|
return view('Admin/DataManagement/showEquipament', compact('equipaments'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Models\TypeUser;
|
||||||
use Illuminate\Support\Facades\Hash;
|
use Illuminate\Support\Facades\Hash;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
|
||||||
|
|
@ -73,9 +74,18 @@ public static function authenticateAndRedirect(Request $request)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function ListCompanies()
|
||||||
|
{
|
||||||
|
$users = User::with('userType')->where('user_type', '=', 3)->get();
|
||||||
|
|
||||||
|
return view('Admin.CrudUsers.listCompany', compact('users'));
|
||||||
|
}
|
||||||
|
|
||||||
|
//Busca Todos os utilizadores Exeto as 'Empresas'
|
||||||
public function ListUsers()
|
public function ListUsers()
|
||||||
{
|
{
|
||||||
$users = User::all();
|
$users = User::with('userType')->where('user_type', '<>', 3)->get();
|
||||||
|
|
||||||
return view('Admin.CrudUsers.listUsers', compact('users'));
|
return view('Admin.CrudUsers.listUsers', compact('users'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ class CheckSuperAdmin
|
||||||
*/
|
*/
|
||||||
public function handle(Request $request, Closure $next): Response
|
public function handle(Request $request, Closure $next): Response
|
||||||
{
|
{
|
||||||
if (auth()->user() && auth()->user()->userType->type == 'Super_Administrador') {
|
if (auth()->user() && auth()->user()->userType->type_user == 'Super_Administrador') {
|
||||||
return $next($request);
|
return $next($request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ class VerifyCsrfToken extends Middleware
|
||||||
*
|
*
|
||||||
* @var array<int, string>
|
* @var array<int, string>
|
||||||
*/
|
*/
|
||||||
protected $except = [
|
// protected $except = [
|
||||||
'/create-equipament-project',
|
// '/create-equipament-project',
|
||||||
];
|
// ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,15 @@
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
class ambits_equipment extends Model
|
class AmbitsEquipment extends Model
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
|
protected $table = 'ambits_equipments';
|
||||||
|
protected $primaryKey = 'ambits_equipment_id';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public $timestamps = false;
|
public $timestamps = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -5,9 +5,12 @@
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
class installation extends Model
|
class CompanyProject extends Model
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
protected $table = 'company_projects';
|
||||||
|
|
||||||
|
protected $primaryKey = 'company_projects_id';
|
||||||
|
|
||||||
public $timestamps = false;
|
public $timestamps = false;
|
||||||
}
|
}
|
||||||
41
app/Models/Equipment.php
Normal file
41
app/Models/Equipment.php
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
<?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');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
23
app/Models/EquipmentType.php
Normal file
23
app/Models/EquipmentType.php
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?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 specificAttributesEquipamentTypes(){
|
||||||
|
return $this->hasMany(SpecificAttributesEquipmentType::class, 'equipment_type_id', 'equipment_type_id');
|
||||||
|
}
|
||||||
|
}
|
||||||
20
app/Models/GeneralAttributesEquipment.php
Normal file
20
app/Models/GeneralAttributesEquipment.php
Normal 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, 'specific_attributes_equipment_type_id', 'general_attributes_equipment_id');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -5,9 +5,13 @@
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
class company_project extends Model
|
class PendingEquipment extends Model
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
public $timestamps = false;
|
public $timestamps = false;
|
||||||
|
|
||||||
|
protected $table = 'pending_equipments';
|
||||||
|
|
||||||
|
protected $primaryKey = 'pending_equipment_id';
|
||||||
}
|
}
|
||||||
|
|
@ -5,10 +5,14 @@
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
class pending_user extends Model
|
class PendingUser extends Model
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
|
protected $table = 'pending_users';
|
||||||
|
|
||||||
|
protected $primaryKey = 'pending_user_id';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The attributes that are mass assignable.
|
* The attributes that are mass assignable.
|
||||||
*
|
*
|
||||||
29
app/Models/Plant.php
Normal file
29
app/Models/Plant.php
Normal 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');
|
||||||
|
}
|
||||||
|
}
|
||||||
31
app/Models/SpecificAttributesEquipmentType.php
Normal file
31
app/Models/SpecificAttributesEquipmentType.php
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
<?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 generalAttribute()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(GeneralAttributesEquipment::class, 'specific_attributes_equipment_type_id', 'general_attributes_equipment_id');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -9,8 +9,12 @@ class TypeUser extends Model
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
|
protected $table = 'type_users';
|
||||||
|
|
||||||
|
protected $primaryKey = 'type_user_id';
|
||||||
|
|
||||||
public function users()
|
public function users()
|
||||||
{
|
{
|
||||||
return $this->hasMany(User::class, 'user_type', 'id');
|
return $this->hasMany(User::class, 'type_users', 'type_user_id');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
19
app/Models/Unit.php
Normal file
19
app/Models/Unit.php
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class Unit extends Model
|
||||||
|
{
|
||||||
|
use HasFactory;
|
||||||
|
|
||||||
|
protected $table = 'units';
|
||||||
|
|
||||||
|
protected $primaryKey = 'unit_id';
|
||||||
|
public function equipments(){
|
||||||
|
|
||||||
|
return $this->hasMany(Equipment::class, 'unit_id', 'unit_id');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -17,6 +17,10 @@ class User extends Authenticatable
|
||||||
{
|
{
|
||||||
use HasApiTokens, HasFactory, Notifiable;
|
use HasApiTokens, HasFactory, Notifiable;
|
||||||
|
|
||||||
|
protected $table = 'users';
|
||||||
|
|
||||||
|
protected $primaryKey = 'user_id';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The attributes that are mass assignable.
|
* The attributes that are mass assignable.
|
||||||
*
|
*
|
||||||
|
|
@ -51,8 +55,16 @@ class User extends Authenticatable
|
||||||
'email_verified_at' => 'datetime',
|
'email_verified_at' => 'datetime',
|
||||||
];
|
];
|
||||||
|
|
||||||
public function userType()
|
// public function typeUser(){
|
||||||
{
|
// return $this->belongsTo(TypeUser::class, 'type_users', 'type_user_id');
|
||||||
return $this->belongsTo(TypeUser::class, 'user_type', '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');
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
<?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 equipament extends Model
|
|
||||||
{
|
|
||||||
use HasFactory;
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Models;
|
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
|
||||||
|
|
||||||
class equipament_Type extends Model
|
|
||||||
{
|
|
||||||
use HasFactory;
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Models;
|
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
|
||||||
|
|
||||||
class factorie extends Model
|
|
||||||
{
|
|
||||||
use HasFactory;
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Models;
|
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
|
||||||
|
|
||||||
class specific_Attributes_Equipament_Type extends Model
|
|
||||||
{
|
|
||||||
use HasFactory;
|
|
||||||
}
|
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
"laravel/framework": "^10.8",
|
"laravel/framework": "^10.8",
|
||||||
"laravel/sanctum": "^3.2",
|
"laravel/sanctum": "^3.2",
|
||||||
"laravel/tinker": "^2.8",
|
"laravel/tinker": "^2.8",
|
||||||
|
"phpoffice/phpspreadsheet": "^1.28",
|
||||||
"symfony/http-client": "^6.2",
|
"symfony/http-client": "^6.2",
|
||||||
"symfony/mailgun-mailer": "^6.2"
|
"symfony/mailgun-mailer": "^6.2"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
468
composer.lock
generated
468
composer.lock
generated
|
|
@ -4,7 +4,7 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "c5af53907d38feda2d66777d4dc85856",
|
"content-hash": "0792c882ef95d119142ebe7244699653",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "bacon/bacon-qr-code",
|
"name": "bacon/bacon-qr-code",
|
||||||
|
|
@ -536,6 +536,67 @@
|
||||||
],
|
],
|
||||||
"time": "2023-01-14T14:17:03+00:00"
|
"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",
|
"name": "fruitcake/php-cors",
|
||||||
"version": "v1.2.0",
|
"version": "v1.2.0",
|
||||||
|
|
@ -1869,6 +1930,191 @@
|
||||||
],
|
],
|
||||||
"time": "2022-04-17T13:12:02+00:00"
|
"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",
|
"name": "monolog/monolog",
|
||||||
"version": "3.3.1",
|
"version": "3.3.1",
|
||||||
|
|
@ -1970,6 +2216,69 @@
|
||||||
],
|
],
|
||||||
"time": "2023-02-06T13:46:10+00:00"
|
"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",
|
"name": "nesbot/carbon",
|
||||||
"version": "2.66.0",
|
"version": "2.66.0",
|
||||||
|
|
@ -2223,16 +2532,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "nikic/php-parser",
|
"name": "nikic/php-parser",
|
||||||
"version": "v4.15.4",
|
"version": "v4.15.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/nikic/PHP-Parser.git",
|
"url": "https://github.com/nikic/PHP-Parser.git",
|
||||||
"reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290"
|
"reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/6bb5176bc4af8bcb7d926f88718db9b96a2d4290",
|
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/11e2663a5bc9db5d714eedb4277ee300403b4a9e",
|
||||||
"reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290",
|
"reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
|
@ -2273,9 +2582,9 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/nikic/PHP-Parser/issues",
|
"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",
|
"name": "nunomaduro/termwind",
|
||||||
|
|
@ -2430,6 +2739,111 @@
|
||||||
},
|
},
|
||||||
"time": "2022-06-14T06:56:20+00:00"
|
"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",
|
"name": "phpoption/phpoption",
|
||||||
"version": "1.9.1",
|
"version": "1.9.1",
|
||||||
|
|
@ -2769,16 +3183,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "psr/http-message",
|
"name": "psr/http-message",
|
||||||
"version": "2.0",
|
"version": "1.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/php-fig/http-message.git",
|
"url": "https://github.com/php-fig/http-message.git",
|
||||||
"reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71"
|
"reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71",
|
"url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba",
|
||||||
"reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71",
|
"reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
|
@ -2787,7 +3201,7 @@
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "2.0.x-dev"
|
"dev-master": "1.1.x-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
|
@ -2802,7 +3216,7 @@
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "PHP-FIG",
|
"name": "PHP-FIG",
|
||||||
"homepage": "https://www.php-fig.org/"
|
"homepage": "http://www.php-fig.org/"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Common interface for HTTP messages",
|
"description": "Common interface for HTTP messages",
|
||||||
|
|
@ -2816,9 +3230,9 @@
|
||||||
"response"
|
"response"
|
||||||
],
|
],
|
||||||
"support": {
|
"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",
|
"name": "psr/log",
|
||||||
|
|
@ -3224,16 +3638,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/console",
|
"name": "symfony/console",
|
||||||
"version": "v6.2.8",
|
"version": "v6.2.10",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/console.git",
|
"url": "https://github.com/symfony/console.git",
|
||||||
"reference": "3582d68a64a86ec25240aaa521ec8bc2342b369b"
|
"reference": "12288d9f4500f84a4d02254d4aa968b15488476f"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/console/zipball/3582d68a64a86ec25240aaa521ec8bc2342b369b",
|
"url": "https://api.github.com/repos/symfony/console/zipball/12288d9f4500f84a4d02254d4aa968b15488476f",
|
||||||
"reference": "3582d68a64a86ec25240aaa521ec8bc2342b369b",
|
"reference": "12288d9f4500f84a4d02254d4aa968b15488476f",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
|
@ -3300,7 +3714,7 @@
|
||||||
"terminal"
|
"terminal"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/console/tree/v6.2.8"
|
"source": "https://github.com/symfony/console/tree/v6.2.10"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
|
@ -3316,7 +3730,7 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2023-03-29T21:42:15+00:00"
|
"time": "2023-04-28T13:37:43+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/css-selector",
|
"name": "symfony/css-selector",
|
||||||
|
|
@ -7303,16 +7717,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/diff",
|
"name": "sebastian/diff",
|
||||||
"version": "5.0.1",
|
"version": "5.0.3",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/diff.git",
|
"url": "https://github.com/sebastianbergmann/diff.git",
|
||||||
"reference": "aae9a0a43bff37bd5d8d0311426c87bf36153f02"
|
"reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/aae9a0a43bff37bd5d8d0311426c87bf36153f02",
|
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/912dc2fbe3e3c1e7873313cc801b100b6c68c87b",
|
||||||
"reference": "aae9a0a43bff37bd5d8d0311426c87bf36153f02",
|
"reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
|
@ -7358,7 +7772,7 @@
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/sebastianbergmann/diff/issues",
|
"issues": "https://github.com/sebastianbergmann/diff/issues",
|
||||||
"security": "https://github.com/sebastianbergmann/diff/security/policy",
|
"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": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
|
@ -7366,7 +7780,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2023-03-23T05:12:41+00:00"
|
"time": "2023-05-01T07:48:21+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/environment",
|
"name": "sebastian/environment",
|
||||||
|
|
|
||||||
87
resources/views/Admin/CrudUsers/listCompany.blade.php
Normal file
87
resources/views/Admin/CrudUsers/listCompany.blade.php
Normal file
|
|
@ -0,0 +1,87 @@
|
||||||
|
@extends('Templates/templateAdmin')
|
||||||
|
|
||||||
|
@section('Main-content')
|
||||||
|
<section class="content">
|
||||||
|
|
||||||
|
<div class="container-fluid">
|
||||||
|
@if (session('success'))
|
||||||
|
<div class="alert alert-success">
|
||||||
|
{{ session('success') }}
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
<br>
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h3 class="card-title">Tabela Empresas</h3>
|
||||||
|
|
||||||
|
<div class="card-tools">
|
||||||
|
<div class="input-group input-group-sm" style="width: 150px;">
|
||||||
|
<input type="text" name="table_search" class="form-control float-right" placeholder="Search">
|
||||||
|
|
||||||
|
<div class="input-group-append">
|
||||||
|
<button type="submit" class="btn btn-default">
|
||||||
|
<i class="fas fa-search"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- /.card-header -->
|
||||||
|
<div class="card-body table-responsive p-0">
|
||||||
|
<table class="table table-hover text-nowrap">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>ID</th>
|
||||||
|
<th>Nome</th>
|
||||||
|
<th>Email</th>
|
||||||
|
<th>Tipo de Usuário</th>
|
||||||
|
<th>Ações</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@foreach ($users as $user)
|
||||||
|
<tr>
|
||||||
|
<td>{{ $user->id }}</td>
|
||||||
|
<td>{{ $user->name }}</td>
|
||||||
|
<td>{{ $user->email }}</td>
|
||||||
|
{{-- <td>{{ $user->user_type }}</td> --}}
|
||||||
|
<td>{{ optional(\App\Models\TypeUser::find($user->user_type))->type }}</td>
|
||||||
|
|
||||||
|
<td class="text-center d-flex justify-content-around">
|
||||||
|
<a href="{{ route('users.Show', ['id' => $user->id]) }}">
|
||||||
|
<i class="fa-solid fa-eye text-secondary"></i>
|
||||||
|
</a>
|
||||||
|
<a href="{{ route('users.edit', ['id' => $user->id]) }}">
|
||||||
|
<i class="fa-solid fa-edit text-primary"></i>
|
||||||
|
</a>
|
||||||
|
{{-- <a href="#">
|
||||||
|
<i class="fa-solid fa-trash-alt text-danger"></i>
|
||||||
|
</a> --}}
|
||||||
|
<form action="{{ route('users.destroy', $user) }}" method="POST"
|
||||||
|
onsubmit="return confirm('Are you sure you want to delete this user?');"
|
||||||
|
style="display:inline;">
|
||||||
|
@csrf
|
||||||
|
@method('DELETE')
|
||||||
|
<button type="submit" class="btn btn-danger btn-sm">
|
||||||
|
<i class="fa-solid fa-trash-alt text-white"></i>
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<!-- /.card-body -->
|
||||||
|
</div>
|
||||||
|
<!-- /.card -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
{{-- /.container-fluid" --}}
|
||||||
|
|
||||||
|
|
||||||
|
</section>
|
||||||
|
@endsection
|
||||||
|
|
@ -1,89 +1,88 @@
|
||||||
@extends('Templates/templateAdmin')
|
@extends('Templates/templateAdmin')
|
||||||
|
|
||||||
@section('Main-content')
|
@section('Main-content')
|
||||||
|
<section class="content">
|
||||||
|
|
||||||
<section class="content">
|
<div class="container-fluid">
|
||||||
|
@if (session('success'))
|
||||||
|
<div class="alert alert-success">
|
||||||
|
{{ session('success') }}
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
<br>
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h3 class="card-title">Tabela Utilizadores</h3>
|
||||||
|
|
||||||
<div class="container-fluid">
|
<div class="card-tools">
|
||||||
<h1>Algum Titulo </h1>
|
<div class="input-group input-group-sm" style="width: 150px;">
|
||||||
@if (session('success'))
|
<input type="text" name="table_search" class="form-control float-right" placeholder="Search">
|
||||||
<div class="alert alert-success">
|
|
||||||
{{ session('success') }}
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
<div class="card">
|
|
||||||
<div class="card-header">
|
|
||||||
<h3 class="card-title">Tabela Utilizadores</h3>
|
|
||||||
|
|
||||||
<div class="card-tools">
|
<div class="input-group-append">
|
||||||
<div class="input-group input-group-sm" style="width: 150px;">
|
<button type="submit" class="btn btn-default">
|
||||||
<input type="text" name="table_search" class="form-control float-right"
|
<i class="fas fa-search"></i>
|
||||||
placeholder="Search">
|
</button>
|
||||||
|
|
||||||
<div class="input-group-append">
|
|
||||||
<button type="submit" class="btn btn-default">
|
|
||||||
<i class="fas fa-search"></i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- /.card-header -->
|
</div>
|
||||||
<div class="card-body table-responsive p-0">
|
<!-- /.card-header -->
|
||||||
<table class="table table-hover text-nowrap">
|
<div class="card-body table-responsive p-0">
|
||||||
<thead>
|
<table class="table table-hover text-nowrap">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>ID</th>
|
||||||
|
<th>Nome</th>
|
||||||
|
<th>Email</th>
|
||||||
|
<th>Tipo de Usuário</th>
|
||||||
|
<th>Ações</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@foreach ($users as $user)
|
||||||
<tr>
|
<tr>
|
||||||
<th>ID</th>
|
<td>{{ $user->id }}</td>
|
||||||
<th>Nome</th>
|
<td>{{ $user->name }}</td>
|
||||||
<th>Email</th>
|
<td>{{ $user->email }}</td>
|
||||||
<th>Tipo de Usuário</th>
|
{{-- <td>{{ $user->user_type }}</td> --}}
|
||||||
<th>Ações</th>
|
<td>{{ optional(\App\Models\TypeUser::find($user->user_type))->type }}</td>
|
||||||
</tr>
|
|
||||||
</thead>
|
<td class="text-center d-flex justify-content-around">
|
||||||
<tbody>
|
|
||||||
@foreach ($users as $user)
|
<a href="{{ route('users.Show', ['id' => $user->id]) }}">
|
||||||
<tr>
|
<i class="fa-solid fa-eye text-secondary"></i>
|
||||||
<td>{{ $user->id }}</td>
|
</a>
|
||||||
<td>{{ $user->name }}</td>
|
<a href="{{ route('users.edit', ['id' => $user->id]) }}">
|
||||||
<td>{{ $user->email }}</td>
|
<i class="fa-solid fa-edit text-primary"></i>
|
||||||
<td>{{ $user->user_type }}</td>
|
</a>
|
||||||
<td class="text-center d-flex justify-content-around">
|
{{-- <a href="#">
|
||||||
<a href="{{ route('users.Show', ['id' => $user->id]) }}">
|
|
||||||
<i class="fa-solid fa-eye text-secondary"></i>
|
|
||||||
</a>
|
|
||||||
<a href="{{ route('users.edit', ['id' => $user->id]) }}">
|
|
||||||
<i class="fa-solid fa-edit text-primary"></i>
|
|
||||||
</a>
|
|
||||||
{{-- <a href="#">
|
|
||||||
<i class="fa-solid fa-trash-alt text-danger"></i>
|
<i class="fa-solid fa-trash-alt text-danger"></i>
|
||||||
</a> --}}
|
</a> --}}
|
||||||
<form action="{{ route('users.destroy', $user) }}" method="POST"
|
<form action="{{ route('users.destroy', $user) }}" method="POST"
|
||||||
onsubmit="return confirm('Are you sure you want to delete this user?');"
|
onsubmit="return confirm('Are you sure you want to delete this user?');"
|
||||||
style="display:inline;">
|
style="display:inline;">
|
||||||
@csrf
|
@csrf
|
||||||
@method('DELETE')
|
@method('DELETE')
|
||||||
<button type="submit" class="btn btn-danger btn-sm">
|
<button type="submit" class="btn btn-danger btn-sm">
|
||||||
<i class="fa-solid fa-trash-alt text-white"></i>
|
<i class="fa-solid fa-trash-alt text-white"></i>
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
|
||||||
<!-- /.card-body -->
|
|
||||||
</div>
|
</div>
|
||||||
<!-- /.card -->
|
<!-- /.card-body -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{{-- /.container-fluid" --}}
|
<!-- /.card -->
|
||||||
|
|
||||||
|
|
||||||
</section>
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
{{-- /.container-fluid" --}}
|
||||||
|
|
||||||
|
|
||||||
|
</section>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
|
||||||
724
resources/views/Admin/DataManagement/manageassets.blade.php
Normal file
724
resources/views/Admin/DataManagement/manageassets.blade.php
Normal file
|
|
@ -0,0 +1,724 @@
|
||||||
|
@extends('Templates/templateAdmin')
|
||||||
|
|
||||||
|
@section('Main-content')
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<!-- Content Header (Page header) -->
|
||||||
|
<section class="content-header">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row mb-2">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<h1>Gestão de ativos</h1>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<ol class="breadcrumb float-sm-right">
|
||||||
|
<li class="breadcrumb-item active">Portefólio</li>
|
||||||
|
<li class="breadcrumb-item active">Gerir ativos</li>
|
||||||
|
</ol>
|
||||||
|
</div><!-- /.col -->
|
||||||
|
</div>
|
||||||
|
</div><!-- /.container-fluid -->
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- /.content-header -->
|
||||||
|
|
||||||
|
<!-- Main content -->
|
||||||
|
<section class="content">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<!-- Card box criar instalção -->
|
||||||
|
<form>
|
||||||
|
<div class="card card-primary collapsed-card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h3 class="card-title">Instalações</h3>
|
||||||
|
|
||||||
|
<div class="card-tools">
|
||||||
|
<button type="button" class="btn btn-tool" data-card-widget="collapse"><i
|
||||||
|
class="fas fa-plus"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<!-- /.card-tools -->
|
||||||
|
</div>
|
||||||
|
<!-- /.card-header -->
|
||||||
|
<div class="card-body">
|
||||||
|
<!-- Card box inserir nova instalação-->
|
||||||
|
<div class="card card-primary collapsed-card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h3 class="card-title">Inserir nova instalação</h3>
|
||||||
|
|
||||||
|
<div class="card-tools">
|
||||||
|
<button type="button" class="btn btn-tool" data-card-widget="collapse"><i
|
||||||
|
class="fas fa-plus"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<!-- /.card-tools -->
|
||||||
|
</div>
|
||||||
|
<!-- /.card-header -->
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Instalação</label>
|
||||||
|
<input type="text" class="form-control" placeholder="Instalação…">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Fábrica</label>
|
||||||
|
<input type="text" class="form-control" placeholder="Fábrica…">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Localização</label>
|
||||||
|
<input type="text" class="form-control" placeholder="Localização…">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- /.card-body -->
|
||||||
|
<div class="card-footer">
|
||||||
|
<div class="float-right">
|
||||||
|
<button type="submit" class="btn btn-primary">Criar</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Table Clientes-->
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table id="example2" class="table table-bordered table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Instalação</th>
|
||||||
|
<th>Fábrica</th>
|
||||||
|
<th>Cliente</th>
|
||||||
|
<th>Editar</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@foreach ($units as $unit)
|
||||||
|
<tr>
|
||||||
|
<td>{{ $unit->unit_name }}</td>
|
||||||
|
<td>{{ $unit->plant_name }}</td>
|
||||||
|
<td>{{ $unit->user_name }}</td>
|
||||||
|
|
||||||
|
<td class="text-center d-flex justify-content-around">
|
||||||
|
<a href="#" data-toggle="modal"
|
||||||
|
data-target="#modal-edit-instalacao">
|
||||||
|
<i class="fa-solid fa-edit text-primary"></i>
|
||||||
|
</a>
|
||||||
|
<a href="#" data-toggle="modal" data-target="#modal-remover"><i
|
||||||
|
class="fa-solid fa-trash-alt text-danger"></i>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<!-- /.tabela-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- /.card -->
|
||||||
|
</form>
|
||||||
|
<!-- /.Card box criar instalção -->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Card box criar equipamentos -->
|
||||||
|
<form>
|
||||||
|
<div class="card card-primary collapsed-card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h3 class="card-title">Equipamentos</h3>
|
||||||
|
|
||||||
|
<div class="card-tools">
|
||||||
|
<button type="button" class="btn btn-tool" data-card-widget="collapse"><i
|
||||||
|
class="fas fa-plus"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<!-- /.card-tools -->
|
||||||
|
</div>
|
||||||
|
<!-- /.card-header -->
|
||||||
|
<div class="card-body">
|
||||||
|
<!-- Card box inserir novo equipamento-->
|
||||||
|
<div class="card card-primary collapsed-card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h3 class="card-title">Inserir novo equipamento</h3>
|
||||||
|
|
||||||
|
<div class="card-tools">
|
||||||
|
<button type="button" class="btn btn-tool" data-card-widget="collapse"><i
|
||||||
|
class="fas fa-plus"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<!-- select -->
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Selecionar instalação</label>
|
||||||
|
<select class="form-control">
|
||||||
|
<option hidden>Selecionar instalação…</option>
|
||||||
|
<option>Instalação A</option>
|
||||||
|
<option>Instalação B</option>
|
||||||
|
<option>Instalação C</option>
|
||||||
|
<option>Instalação D</option>
|
||||||
|
<option>Instalação E</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Selecionar tipo de equipamento</label>
|
||||||
|
<select id="equipament-list" class="form-control">
|
||||||
|
<option>Selecionar tipo de equipamento…</option>
|
||||||
|
<option value="psv">PSV</option>
|
||||||
|
<option value="isolation">Válvula de isolamento</option>
|
||||||
|
<option value="control">Válvula de controlo</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- general form elements disabled -->
|
||||||
|
<div id="psv-card" class="card card-secondary">
|
||||||
|
<div class="card-header">
|
||||||
|
<h3 class="card-title">PSV</h3>
|
||||||
|
</div>
|
||||||
|
<!-- /.card-header -->
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Equipamento associado</label>
|
||||||
|
<input type="text" class="form-control"
|
||||||
|
placeholder="Equipamento associado…">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Serviço associado</label>
|
||||||
|
<input type="text" class="form-control"
|
||||||
|
placeholder="Serviço associado…">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>TAG</label>
|
||||||
|
<input type="text" class="form-control"
|
||||||
|
placeholder="TAG…">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Fabricante</label>
|
||||||
|
<input type="text" class="form-control"
|
||||||
|
placeholder="Fabricante…">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Número de série</label>
|
||||||
|
<input type="text" class="form-control"
|
||||||
|
placeholder="Número de série…">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Modelo</label>
|
||||||
|
<input type="text" class="form-control"
|
||||||
|
placeholder="Modelo…">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>DN</label>
|
||||||
|
<input type="text" class="form-control"
|
||||||
|
placeholder="DN…">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>PN</label>
|
||||||
|
<input type="text" class="form-control"
|
||||||
|
placeholder="PN…">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- /.card-body -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- general form elements disabled -->
|
||||||
|
<div id="isolation-card" class="card card-secondary">
|
||||||
|
<div class="card-header">
|
||||||
|
<h3 class="card-title">Válvula de isolamento</h3>
|
||||||
|
</div>
|
||||||
|
<!-- /.card-header -->
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Equipamento associado</label>
|
||||||
|
<input type="text" class="form-control"
|
||||||
|
placeholder="Equipamento associado…">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Serviço associado</label>
|
||||||
|
<input type="text" class="form-control"
|
||||||
|
placeholder="Serviço associado…">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>TAG</label>
|
||||||
|
<input type="text" class="form-control"
|
||||||
|
placeholder="TAG…">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Fabricante</label>
|
||||||
|
<input type="text" class="form-control"
|
||||||
|
placeholder="Fabricante…">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Número de série</label>
|
||||||
|
<input type="text" class="form-control"
|
||||||
|
placeholder="Número de série…">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Modelo</label>
|
||||||
|
<input type="text" class="form-control"
|
||||||
|
placeholder="Modelo…">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>DN</label>
|
||||||
|
<input type="text" class="form-control"
|
||||||
|
placeholder="DN…">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>PN</label>
|
||||||
|
<input type="text" class="form-control"
|
||||||
|
placeholder="PN…">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- /.card-body -->
|
||||||
|
</div>
|
||||||
|
<!-- general form elements disabled -->
|
||||||
|
<div id="control-card" class="card card-secondary">
|
||||||
|
<div class="card-header">
|
||||||
|
<h3 class="card-title">Válvula de controlo</h3>
|
||||||
|
</div>
|
||||||
|
<!-- /.card-header -->
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Equipamento associado</label>
|
||||||
|
<input type="text" class="form-control"
|
||||||
|
placeholder="Equipamento associado…">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Serviço associado</label>
|
||||||
|
<input type="text" class="form-control"
|
||||||
|
placeholder="Serviço associado…">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>TAG da válvula</label>
|
||||||
|
<input type="text" class="form-control"
|
||||||
|
placeholder="TAG da válvula…">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Fabricante da válvula</label>
|
||||||
|
<input type="text" class="form-control"
|
||||||
|
placeholder="Fabricante da válvula…">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Modelo da válvula</label>
|
||||||
|
<input type="text" class="form-control"
|
||||||
|
placeholder="Modelo da válvula…">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>N.º de série da válvula</label>
|
||||||
|
<input type="text" class="form-control"
|
||||||
|
placeholder="N.º de série da válvula…">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>DN</label>
|
||||||
|
<input type="text" class="form-control"
|
||||||
|
placeholder="DN…">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>PN</label>
|
||||||
|
<input type="text" class="form-control"
|
||||||
|
placeholder="PN…">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-4">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Fabricante do atuador</label>
|
||||||
|
<input type="text" class="form-control"
|
||||||
|
placeholder="Fabricante do atuador…">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-4">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Modelo do atuador</label>
|
||||||
|
<input type="text" class="form-control"
|
||||||
|
placeholder="Modelo do atuador…">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-4">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>N.º de série do atuador</label>
|
||||||
|
<input type="text" class="form-control"
|
||||||
|
placeholder="N.º de série do atuador…">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Fabricante do posicionador</label>
|
||||||
|
<input type="text" class="form-control"
|
||||||
|
placeholder="Fabricante do posicionador…">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>N.º de série do posicionador</label>
|
||||||
|
<input type="text" class="form-control"
|
||||||
|
placeholder="N.º de série do posicionador…">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="exampleInputFile">Importar Equipamentos</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="custom-file">
|
||||||
|
<input type="file" class="custom-file-input" id="exampleInputFile">
|
||||||
|
<label class="custom-file-label" for="exampleInputFile">Escolher
|
||||||
|
ficheiro</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- /.card-body -->
|
||||||
|
</div>
|
||||||
|
<!-- /.card-body -->
|
||||||
|
<div class="card-footer">
|
||||||
|
<div class="float-right">
|
||||||
|
<button type="submit" class="btn btn-primary">Criar</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Table Equipamentos-->
|
||||||
|
<div class="card-body table-responsive p-0">
|
||||||
|
<table class="table table-hover text-nowrap">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>ID equipamento</th>
|
||||||
|
<th>tag</th>
|
||||||
|
<th>Fabrica</th>
|
||||||
|
<th>Tipo equipamento</th>
|
||||||
|
<th>Descricao equipamento</th>
|
||||||
|
<th>Numero de Serie </th>
|
||||||
|
<th>Marca</th>
|
||||||
|
<th>Modelo</th>
|
||||||
|
<th>Activo</th>
|
||||||
|
<th>Edicao</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
{{-- <tbody>
|
||||||
|
@foreach ($equipaments as $equipament)
|
||||||
|
<tr>
|
||||||
|
<td>{{ $equipament->equipment_id }}</td>
|
||||||
|
<td>{{ $equipament->tag }}</td>
|
||||||
|
<td>{{ $equipament->factories_name }}</td>
|
||||||
|
<td>{{ $equipament->equipment_type_name }}</td>
|
||||||
|
<td>{{ $equipament->equipment_description }}</td>
|
||||||
|
<td>{{ $equipament->serial_number }}</td>
|
||||||
|
<td>{{ $equipament->brand }}</td>
|
||||||
|
<td>{{ $equipament->model }}</td>
|
||||||
|
<td>{{ $equipament->Is_active }}</td>
|
||||||
|
|
||||||
|
<td class="text-center d-flex justify-content-around">
|
||||||
|
<a href="{{ route('showUnit', ['id' => $equipament->equipment_id]) }}">
|
||||||
|
<i class="fa-solid fa-eye text-secondary"></i>
|
||||||
|
</a>
|
||||||
|
<a href="#" data-toggle="modal" data-target="#modal-edit-psv">
|
||||||
|
<i class=" fa-solid fa-edit text-primary"></i>
|
||||||
|
</a>
|
||||||
|
<a href="#" data-toggle="modal" data-target="#modal-remover"><i
|
||||||
|
class="fa-solid fa-trash-alt text-danger"></i>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</tbody> --}}
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<!-- /.tabela-->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<!-- /.card -->
|
||||||
|
<!-- /.Card box criar equipamentos -->
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- modal instalacao -->
|
||||||
|
<div class="modal fade" id="modal-edit-instalacao">
|
||||||
|
<div class="modal-dialog modal-xl">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header bg-primary">
|
||||||
|
<h4 class="modal-title">Editar instalações</h4>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">x</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<!-- Articulado de obra -->
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Instalação</label>
|
||||||
|
<input type="text" class="form-control" placeholder="Instalação…">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Fábrica</label>
|
||||||
|
<input type="text" class="form-control" placeholder="Fábrica…">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Localização</label>
|
||||||
|
<input type="text" class="form-control" placeholder="Localização…">
|
||||||
|
</div>
|
||||||
|
<!--/Articulado de obra-->
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer justify-content-between">
|
||||||
|
<button type="button" class="btn btn-default" data-dismiss="modal">Fechar</button>
|
||||||
|
<button type="submit" class="btn btn-primary">Guardar</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- /.modal-content -->
|
||||||
|
</div>
|
||||||
|
<!-- /.modal-dialog -->
|
||||||
|
</div>
|
||||||
|
<!-- /.modal instalacao-->
|
||||||
|
|
||||||
|
<!-- modal psv-->
|
||||||
|
<div class="modal fade" id="modal-edit-psv">
|
||||||
|
<div class="modal-dialog modal-xl">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header bg-primary">
|
||||||
|
<h4 class="modal-title">Editar PSV</h4>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">x</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<!-- Articulado de obra -->
|
||||||
|
<div class="form-group">
|
||||||
|
<label>TAG</label>
|
||||||
|
<input type="text" class="form-control" placeholder="TAG…">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Nº série</label>
|
||||||
|
<input type="text" class="form-control" placeholder="Nº série…">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Fabricante</label>
|
||||||
|
<input type="text" class="form-control" placeholder="Fabricante…">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Modelo</label>
|
||||||
|
<input type="text" class="form-control" placeholder="Modelo…">
|
||||||
|
</div>
|
||||||
|
<!-- /.card-body -->
|
||||||
|
<!--/Articulado de obra-->
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer justify-content-between">
|
||||||
|
<button type="button" class="btn btn-default" data-dismiss="modal">Fechar</button>
|
||||||
|
<button type="submit" class="btn btn-primary">Guardar</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- /.modal-content -->
|
||||||
|
</div>
|
||||||
|
<!-- /.modal-dialog -->
|
||||||
|
</div>
|
||||||
|
<!-- /.modal psv -->
|
||||||
|
|
||||||
|
<!-- modal isv -->
|
||||||
|
<div class="modal fade" id="modal-edit-isv">
|
||||||
|
<div class="modal-dialog modal-xl">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header bg-primary">
|
||||||
|
<h4 class="modal-title">Editar Válvula de Isolamento</h4>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">x</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<!-- Articulado de obra -->
|
||||||
|
<div class="form-group">
|
||||||
|
<label>TAG</label>
|
||||||
|
<input type="text" class="form-control" placeholder="TAG…">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Nº série</label>
|
||||||
|
<input type="text" class="form-control" placeholder="Nº série…">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Fabricante</label>
|
||||||
|
<input type="text" class="form-control" placeholder="Fabricante…">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Modelo</label>
|
||||||
|
<input type="text" class="form-control" placeholder="Modelo…">
|
||||||
|
</div>
|
||||||
|
<!-- /.card-body -->
|
||||||
|
<div class="card-footer">
|
||||||
|
<div class="float-right">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--/Articulado de obra-->
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer justify-content-between">
|
||||||
|
<button type="button" class="btn btn-default" data-dismiss="modal">Fechar</button>
|
||||||
|
<button type="submit" class="btn btn-primary">Guardar</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- /.modal-content -->
|
||||||
|
</div>
|
||||||
|
<!-- /.modal-dialog -->
|
||||||
|
</div>
|
||||||
|
<!-- /.modal isv-->
|
||||||
|
|
||||||
|
<!-- modal cv-->
|
||||||
|
<div class="modal fade" id="modal-edit-cv">
|
||||||
|
<div class="modal-dialog modal-xl">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header bg-primary">
|
||||||
|
<h4 class="modal-title">Editar Válvula de controlo</h4>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">x</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<!-- Articulado de obra -->
|
||||||
|
<div class="form-group">
|
||||||
|
<label>TAG válvula</label>
|
||||||
|
<input type="text" class="form-control" placeholder="TAG válvula…">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Nº série válvula</label>
|
||||||
|
<input type="text" class="form-control" placeholder="Nº série válvula…">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Fabricante válvula</label>
|
||||||
|
<input type="text" class="form-control" placeholder="Fabricante válvula…">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Modelo válvula</label>
|
||||||
|
<input type="text" class="form-control" placeholder="Modelo válvula…">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Fabricante atuador</label>
|
||||||
|
<input type="text" class="form-control" placeholder="Fabricante atuador…">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Modelo atuador</label>
|
||||||
|
<input type="text" class="form-control" placeholder="Modelo atuador…">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Nº série atuador</label>
|
||||||
|
<input type="text" class="form-control" placeholder="Nº série atuador…">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Fabricante posicionador</label>
|
||||||
|
<input type="text" class="form-control" placeholder="Fabricante posicionador…">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Nº série posicionador</label>
|
||||||
|
<input type="text" class="form-control" placeholder="Nº série posicionador…">
|
||||||
|
</div>
|
||||||
|
<!-- /.card-body -->
|
||||||
|
<!--/.Articulado de obra-->
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer justify-content-between">
|
||||||
|
<button type="button" class="btn btn-default" data-dismiss="modal">Fechar</button>
|
||||||
|
<button type="submit" class="btn btn-primary">Guardar</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- /.modal-content -->
|
||||||
|
</div>
|
||||||
|
<!-- /.modal-dialog -->
|
||||||
|
</div>
|
||||||
|
<!-- /.modal cv-->
|
||||||
|
|
||||||
|
<!-- modal Remover -->
|
||||||
|
<div class="modal fade" id="modal-remover">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header bg-primary">
|
||||||
|
<h4 class="modal-title">Remover</h4>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">x</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<p>Deseja realmente remover?</p>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer justify-content-between">
|
||||||
|
<button type="button" class="btn btn-default" data-dismiss="modal">Fechar</button>
|
||||||
|
<button type="submit" class="btn btn-danger">Remover</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- /.modal-content -->
|
||||||
|
</div>
|
||||||
|
<!-- /.modal-dialog -->
|
||||||
|
</div>
|
||||||
|
<!-- /.modal remover-->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
@extends('Templates/templateAdmin')
|
||||||
|
|
||||||
|
@section('Main-content')
|
||||||
|
|
||||||
|
<section class="content">
|
||||||
|
|
||||||
|
<div class="container-fluid">
|
||||||
|
<h1>Detalhes Equipamento</h1>
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
Detalhes do Equipamento :: {{ $equipaments->tag }}</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-bordered table-striped">
|
||||||
|
<tr>
|
||||||
|
<th>ID Equipamento</th>
|
||||||
|
<td>{{ $equipaments->equipment_id }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Tag</th>
|
||||||
|
<td>{{ $equipaments->tag }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Instalacao</th>
|
||||||
|
<td>{{ $equipaments->factory_id }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Tipo de equipamento </th>
|
||||||
|
<td>{{ $equipaments->equipament_type_id }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Descricao de equipamento </th>
|
||||||
|
<td>{{ $equipaments->equipment_description }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Numero de Serie</th>
|
||||||
|
<td>{{ $equipaments->serial_number }}</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm">
|
||||||
|
</div>
|
||||||
|
{{-- <div class="col-sm">
|
||||||
|
<a href="{{ route('users.edit', ['id' => $user->id]) }}" class="btn btn-primary">Editar usuário</a>
|
||||||
|
|
||||||
|
</div> --}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{-- /.container-fluid --}}
|
||||||
|
|
||||||
|
</section>
|
||||||
|
{{-- /.content --}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@endsection
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
<link rel="stylesheet" href="{{ asset('plugins/summernote/summernote-bs4.min.css') }}">
|
<link rel="stylesheet" href="{{ asset('plugins/summernote/summernote-bs4.min.css') }}">
|
||||||
<!-- jQuery UI -->
|
<!-- jQuery UI -->
|
||||||
<link rel="stylesheet" href="{{ asset('plugins/jquery-ui/jquery-ui.css') }}">
|
<link rel="stylesheet" href="{{ asset('plugins/jquery-ui/jquery-ui.css') }}">
|
||||||
|
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -92,11 +92,11 @@ class="fas fa-bars"></i></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="info">
|
<div class="info">
|
||||||
@if (Auth::check())
|
@if (Auth::check())
|
||||||
{{-- <a href="{{ route('usersProfiles',['id' => Auth::user()->id] )}}" class="d-block">{{ Auth::user()->user_type }}
|
|
||||||
</a> --}}
|
<a href="{{ route('usersProfiles', ['id' => Auth::user()->user_id]) }}" class="d-block">{{ Auth::user()->userType?->type_user }}</a>
|
||||||
<a href="{{ route('usersProfiles',['id' => Auth::user()->id] )}}" class="d-block">{{ Auth::user()->userType->type }}</a>
|
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -127,13 +127,13 @@ class="fas fa-bars"></i></a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="{{ route('createProject')}}" class="nav-link">
|
<a href="{{ route('createProject') }}" class="nav-link">
|
||||||
<i class="nav-icon fas fa-helmet-safety"></i>
|
<i class="nav-icon fas fa-helmet-safety"></i>
|
||||||
<p> Criar obra </p>
|
<p> Criar obra </p>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -150,7 +150,7 @@ class="fas fa-bars"></i></a>
|
||||||
<!-- /.Multiple menu item -->
|
<!-- /.Multiple menu item -->
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="{{ route('testExcel')}}" class="nav-link">
|
<a href="{{ route('testExcel') }}" class="nav-link">
|
||||||
<i class="nav-icon fas fa-file"></i>
|
<i class="nav-icon fas fa-file"></i>
|
||||||
<p>
|
<p>
|
||||||
Relatórios
|
Relatórios
|
||||||
|
|
@ -167,7 +167,7 @@ class="fas fa-bars"></i></a>
|
||||||
</a>
|
</a>
|
||||||
<ul class="nav nav-treeview">
|
<ul class="nav nav-treeview">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="utilizadores.html" class="nav-link">
|
<a href="{{ route('manageAssets') }}" class="nav-link">
|
||||||
<i class="fa-solid fa-file-edit"></i>
|
<i class="fa-solid fa-file-edit"></i>
|
||||||
<p> Gerir Ativos</p>
|
<p> Gerir Ativos</p>
|
||||||
</a>
|
</a>
|
||||||
|
|
@ -185,23 +185,23 @@ class="fas fa-bars"></i></a>
|
||||||
</a>
|
</a>
|
||||||
<ul class="nav nav-treeview">
|
<ul class="nav nav-treeview">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="utilizadores.html" class="nav-link">
|
<a href="{{ route('users.list') }}" class="nav-link">
|
||||||
<i class="fa-solid fa-users"></i>
|
<i class="fa-solid fa-users"></i>
|
||||||
<p>Utilizadores</p>
|
<p>Utilizadores</p>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="clientes.html" class="nav-link">
|
<a href="{{ route('users.company') }}" class="nav-link">
|
||||||
<i class="fa-solid fa-house-user"></i>
|
<i class="fa-solid fa-house-user"></i>
|
||||||
<p>Clientes</p>
|
<p>Clientes</p>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
{{-- <li class="nav-item">
|
||||||
<a href="{{ route('users.list') }}" class="nav-link">
|
<a href="{{ route('users.list') }}" class="nav-link">
|
||||||
<i class="fa-solid fa-file-edit"></i>
|
<i class="fa-solid fa-file-edit"></i>
|
||||||
<p> Gerir Utilizadores</p>
|
<p> Gerir Utilizadores</p>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li> --}}
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="{{ route('CreateUsers') }}" class="nav-link">
|
<a href="{{ route('CreateUsers') }}" class="nav-link">
|
||||||
<i class="nav-icon fas fa-gear"></i>
|
<i class="nav-icon fas fa-gear"></i>
|
||||||
|
|
@ -280,7 +280,7 @@ class="fas fa-bars"></i></a>
|
||||||
<script src="https://unpkg.com/xlsx/dist/xlsx.full.min.js"></script>
|
<script src="https://unpkg.com/xlsx/dist/xlsx.full.min.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- daterangepicker -->
|
<!-- daterangepicker -->
|
||||||
<script src="plugins/moment/moment.min.js"></script>
|
<script src="plugins/moment/moment.min.js"></script>
|
||||||
<script src="{{ asset('plugins/daterangepicker/daterangepicker.js') }}"></script>
|
<script src="{{ asset('plugins/daterangepicker/daterangepicker.js') }}"></script>
|
||||||
|
|
@ -294,22 +294,25 @@ class="fas fa-bars"></i></a>
|
||||||
<!-- AdminLTE App -->
|
<!-- AdminLTE App -->
|
||||||
<script src="{{ asset('js/adminlte.js') }}"></script>
|
<script src="{{ asset('js/adminlte.js') }}"></script>
|
||||||
|
|
||||||
<!-- jQuery UI 1.11.4 -->
|
<!-- jQuery UI 1.11.4 -->
|
||||||
<script src="{{ asset('plugins/jquery-ui/jquery-ui.min.js') }}"></script>
|
<script src="{{ asset('plugins/jquery-ui/jquery-ui.min.js') }}"></script>
|
||||||
<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
|
<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$.widget.bridge('uibutton', $.ui.button)
|
$.widget.bridge('uibutton', $.ui.button)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
@yield('scripts')
|
||||||
{{-- Script que dao erro no projecto --}}
|
{{-- Script que dao erro no projecto --}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- AdminLTE for demo purposes -->
|
<!-- AdminLTE for demo purposes -->
|
||||||
<!--<script src="dist/js/demo.js"></script> -->
|
<!--<script src="dist/js/demo.js"></script> -->
|
||||||
<!-- AdminLTE dashboard demo (This is only for demo purposes) -->
|
<!-- AdminLTE dashboard demo (This is only for demo purposes) -->
|
||||||
{{-- <script src="{{ asset('js/pages/dashboard.js') }}"></script> --}}
|
{{-- <script src="{{ asset('js/pages/dashboard.js') }}"></script> --}}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,194 +0,0 @@
|
||||||
@extends('Templates/templateAdmin')
|
|
||||||
|
|
||||||
@section('Main-content')
|
|
||||||
<!-- Content Header (Page header) -->
|
|
||||||
<!-- /.content-header -->
|
|
||||||
|
|
||||||
@if (session('success'))
|
|
||||||
<div class="alert alert-success" role="alert">
|
|
||||||
{{ session('success') }}
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
|
||||||
|
|
||||||
<br><br>
|
|
||||||
<div class="card">
|
|
||||||
<div class="card-body">
|
|
||||||
<div class="container mt-5">
|
|
||||||
<form>
|
|
||||||
@csrf
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="inputDocumento">Selecione um documento:</label>
|
|
||||||
<input type="file" class="form-control-file" id="inputDocumento" accept=".xlsx, .xls">
|
|
||||||
</div>
|
|
||||||
<button type="submit" class="btn btn-primary">Enviar</button>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<br><br>
|
|
||||||
<a id="btn-download-template" href="{{ route('download') }}" class="btn btn-warning">Baixar Template</a>
|
|
||||||
|
|
||||||
<div id="tabelaExcel" class="mt-5"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="tabelaExcel" class="mt-5"></div>
|
|
||||||
<div id="tabelaExcel1" class="mt-5"></div>
|
|
||||||
<div id="tabelaExcel2" class="mt-5"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{-- <script>
|
|
||||||
// Obtenha a URL da rota usando o método route()
|
|
||||||
const downloadUrl = "{{ route('download') }}";
|
|
||||||
|
|
||||||
// Atribua a URL ao atributo formaction do botão
|
|
||||||
document.getElementById('btn-download-template').setAttribute('formaction', downloadUrl);
|
|
||||||
|
|
||||||
(function() {
|
|
||||||
const tabelaExcel1 = document.getElementById('tabelaExcel1');
|
|
||||||
|
|
||||||
function handleFormSubmit(event) {
|
|
||||||
event.preventDefault(); // Previne o comportamento padrão do formulário
|
|
||||||
const inputFile = document.getElementById('inputDocumento').files[0];
|
|
||||||
const reader = new FileReader();
|
|
||||||
reader.readAsBinaryString(inputFile);
|
|
||||||
|
|
||||||
|
|
||||||
reader.onload = function() {
|
|
||||||
const fileData = reader.result;
|
|
||||||
const workbook = XLSX.read(fileData, {
|
|
||||||
type: 'binary'
|
|
||||||
});
|
|
||||||
const worksheet1 = workbook.Sheets[workbook.SheetNames[0]];
|
|
||||||
const tableData1 = XLSX.utils.sheet_to_json(worksheet1);
|
|
||||||
const slicedData = tableData1.slice(3); // cortar os dados a partir do array 3
|
|
||||||
|
|
||||||
// Enviar dados para o servidor via AJAX
|
|
||||||
$.ajax({
|
|
||||||
url: "{{ route('createEquipamentProject') }}", // rota do controlador
|
|
||||||
method: 'POST', // tipo de solicitação
|
|
||||||
data: {
|
|
||||||
data: slicedData
|
|
||||||
}, // dados para enviar, aqui enviamos os dados cortados
|
|
||||||
success: function(response) {
|
|
||||||
// Código para manipular a resposta, se necessário
|
|
||||||
},
|
|
||||||
error: function(jqXHR, textStatus, errorThrown) {
|
|
||||||
// Código para manipular erros, se necessário
|
|
||||||
}
|
|
||||||
// });
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const form = document.querySelector('form'); form.addEventListener('submit',
|
|
||||||
handleFormSubmit);
|
|
||||||
})();
|
|
||||||
</script> --}}
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
|
||||||
const downloadUrl = "{{ route('download') }}";
|
|
||||||
|
|
||||||
document.getElementById('btn-download-template').setAttribute('formaction', downloadUrl);
|
|
||||||
|
|
||||||
(function() {
|
|
||||||
const tabelaExcel1 = document.getElementById('tabelaExcel1');
|
|
||||||
|
|
||||||
function handleFormSubmit(event) {
|
|
||||||
event.preventDefault();
|
|
||||||
|
|
||||||
const inputFile = document.getElementById('inputDocumento').files[0];
|
|
||||||
const reader = new FileReader();
|
|
||||||
reader.readAsBinaryString(inputFile);
|
|
||||||
|
|
||||||
reader.onload = function() {
|
|
||||||
const fileData = reader.result;
|
|
||||||
const workbook = XLSX.read(fileData, {
|
|
||||||
type: 'binary'
|
|
||||||
});
|
|
||||||
const worksheet1 = workbook.Sheets[workbook.SheetNames[0]];
|
|
||||||
const tableData1 = XLSX.utils.sheet_to_json(worksheet1);
|
|
||||||
const slicedData = tableData1.slice(3);
|
|
||||||
|
|
||||||
console.log(slicedData);
|
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
url: "{{ route('createEquipamentProject') }}",
|
|
||||||
method: 'POST',
|
|
||||||
data: {
|
|
||||||
data: slicedData
|
|
||||||
},
|
|
||||||
// Uncomment these for debugging
|
|
||||||
// success: function(response) {
|
|
||||||
// console.log(response);
|
|
||||||
// },
|
|
||||||
// error: function(jqXHR, textStatus, errorThrown) {
|
|
||||||
// console.log(textStatus, errorThrown);
|
|
||||||
// }
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const form = document.querySelector('form');
|
|
||||||
form.addEventListener('submit', handleFormSubmit);
|
|
||||||
})();
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@endsection
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{{--
|
|
||||||
// reader.onload = function() {
|
|
||||||
// const fileData = reader.result;
|
|
||||||
// const workbook = XLSX.read(fileData, {
|
|
||||||
// type: 'binary'
|
|
||||||
// });
|
|
||||||
// const worksheet1 = workbook.Sheets[workbook.SheetNames[0]];
|
|
||||||
// const tableData1 = XLSX.utils.sheet_to_json(worksheet1);
|
|
||||||
// const tabelaHtml1 = criarTabelaHtml(tableData1);
|
|
||||||
// const tabelaExcel1 = document.getElementById('tabelaExcel1');
|
|
||||||
// if (tabelaExcel1 !== null) {
|
|
||||||
// tabelaExcel1.innerHTML = tabelaHtml1;
|
|
||||||
// }
|
|
||||||
// };
|
|
||||||
|
|
||||||
|
|
||||||
// function criarTabelaHtml(dados) {
|
|
||||||
|
|
||||||
// const colunasObj = dados[2];
|
|
||||||
// const colunasheader = Object.keys(colunasObj).map(key =>
|
|
||||||
// colunasObj[key]);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// const colunasHtml = colunasheader.map(coluna => `<th>${coluna}</th>`).join('');
|
|
||||||
|
|
||||||
// const colunas = Object.keys(dados[2]);
|
|
||||||
|
|
||||||
// const linhasHtml = dados
|
|
||||||
// .slice(3)
|
|
||||||
// .map(linha => {
|
|
||||||
// const celulasHtml = colunas.map(coluna => {
|
|
||||||
// const valor = linha[coluna] !== undefined ? linha[coluna] : 'NULL';
|
|
||||||
// return `<td>${valor}</td>`;
|
|
||||||
// }).join('');
|
|
||||||
// return `<tr>${celulasHtml}</tr>`;
|
|
||||||
// })
|
|
||||||
// .join('');
|
|
||||||
|
|
||||||
// // console.log()
|
|
||||||
// return `
|
|
||||||
// <table class="table table-bordered">
|
|
||||||
// <thead>
|
|
||||||
// <tr>${colunasHtml}</tr>
|
|
||||||
// </thead>
|
|
||||||
// <tbody>
|
|
||||||
// ${linhasHtml}
|
|
||||||
// </tbody>
|
|
||||||
// </table>
|
|
||||||
// `;
|
|
||||||
// } --}}
|
|
||||||
179
resources/views/createProjectExcel.blade.php
Normal file
179
resources/views/createProjectExcel.blade.php
Normal file
|
|
@ -0,0 +1,179 @@
|
||||||
|
@extends('Templates/templateAdmin')
|
||||||
|
|
||||||
|
@section('Main-content')
|
||||||
|
<!-- Content Header (Page header) -->
|
||||||
|
<!-- /.content-header -->
|
||||||
|
|
||||||
|
@if (session('success'))
|
||||||
|
<div class="alert alert-success" role="alert">
|
||||||
|
{{ session('success') }}
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{-- <meta name="csrf-token" content="{{ csrf_token() }}"> --}}
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="container mt-5">
|
||||||
|
<div class="card "></div>
|
||||||
|
<form action="{{ route('createEquipamentProject') }}" method="post" enctype="multipart/form-data">
|
||||||
|
@csrf
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="inputDocumento">Selecione um documento:</label>
|
||||||
|
<input type="file" class="form-control-file" id="inputDocumento" name="documento" accept=".xlsx, .xls">
|
||||||
|
</div>
|
||||||
|
<button type="submit" class="btn btn-primary">Enviar</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<div class="form-group col-sm-6">
|
||||||
|
<label for="exampleInputFile">Import Articulated </label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="custom-file">
|
||||||
|
<input type="file" class="custom-file-input"
|
||||||
|
id="exampleInputFile">
|
||||||
|
<label class="custom-file-label"for="exampleInputFile">
|
||||||
|
Choose File</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
<a id="btn-download-template" href="{{ route('download') }}" class="btn btn-warning">Baixar Template</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<table class="table table-bordered">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>ID</th>
|
||||||
|
<th>Fabrica</th>
|
||||||
|
<th>Tipo de Equipamento</th>
|
||||||
|
<th>Tag</th>
|
||||||
|
<th>Descricao Equipamento</th>
|
||||||
|
<th>Numero de Serie</th>
|
||||||
|
<th>Marca</th>
|
||||||
|
<th>Modelo</th>
|
||||||
|
<th>Editar</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@if(Session::has('listValves'))
|
||||||
|
@foreach(Session::get('listValves') as $valve)
|
||||||
|
<tr>
|
||||||
|
<td>{{ $valve->equipment_id }}</td>
|
||||||
|
<td>{{ $valve->unit_id }}</td>
|
||||||
|
<td>{{ $valve->equipment_type_id }}</td>
|
||||||
|
<td>{{ $valve->equipment_tag }}</td>
|
||||||
|
<td>{{ $valve->equipment_description }}</td>
|
||||||
|
<td>{{ $valve->equipment_serial_number }}</td>
|
||||||
|
<td>{{ $valve->equipment_brand }}</td>
|
||||||
|
<td>{{ $valve->equipment_model }}</td>
|
||||||
|
<td>Botoes Editar</td>
|
||||||
|
{{-- <td>{{ $valve->Is_active }}</td> --}}
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{{-- <div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="container mt-5">
|
||||||
|
<form>
|
||||||
|
@csrf
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="inputDocumento">Selecione um documento:</label>
|
||||||
|
<input type="file" class="form-control-file" id="inputDocumento" accept=".xlsx, .xls">
|
||||||
|
</div>
|
||||||
|
<button type="submit" class="btn btn-primary">Enviar</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
<a id="btn-download-template" href="{{ route('download') }}" class="btn btn-warning">Baixar Template</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div id="tabelaExcel" class="mt-5" style="display: none;"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div> --}}
|
||||||
|
|
||||||
|
{{-- <script>
|
||||||
|
const downloadUrl = "{{ route('download') }}";
|
||||||
|
|
||||||
|
document.getElementById('btn-download-template').setAttribute('formaction', downloadUrl);
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
const tabelaExcel1 = document.getElementById('tabelaExcel1');
|
||||||
|
|
||||||
|
function handleFormSubmit(event) {
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
const inputFile = document.getElementById('inputDocumento').files[0];
|
||||||
|
const reader = new FileReader();
|
||||||
|
reader.readAsBinaryString(inputFile);
|
||||||
|
|
||||||
|
reader.onload = function() {
|
||||||
|
const fileData = reader.result;
|
||||||
|
const workbook = XLSX.read(fileData, {
|
||||||
|
type: 'binary'
|
||||||
|
});
|
||||||
|
const worksheet1 = workbook.Sheets[workbook.SheetNames[0]];
|
||||||
|
const tableData1 = XLSX.utils.sheet_to_json(worksheet1);
|
||||||
|
const slicedData = tableData1.slice(3);
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url: "{{ route('createEquipamentProject') }}",
|
||||||
|
method: 'POST',
|
||||||
|
data: {
|
||||||
|
data: slicedData
|
||||||
|
},
|
||||||
|
success: function(response) {
|
||||||
|
if (response.success) {
|
||||||
|
// A criação foi bem-sucedida
|
||||||
|
console.log("A criação dos equipamentos foi bem-sucedida!");
|
||||||
|
|
||||||
|
document.getElementById('tabelaExcel').style.display = 'block';
|
||||||
|
} else {
|
||||||
|
// A criação falhou
|
||||||
|
console.log("A criação dos equipamentos falhou.");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(jqXHR, textStatus, errorThrown) {
|
||||||
|
console.log(textStatus, errorThrown);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const form = document.querySelector('form');
|
||||||
|
form.addEventListener('submit', handleFormSubmit);
|
||||||
|
})();
|
||||||
|
</script> --}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@endsection
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
@extends('Templates/templateAdmin')
|
@extends('Templates/templateAdmin')
|
||||||
|
|
||||||
@section('Main-content')
|
@section('Main-content')
|
||||||
<!-- Content Header (Page header) -->
|
|
||||||
<!-- /.content-header -->
|
|
||||||
@if (session('success'))
|
@if (session('success'))
|
||||||
<div class="alert alert-success" role="alert">
|
<div class="alert alert-success" role="alert">
|
||||||
{{ session('success') }}
|
{{ session('success') }}
|
||||||
|
|
@ -10,194 +8,303 @@
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="card-body">
|
|
||||||
<!-- progressbar -->
|
<!-- Multiplos FieldSet -->
|
||||||
<ul id="progressbar" class="nav nav-pills flex-sm-row" style=" text-align: center;">
|
<div class="col-12" id="msform">
|
||||||
<li class="active flex-sm-fill">Project details</li>
|
|
||||||
<li class="flex-sm-fill">Articulated</li>
|
<div class="row justify-content-center">
|
||||||
<li class="flex-sm-fill">Workstation</li>
|
<div class="card-body">
|
||||||
</ul>
|
<!-- Progressbar -->
|
||||||
</div>
|
<ul id="progressbar" class="nav nav-pills flex-sm-row">
|
||||||
</div>
|
<li class="active flex-sm-fill">Detalhes do projecto</li>
|
||||||
<!-- Card details project -->
|
<li class="flex-sm-fill">Articulado</li>
|
||||||
<fieldset>
|
<li class="flex-sm-fill">Postos de Trabalho</li>
|
||||||
<div class="card card-primary" id="CardDetalhes">
|
</ul>
|
||||||
<div class="card-header bg-primary text-white">
|
</div>
|
||||||
<h3 class="card-title mb-0">Detalhes da Obra</h3>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card-body">
|
<!-- Card details project -->
|
||||||
|
<fieldset>
|
||||||
<form method="POST" action="{{ route('createProject1') }}" id="idDoFormulario">
|
<div class="card card-primary" id="CardDetalhes">
|
||||||
@csrf
|
<div class="card-header bg-primary text-white">
|
||||||
|
<h3 class="card-title mb-0">Detalhes da Obra</h3>
|
||||||
<div class="row">
|
|
||||||
<div class="form-group col-sm-6">
|
|
||||||
<label>Descrição da obra</label>
|
|
||||||
<input type="text" name="description_project" class="form-control"
|
|
||||||
placeholder="Descrição da obra;">
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-sm-6">
|
|
||||||
<label>Nº. obra ISPT</label>
|
|
||||||
<input type="number" name="n_project_ispt" class="form-control"
|
|
||||||
placeholder="Nº. obra ISPT…">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="form-group col-sm-6">
|
|
||||||
<label>Responsável obra ISPT</label>
|
|
||||||
<input type="text" name="responsible_project_ispt" class="form-control"
|
|
||||||
placeholder="Responsável obra ISPT…">
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-sm-6">
|
|
||||||
<label>Responsável obra Empresa</label>
|
|
||||||
<input type="text" name="responsible_project_company" class="form-control"
|
|
||||||
placeholder="Responsável obra cliente…">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
|
|
||||||
<div class="form-group col-sm-6" id="companyField">
|
|
||||||
<label>Empresa</label>
|
|
||||||
<select class="form-control" name="user_id" id="company_select">
|
|
||||||
<option value="#">Selecione uma Empresa...</option>
|
|
||||||
@foreach ($companies as $company)
|
|
||||||
<option value="{{ $company->id }}">{{ $company->name }}</option>
|
|
||||||
@endforeach
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-sm-6" id="installationField" hidden>
|
|
||||||
<label>Instalação</label>
|
|
||||||
<select class="form-control" name="installation_id" id="installationSelect">
|
|
||||||
|
|
||||||
<!-- As opções de instalação serão preenchidas dinamicamente -->
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row" id="new_company_div">
|
|
||||||
|
|
||||||
<div class="form-group col-sm-6">
|
|
||||||
<label>Nova Instalacao :</label>
|
|
||||||
<input type="text" id="new_company_name" class="form-control" name="new_company_name"
|
|
||||||
placeholder="Digite o nome da nova empresa">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-sm-6">
|
|
||||||
<label>Nova Localização</label>
|
|
||||||
<input type="text" class="form-control" name="new_company_address"
|
|
||||||
placeholder="Localização...">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group" id="localization_installation_client">
|
|
||||||
<label>Localização</label>
|
|
||||||
<input type="text" class="form-control" placeholder="Localização" readonly>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="form-group col-sm-6">
|
|
||||||
<label>Nº. de obra cliente</label>
|
|
||||||
<input type="number" name="" class="form-control"
|
|
||||||
placeholder="Nº. de obra cliente…">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Date -->
|
|
||||||
<div class="form-group col-sm-6">
|
|
||||||
<label>Datas:</label>
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text">
|
|
||||||
<i class="far fa-calendar-alt"></i>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<input name="date_started" type="datetime-local" class="form-control float-right">
|
|
||||||
</div>
|
|
||||||
<!-- /.input group -->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<!-- /.card-body -->
|
|
||||||
|
|
||||||
<div class="card-footer">
|
|
||||||
<div class="float-right">
|
|
||||||
<button type="submit" class="btn btn-primary">Guardar</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
{{-- /.card-body --}}
|
|
||||||
</div>
|
|
||||||
{{-- /.card card-primary --}}
|
|
||||||
</fieldset>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Card Articulado -->
|
|
||||||
{{-- <fieldset>
|
|
||||||
<div class="card card-primary">
|
|
||||||
<div class="card-header">
|
|
||||||
<h3 class="card-title">Articulated</h3>
|
|
||||||
</div>
|
|
||||||
<!-- ./Card-header -->
|
|
||||||
<div class="card-body">
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Table articulado da obra -->
|
|
||||||
<div class="card">
|
|
||||||
<div class="card-header">
|
|
||||||
<h3 class="card-title">Tasks</h3>
|
|
||||||
</div>
|
|
||||||
<!-- /.card-header -->
|
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="container mt-5">
|
|
||||||
<form>
|
<form method="POST" action="{{ route('createProject1') }}" id="idDoFormulario">
|
||||||
|
@csrf
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="form-group col-sm-6">
|
||||||
|
<label>Descrição da obra</label>
|
||||||
|
<input type="text" name="description_project" class="form-control"
|
||||||
|
placeholder="Descrição da obra;">
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-sm-6">
|
||||||
|
<label>Nº. obra ISPT</label>
|
||||||
|
<input type="number" name="n_project_ispt" class="form-control"
|
||||||
|
placeholder="Nº. obra ISPT…">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="form-group col-sm-6">
|
||||||
|
<label>Responsável obra ISPT</label>
|
||||||
|
<input type="text" name="responsible_project_ispt" class="form-control"
|
||||||
|
placeholder="Responsável obra ISPT…">
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-sm-6">
|
||||||
|
<label>Responsável obra Empresa</label>
|
||||||
|
<input type="text" name="responsible_project_company" class="form-control"
|
||||||
|
placeholder="Responsável obra cliente…">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="form-group col-sm-6" id="companyField">
|
||||||
|
<label>Empresa</label>
|
||||||
|
<select class="form-control" name="user_id" id="company_select">
|
||||||
|
<option value="#">Selecione uma Empresa...</option>
|
||||||
|
@foreach ($companies as $company)
|
||||||
|
<option value="{{ $company->id }}">{{ $company->name }}</option>
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-sm-6" id="installationField" hidden>
|
||||||
|
<label>Instalação</label>
|
||||||
|
<select class="form-control" name="installation_id" id="installationSelect">
|
||||||
|
|
||||||
|
<!-- As opções de instalação serão preenchidas dinamicamente -->
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row" id="new_company_div">
|
||||||
|
|
||||||
|
<div class="form-group col-sm-6">
|
||||||
|
<label>Nova Instalacao :</label>
|
||||||
|
<input type="text" id="new_company_name" class="form-control" name="new_company_name"
|
||||||
|
placeholder="Digite o nome da nova empresa">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-sm-6">
|
||||||
|
<label>Nova Localização</label>
|
||||||
|
<input type="text" class="form-control" name="new_company_address"
|
||||||
|
placeholder="Localização...">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="form-group" id="localization_installation_client">
|
||||||
|
<label>Localização</label>
|
||||||
|
<input type="text" class="form-control" placeholder="Localização" readonly>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="form-group col-sm-6">
|
||||||
|
<label>Nº. de obra cliente</label>
|
||||||
|
<input type="number" name="" class="form-control"
|
||||||
|
placeholder="Nº. de obra cliente…">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Date -->
|
||||||
|
<div class="form-group col-sm-6">
|
||||||
|
<label>Datas:</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text">
|
||||||
|
<i class="far fa-calendar-alt"></i>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<input name="date_started" type="datetime-local" class="form-control float-right">
|
||||||
|
</div>
|
||||||
|
<!-- /.input group -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- /.card-body -->
|
||||||
|
|
||||||
|
<div class="card-footer">
|
||||||
|
<div class="float-right">
|
||||||
|
<button type="submit" class="btn btn-primary">Guardar</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
{{-- /.card-body --}}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<input type="button" name="next" class="btn btn-primary next float-right" value="Próximo" />
|
||||||
|
{{-- /.card card-primary --}}
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset>
|
||||||
|
<div class="card card-primary">
|
||||||
|
<div class="card-header">
|
||||||
|
<h3 class="card-title">Articulado</h3>
|
||||||
|
</div>
|
||||||
|
<!-- ./Card-header -->
|
||||||
|
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="container">
|
||||||
|
<div class="card card-success collapsed-card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h3 class="card-title">Criar Equipamentos Manualmente</h3>
|
||||||
|
|
||||||
|
<div class="card-tools">
|
||||||
|
<button type="button" class="btn btn-tool"
|
||||||
|
data-card-widget="collapse"><i class="fas fa-plus"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<!-- /.card-tools -->
|
||||||
|
</div>
|
||||||
|
<!-- /.card-header -->
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="form-group col-sm-6">
|
||||||
|
<label>Nº ISPT</label>
|
||||||
|
<input type="text" class="form-control"
|
||||||
|
placeholder="Nº ISPT...">
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-sm-6">
|
||||||
|
<label>TAG</label>
|
||||||
|
<input type="text" class="form-control"
|
||||||
|
placeholder="TAG equipamento...">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
{{-- card card-success collapsed-card --}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{{-- <form action="{{ route('createEquipamentProject') }}" method="post"
|
||||||
|
enctype="multipart/form-data">
|
||||||
|
@csrf
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="inputDocumento">Selecione um documento:</label>
|
<label for="inputDocumento">Selecione um documento:</label>
|
||||||
<input type="file" class="form-control-file" id="inputDocumento"
|
<input type="file" class="form-control-file" id="inputDocumento" name="documento"
|
||||||
accept=".xlsx, .xls">
|
accept=".xlsx, .xls">
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" class="btn btn-primary">Enviar</button>
|
</form> --}}
|
||||||
|
|
||||||
|
<form action="{{ route('createEquipamentProject') }}" method="post"
|
||||||
|
enctype="multipart/form-data">
|
||||||
|
@csrf
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="form-group col-sm-6">
|
||||||
|
<label for="exampleInputFile">Import Articulated</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="custom-file">
|
||||||
|
<input type="file" class="custom-file-input" id="exampleInputFile"
|
||||||
|
name="documento" accept=".xlsx, .xls">
|
||||||
|
<label class="custom-file-label" for="exampleInputFile">Choose
|
||||||
|
File</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<button type="submit" class="btn btn-primary">Enviar</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{-- ./row --}}
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-6"></div>
|
||||||
|
<div class="col-sm-6"><a id="btn-download-template" href="{{ route('download') }}"
|
||||||
|
class="btn btn-info">Baixar
|
||||||
|
Template</a></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<br><br>
|
|
||||||
<button id="btn-download-template" type="submit" class="btn btn-warning">Baixar
|
|
||||||
Template</button>
|
|
||||||
|
|
||||||
<div id="tabelaExcel" class="mt-5"></div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="tabelaExcel" class="mt-5"></div>
|
<div class="table-responsive">
|
||||||
<div id="tabelaExcel1" class="mt-5"></div>
|
<table class="table table-bordered table-striped">
|
||||||
<div id="tabelaExcel2" class="mt-5"></div>
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>ID</th>
|
||||||
|
<th>Fabrica</th>
|
||||||
|
<th>Tipo de Equipamento</th>
|
||||||
|
<th>Tag</th>
|
||||||
|
<th>Descricao Equipamento</th>
|
||||||
|
<th>Numero de Serie</th>
|
||||||
|
<th>Marca</th>
|
||||||
|
<th>Modelo</th>
|
||||||
|
<th>Editar</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@if (Session::has('listValves'))
|
||||||
|
@foreach (Session::get('listValves') as $valve)
|
||||||
|
<tr>
|
||||||
|
<td>{{ $valve->equipment_id }}</td>
|
||||||
|
<td>{{ $valve->unit_id }}</td>
|
||||||
|
<td>{{ $valve->equipment_type_id }}</td>
|
||||||
|
<td>{{ $valve->equipment_tag }}</td>
|
||||||
|
<td>{{ $valve->equipment_description }}</td>
|
||||||
|
<td>{{ $valve->equipment_serial_number }}</td>
|
||||||
|
<td>{{ $valve->equipment_brand }}</td>
|
||||||
|
<td>{{ $valve->equipment_model }}</td>
|
||||||
|
<td>Botoes Editar</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- /.card-body -->
|
<!-- /.card-body -->
|
||||||
|
<div class="card-footer">
|
||||||
|
<div class="float-right">
|
||||||
|
<button type="submit" class="btn btn-primary">Save</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- /. Table articulado da obra-->
|
<!-- ./Card card-Primary -->
|
||||||
|
|
||||||
|
<input type="button" name="previous" class="btn btn-primary previous float-left" value="Previous" />
|
||||||
|
<input type="button" name="next" class="btn btn-primary next float-right" value="Próximo" />
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset>
|
||||||
|
<div class="card card-primary">
|
||||||
|
<div class="card-header">
|
||||||
|
<h3 class="card-title">Project Details</h3>
|
||||||
|
</div>
|
||||||
|
<!-- ./Card-header -->
|
||||||
|
|
||||||
|
<div class="card-body">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- /.card-body -->
|
||||||
|
<div class="card-footer">
|
||||||
|
<div class="float-right">
|
||||||
|
<button type="submit" class="btn btn-primary">Save</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- ./Card card-Primary -->
|
||||||
|
|
||||||
|
<input type="button" name="previous" class="btn btn-primary previous float-left" value="Previous" />
|
||||||
|
<input type="button" name="next" class="btn btn-primary next float-right" value="Próximo" />
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
</div>
|
|
||||||
<!-- ./Card-body -->
|
|
||||||
</div>
|
</div>
|
||||||
<!-- ./Card card-primary -->
|
{{-- /.Multiplos FieldSet --}}
|
||||||
|
|
||||||
<input type="button" name="previous" class="btn btn-primary previous float-left" value="Previous" />
|
|
||||||
<input type="button" name="next" class="btn btn-primary next float-right" value="Próximo" />
|
|
||||||
</fieldset> --}}
|
|
||||||
|
|
||||||
<br>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- /.content-wrapper -->
|
<!-- /.row justify-content-center -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
@ -226,7 +333,7 @@
|
||||||
// Agora você pode adicionar suas opções dinâmicas.
|
// Agora você pode adicionar suas opções dinâmicas.
|
||||||
$.each(data, function(index, installation) {
|
$.each(data, function(index, installation) {
|
||||||
|
|
||||||
select.append('<option value="' + installation.installation_ID +
|
select.append('<option value="' + installation.installation_id +
|
||||||
'">' +
|
'">' +
|
||||||
installation.installation_name + '</option>');
|
installation.installation_name + '</option>');
|
||||||
});
|
});
|
||||||
|
|
@ -256,7 +363,7 @@
|
||||||
if (installationsData) {
|
if (installationsData) {
|
||||||
// Encontre a instalação selecionada nos dados da instalação
|
// Encontre a instalação selecionada nos dados da instalação
|
||||||
var selectedInstallation = installationsData.find(function(installation) {
|
var selectedInstallation = installationsData.find(function(installation) {
|
||||||
return installation.installation_ID == this.value;
|
return installation.installation_id == this.value;
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
|
||||||
if (selectedInstallation) {
|
if (selectedInstallation) {
|
||||||
|
|
@ -271,73 +378,7 @@
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{{-- <script>
|
|
||||||
$('#new_company_div').hide();
|
|
||||||
|
|
||||||
$('#idDoFormulario').on('submit', function(e) {
|
|
||||||
e.preventDefault();
|
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
type: 'POST',
|
|
||||||
url: $(this).attr('action'),
|
|
||||||
data: $(this).serialize(),
|
|
||||||
success: function(response) {
|
|
||||||
if (response.success) {
|
|
||||||
moveToNextFieldset
|
|
||||||
(); // Mover para o próximo fieldset se a solicitação for bem-sucedida
|
|
||||||
} else {
|
|
||||||
// Trate o caso em que a resposta foi bem-sucedida, mas o conteúdo da resposta indica um erro.
|
|
||||||
// Por exemplo, você pode mostrar uma mensagem de erro.
|
|
||||||
}
|
|
||||||
},
|
|
||||||
error: function(response) {
|
|
||||||
// Trate o caso em que a própria solicitação falhou.
|
|
||||||
// Por exemplo, você pode mostrar uma mensagem de erro.
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
function moveToNextFieldset() {
|
|
||||||
if (animating) return;
|
|
||||||
|
|
||||||
animating = true;
|
|
||||||
current_fs = $('.active').parent();
|
|
||||||
next_fs = $('.active').parent().next();
|
|
||||||
|
|
||||||
$("#progressbar li").eq($("fieldset").index(next_fs)).addClass("active");
|
|
||||||
|
|
||||||
next_fs.show();
|
|
||||||
current_fs.animate({
|
|
||||||
opacity: 0
|
|
||||||
}, {
|
|
||||||
step: function(now, mx) {
|
|
||||||
scale = 1 - (1 - now) * 0.2;
|
|
||||||
left = (now * 50) + "%";
|
|
||||||
opacity = 1 - now;
|
|
||||||
current_fs.css({
|
|
||||||
'transform': 'scale(' + scale + ')',
|
|
||||||
'position': 'absolute'
|
|
||||||
});
|
|
||||||
next_fs.css({
|
|
||||||
'left': left,
|
|
||||||
'opacity': opacity
|
|
||||||
});
|
|
||||||
},
|
|
||||||
duration: 800,
|
|
||||||
complete: function() {
|
|
||||||
current_fs.hide();
|
|
||||||
animating = false;
|
|
||||||
},
|
|
||||||
easing: 'easeInOutBack'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
</script> --}}
|
|
||||||
|
|
||||||
{{-- Script Articlado --}}
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
|
||||||
// Atribua a URL ao atributo formaction do botão
|
// Atribua a URL ao atributo formaction do botão
|
||||||
document.getElementById('btn-download-template').setAttribute('formaction', downloadUrl);
|
document.getElementById('btn-download-template').setAttribute('formaction', downloadUrl);
|
||||||
|
|
||||||
|
|
@ -404,5 +445,56 @@ function criarTabelaHtml(dados) {
|
||||||
form.addEventListener('submit', handleFormSubmit);
|
form.addEventListener('submit', handleFormSubmit);
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
{{-- Script ProgressBar --}}
|
||||||
|
@section('scripts')
|
||||||
|
<script>
|
||||||
|
//jQuery time
|
||||||
|
var current_fs, next_fs, previous_fs; //fieldsets
|
||||||
|
var left, opacity, scale; //fieldset properties which we will animate
|
||||||
|
var animating; //flag to prevent quick multi-click glitches
|
||||||
|
|
||||||
|
$(".next").click(function() {
|
||||||
|
if (animating) return false;
|
||||||
|
animating = true;
|
||||||
|
|
||||||
|
current_fs = $(this).parent();
|
||||||
|
next_fs = $(this).parent().next();
|
||||||
|
|
||||||
|
$("#progressbar li").eq($("fieldset").index(next_fs)).addClass("active");
|
||||||
|
|
||||||
|
current_fs.animate({
|
||||||
|
opacity: 0
|
||||||
|
}, 800, function() {
|
||||||
|
current_fs.hide();
|
||||||
|
next_fs.show();
|
||||||
|
next_fs.css({
|
||||||
|
'opacity': 1
|
||||||
|
});
|
||||||
|
animating = false;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$(".previous").click(function() {
|
||||||
|
if (animating) return false;
|
||||||
|
animating = true;
|
||||||
|
|
||||||
|
current_fs = $(this).parent();
|
||||||
|
previous_fs = $(this).parent().prev();
|
||||||
|
|
||||||
|
$("#progressbar li").eq($("fieldset").index(current_fs)).removeClass("active");
|
||||||
|
|
||||||
|
current_fs.animate({
|
||||||
|
opacity: 0
|
||||||
|
}, 800, function() {
|
||||||
|
current_fs.hide();
|
||||||
|
previous_fs.show();
|
||||||
|
previous_fs.css({
|
||||||
|
'opacity': 1
|
||||||
|
});
|
||||||
|
animating = false;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
|
||||||
557
resources/views/test.blade.php
Normal file
557
resources/views/test.blade.php
Normal file
|
|
@ -0,0 +1,557 @@
|
||||||
|
@extends('Templates/templateAdmin')
|
||||||
|
|
||||||
|
@section('Main-content')
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
|
||||||
|
<table class="table table-bordered">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Equipment ID</th>
|
||||||
|
<th>Factory ID</th>
|
||||||
|
<th>Equipament Type ID</th>
|
||||||
|
<th>Tag</th>
|
||||||
|
<th>equipment_description</th>
|
||||||
|
<th>Serial Number</th>
|
||||||
|
<th>Brand</th>
|
||||||
|
<th>Model</th>
|
||||||
|
<th>Is Active</th>
|
||||||
|
<th>Attribute Description</th>
|
||||||
|
<th>Attribute Value</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@foreach ($equipments as $equipment)
|
||||||
|
<tr>
|
||||||
|
<td>{{ $equipment->equipment_id }}</td>
|
||||||
|
<td>{{ $equipment->factory_id }}</td>
|
||||||
|
<td>{{ $equipment->equipament_type_id }}</td>
|
||||||
|
<td>{{ $equipment->tag }}</td>
|
||||||
|
<td>{{ $equipment->equipment_description }}</td>
|
||||||
|
<td>{{ $equipment->serial_number }}</td>
|
||||||
|
<td>{{ $equipment->brand }}</td>
|
||||||
|
<td>{{ $equipment->model }}</td>
|
||||||
|
<td>{{ $equipment->Is_active }}</td>
|
||||||
|
@if (isset($equipment->specific_attributes))
|
||||||
|
@foreach ($equipment->specific_attributes as $attribute)
|
||||||
|
@if ($loop->first)
|
||||||
|
<td>{{ $attribute['description'] }}</td>
|
||||||
|
<td>{{ $attribute['value'] }}</td>
|
||||||
|
@else
|
||||||
|
</tr><tr>
|
||||||
|
<td colspan="9"></td>
|
||||||
|
<td>{{ $attribute['description'] }}</td>
|
||||||
|
<td>{{ $attribute['value'] }}</td>
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
@else
|
||||||
|
<td colspan="2"></td>
|
||||||
|
@endif
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@extends('Templates/templateAdmin')
|
||||||
|
|
||||||
|
@section('Main-content')
|
||||||
|
<!-- Content Header (Page header) -->
|
||||||
|
<!-- /.content-header -->
|
||||||
|
|
||||||
|
@if (session('success'))
|
||||||
|
<div class="alert alert-success" role="alert">
|
||||||
|
{{ session('success') }}
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="container mt-5">
|
||||||
|
<form action="{{ route('createEquipamentProject') }}" method="post" enctype="multipart/form-data">
|
||||||
|
@csrf
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="inputDocumento">Selecione um documento:</label>
|
||||||
|
<input type="file" class="form-control-file" id="inputDocumento" name="documento" accept=".xlsx, .xls">
|
||||||
|
</div>
|
||||||
|
<button type="submit" class="btn btn-primary">Enviar</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
<a id="btn-download-template" href="{{ route('download') }}" class="btn btn-warning">Baixar Template</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<table class="table table-bordered">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Equipment ID</th>
|
||||||
|
<th>Factory ID</th>
|
||||||
|
<th>Equipament Type ID</th>
|
||||||
|
<th>Tag</th>
|
||||||
|
<th>equipment_description</th>
|
||||||
|
<th>Serial Number</th>
|
||||||
|
<th>Brand</th>
|
||||||
|
<th>Model</th>
|
||||||
|
<th>Is Active</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@if(Session::has('listValves'))
|
||||||
|
@foreach(Session::get('listValves') as $valve)
|
||||||
|
<tr>
|
||||||
|
<td>{{ $valve->equipment_id }}</td>
|
||||||
|
<td>{{ $valve->factory_id }}</td>
|
||||||
|
<td>{{ $valve->equipament_type_id }}</td>
|
||||||
|
<td>{{ $valve->tag }}</td>
|
||||||
|
<td>{{ $valve->equipment_description }}</td>
|
||||||
|
<td>{{ $valve->serial_number }}</td>
|
||||||
|
<td>{{ $valve->brand }}</td>
|
||||||
|
<td>{{ $valve->model }}</td>
|
||||||
|
<td>{{ $valve->Is_active }}</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{{-- Create Project --}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{{-- @extends('Templates/templateAdmin')
|
||||||
|
|
||||||
|
@section('Main-content')
|
||||||
|
<!-- Content Header (Page header) -->
|
||||||
|
<!-- /.content-header -->
|
||||||
|
@if (session('success'))
|
||||||
|
<div class="alert alert-success" role="alert">
|
||||||
|
{{ session('success') }}
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<div class="row justify-content-center">
|
||||||
|
<div class="card-body">
|
||||||
|
<!-- progressbar -->
|
||||||
|
<ul id="progressbar" class="nav nav-pills flex-sm-row" style=" text-align: center;">
|
||||||
|
<li class="active flex-sm-fill">Project details</li>
|
||||||
|
<li class="flex-sm-fill">Articulated</li>
|
||||||
|
<li class="flex-sm-fill">Workstation</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Card details project -->
|
||||||
|
<fieldset>
|
||||||
|
<div class="card card-primary" id="CardDetalhes">
|
||||||
|
<div class="card-header bg-primary text-white">
|
||||||
|
<h3 class="card-title mb-0">Detalhes da Obra</h3>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card-body">
|
||||||
|
|
||||||
|
<form method="POST" action="{{ route('createProject1') }}" id="idDoFormulario">
|
||||||
|
@csrf
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="form-group col-sm-6">
|
||||||
|
<label>Descrição da obra</label>
|
||||||
|
<input type="text" name="description_project" class="form-control"
|
||||||
|
placeholder="Descrição da obra;">
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-sm-6">
|
||||||
|
<label>Nº. obra ISPT</label>
|
||||||
|
<input type="number" name="n_project_ispt" class="form-control"
|
||||||
|
placeholder="Nº. obra ISPT…">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="form-group col-sm-6">
|
||||||
|
<label>Responsável obra ISPT</label>
|
||||||
|
<input type="text" name="responsible_project_ispt" class="form-control"
|
||||||
|
placeholder="Responsável obra ISPT…">
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-sm-6">
|
||||||
|
<label>Responsável obra Empresa</label>
|
||||||
|
<input type="text" name="responsible_project_company" class="form-control"
|
||||||
|
placeholder="Responsável obra cliente…">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="form-group col-sm-6" id="companyField">
|
||||||
|
<label>Empresa</label>
|
||||||
|
<select class="form-control" name="user_id" id="company_select">
|
||||||
|
<option value="#">Selecione uma Empresa...</option>
|
||||||
|
@foreach ($companies as $company)
|
||||||
|
<option value="{{ $company->id }}">{{ $company->name }}</option>
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-sm-6" id="installationField" hidden>
|
||||||
|
<label>Instalação</label>
|
||||||
|
<select class="form-control" name="installation_id" id="installationSelect">
|
||||||
|
|
||||||
|
<!-- As opções de instalação serão preenchidas dinamicamente -->
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row" id="new_company_div">
|
||||||
|
|
||||||
|
<div class="form-group col-sm-6">
|
||||||
|
<label>Nova Instalacao :</label>
|
||||||
|
<input type="text" id="new_company_name" class="form-control" name="new_company_name"
|
||||||
|
placeholder="Digite o nome da nova empresa">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-sm-6">
|
||||||
|
<label>Nova Localização</label>
|
||||||
|
<input type="text" class="form-control" name="new_company_address"
|
||||||
|
placeholder="Localização...">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="form-group" id="localization_installation_client">
|
||||||
|
<label>Localização</label>
|
||||||
|
<input type="text" class="form-control" placeholder="Localização" readonly>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="form-group col-sm-6">
|
||||||
|
<label>Nº. de obra cliente</label>
|
||||||
|
<input type="number" name="" class="form-control"
|
||||||
|
placeholder="Nº. de obra cliente…">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Date -->
|
||||||
|
<div class="form-group col-sm-6">
|
||||||
|
<label>Datas:</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text">
|
||||||
|
<i class="far fa-calendar-alt"></i>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<input name="date_started" type="datetime-local" class="form-control float-right">
|
||||||
|
</div>
|
||||||
|
<!-- /.input group -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- /.card-body -->
|
||||||
|
|
||||||
|
<div class="card-footer">
|
||||||
|
<div class="float-right">
|
||||||
|
<button type="submit" class="btn btn-primary">Guardar</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
{{-- /.card-body --}}
|
||||||
|
{{-- </div> --}}
|
||||||
|
{{-- /.card card-primary --}}
|
||||||
|
{{-- </fieldset> --}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Card Articulado -->
|
||||||
|
{{-- <fieldset>
|
||||||
|
<div class="card card-primary">
|
||||||
|
<div class="card-header">
|
||||||
|
<h3 class="card-title">Articulated</h3>
|
||||||
|
</div>
|
||||||
|
<!-- ./Card-header -->
|
||||||
|
<div class="card-body">
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Table articulado da obra -->
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h3 class="card-title">Tasks</h3>
|
||||||
|
</div>
|
||||||
|
<!-- /.card-header -->
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="container mt-5">
|
||||||
|
<form>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="inputDocumento">Selecione um documento:</label>
|
||||||
|
<input type="file" class="form-control-file" id="inputDocumento"
|
||||||
|
accept=".xlsx, .xls">
|
||||||
|
</div>
|
||||||
|
<button type="submit" class="btn btn-primary">Enviar</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
<button id="btn-download-template" type="submit" class="btn btn-warning">Baixar
|
||||||
|
Template</button>
|
||||||
|
|
||||||
|
<div id="tabelaExcel" class="mt-5"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="tabelaExcel" class="mt-5"></div>
|
||||||
|
<div id="tabelaExcel1" class="mt-5"></div>
|
||||||
|
<div id="tabelaExcel2" class="mt-5"></div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- /.card-body -->
|
||||||
|
</div>
|
||||||
|
<!-- /. Table articulado da obra-->
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- ./Card-body -->
|
||||||
|
</div>
|
||||||
|
<!-- ./Card card-primary -->
|
||||||
|
|
||||||
|
<input type="button" name="previous" class="btn btn-primary previous float-left" value="Previous" />
|
||||||
|
<input type="button" name="next" class="btn btn-primary next float-right" value="Próximo" />
|
||||||
|
</fieldset> --}}
|
||||||
|
|
||||||
|
{{-- <br>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- /.content-wrapper -->
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
|
||||||
|
var installationsData; // Esta variável irá armazenar as informações das instalações
|
||||||
|
$('#company_select').change(function() {
|
||||||
|
var user_id = $(this).val();
|
||||||
|
|
||||||
|
if (user_id == '#') {
|
||||||
|
$('#installationField').attr('hidden', 'hidden');
|
||||||
|
$('#localization_installation_client').hide();
|
||||||
|
$('#new_company_div').hide();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$.get('/api/installations?user_id=' + user_id, function(data) {
|
||||||
|
|
||||||
|
var select = $('#installationSelect');
|
||||||
|
select.empty();
|
||||||
|
|
||||||
|
// Adicione as opções fixas aqui
|
||||||
|
select.append('<option value="#">Selecione uma instalação...</option>');
|
||||||
|
select.append(
|
||||||
|
'<option value="new_install">Criar uma nova Instalacao ?</option>');
|
||||||
|
|
||||||
|
// Agora você pode adicionar suas opções dinâmicas.
|
||||||
|
$.each(data, function(index, installation) {
|
||||||
|
|
||||||
|
select.append('<option value="' + installation.installation_ID +
|
||||||
|
'">' +
|
||||||
|
installation.installation_name + '</option>');
|
||||||
|
});
|
||||||
|
// Armazene os dados em installationsData
|
||||||
|
installationsData = data;
|
||||||
|
|
||||||
|
$('#installationField').removeAttr('hidden');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
// Adicione este código para lidar com a mudança na seleção da instalação
|
||||||
|
$('#installationSelect').change(function() {
|
||||||
|
if (this.value == 'new_install') {
|
||||||
|
$('#new_company_div').show();
|
||||||
|
$('#localization_installation_client').hide();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$('#new_company_div').hide();
|
||||||
|
$('#localization_installation_client').show();
|
||||||
|
|
||||||
|
if (this.value == '#') {
|
||||||
|
$('#new_company_div').hide();
|
||||||
|
$('#localization_installation_client').hide();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Verifique se installationsData está definido
|
||||||
|
if (installationsData) {
|
||||||
|
// Encontre a instalação selecionada nos dados da instalação
|
||||||
|
var selectedInstallation = installationsData.find(function(installation) {
|
||||||
|
return installation.installation_ID == this.value;
|
||||||
|
}.bind(this));
|
||||||
|
|
||||||
|
if (selectedInstallation) {
|
||||||
|
// Preencha o valor do campo de endereço com o endereço da instalação selecionada
|
||||||
|
$('#localization_installation_client input').val(selectedInstallation.address);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#localization_installation_client').hide();
|
||||||
|
$('#new_company_div').hide();
|
||||||
|
});
|
||||||
|
</script> --}}
|
||||||
|
|
||||||
|
{{-- <script>
|
||||||
|
$('#new_company_div').hide();
|
||||||
|
|
||||||
|
$('#idDoFormulario').on('submit', function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: 'POST',
|
||||||
|
url: $(this).attr('action'),
|
||||||
|
data: $(this).serialize(),
|
||||||
|
success: function(response) {
|
||||||
|
if (response.success) {
|
||||||
|
moveToNextFieldset
|
||||||
|
(); // Mover para o próximo fieldset se a solicitação for bem-sucedida
|
||||||
|
} else {
|
||||||
|
// Trate o caso em que a resposta foi bem-sucedida, mas o conteúdo da resposta indica um erro.
|
||||||
|
// Por exemplo, você pode mostrar uma mensagem de erro.
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(response) {
|
||||||
|
// Trate o caso em que a própria solicitação falhou.
|
||||||
|
// Por exemplo, você pode mostrar uma mensagem de erro.
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
function moveToNextFieldset() {
|
||||||
|
if (animating) return;
|
||||||
|
|
||||||
|
animating = true;
|
||||||
|
current_fs = $('.active').parent();
|
||||||
|
next_fs = $('.active').parent().next();
|
||||||
|
|
||||||
|
$("#progressbar li").eq($("fieldset").index(next_fs)).addClass("active");
|
||||||
|
|
||||||
|
next_fs.show();
|
||||||
|
current_fs.animate({
|
||||||
|
opacity: 0
|
||||||
|
}, {
|
||||||
|
step: function(now, mx) {
|
||||||
|
scale = 1 - (1 - now) * 0.2;
|
||||||
|
left = (now * 50) + "%";
|
||||||
|
opacity = 1 - now;
|
||||||
|
current_fs.css({
|
||||||
|
'transform': 'scale(' + scale + ')',
|
||||||
|
'position': 'absolute'
|
||||||
|
});
|
||||||
|
next_fs.css({
|
||||||
|
'left': left,
|
||||||
|
'opacity': opacity
|
||||||
|
});
|
||||||
|
},
|
||||||
|
duration: 800,
|
||||||
|
complete: function() {
|
||||||
|
current_fs.hide();
|
||||||
|
animating = false;
|
||||||
|
},
|
||||||
|
easing: 'easeInOutBack'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script> --}}
|
||||||
|
|
||||||
|
{{-- Script Articlado --}}
|
||||||
|
|
||||||
|
{{-- <script>
|
||||||
|
|
||||||
|
|
||||||
|
// Atribua a URL ao atributo formaction do botão
|
||||||
|
document.getElementById('btn-download-template').setAttribute('formaction', downloadUrl);
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
const tabelaExcel1 = document.getElementById('tabelaExcel1');
|
||||||
|
|
||||||
|
function handleFormSubmit(event) {
|
||||||
|
event.preventDefault(); // Previne o comportamento padrão do formulário
|
||||||
|
const inputFile = document.getElementById('inputDocumento').files[0];
|
||||||
|
const reader = new FileReader();
|
||||||
|
reader.readAsBinaryString(inputFile);
|
||||||
|
reader.onload = function() {
|
||||||
|
const fileData = reader.result;
|
||||||
|
const workbook = XLSX.read(fileData, {
|
||||||
|
type: 'binary'
|
||||||
|
});
|
||||||
|
const worksheet1 = workbook.Sheets[workbook.SheetNames[0]];
|
||||||
|
const tableData1 = XLSX.utils.sheet_to_json(worksheet1);
|
||||||
|
const tabelaHtml1 = criarTabelaHtml(tableData1);
|
||||||
|
const tabelaExcel1 = document.getElementById('tabelaExcel1');
|
||||||
|
if (tabelaExcel1 !== null) {
|
||||||
|
tabelaExcel1.innerHTML = tabelaHtml1;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function criarTabelaHtml(dados) {
|
||||||
|
|
||||||
|
const colunasObj = dados[2];
|
||||||
|
const colunasheader = Object.keys(colunasObj).map(key =>
|
||||||
|
colunasObj[key]);
|
||||||
|
|
||||||
|
console.log(dados);
|
||||||
|
|
||||||
|
const colunasHtml = colunasheader.map(coluna => `<th>${coluna}</th>`).join('');
|
||||||
|
|
||||||
|
const colunas = Object.keys(dados[2]);
|
||||||
|
|
||||||
|
const linhasHtml = dados
|
||||||
|
.slice(3)
|
||||||
|
.map(linha => {
|
||||||
|
const celulasHtml = colunas.map(coluna => {
|
||||||
|
const valor = linha[coluna] !== undefined ? linha[coluna] : 'NULL';
|
||||||
|
return `<td>${valor}</td>`;
|
||||||
|
}).join('');
|
||||||
|
return `<tr>${celulasHtml}</tr>`;
|
||||||
|
})
|
||||||
|
.join('');
|
||||||
|
|
||||||
|
// console.log()
|
||||||
|
return `
|
||||||
|
<table class="table table-bordered">
|
||||||
|
<thead>
|
||||||
|
<tr>${colunasHtml}</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
${linhasHtml}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
|
||||||
|
const form = document.querySelector('form');
|
||||||
|
form.addEventListener('submit', handleFormSubmit);
|
||||||
|
})();
|
||||||
|
</script> --}}
|
||||||
|
|
||||||
|
{{-- @endsection --}}
|
||||||
164
resources/views/test2.blade.php
Normal file
164
resources/views/test2.blade.php
Normal file
|
|
@ -0,0 +1,164 @@
|
||||||
|
@extends('Templates/templateAdmin')
|
||||||
|
|
||||||
|
@section('Main-content')
|
||||||
|
<div class="row justify-content-center">
|
||||||
|
|
||||||
|
<!-- Multiplos FieldSet -->
|
||||||
|
<div class="col-12" id="msform">
|
||||||
|
|
||||||
|
<div class="row justify-content-center">
|
||||||
|
<div class="card-body">
|
||||||
|
<!-- Progressbar -->
|
||||||
|
<ul id="progressbar" class="nav nav-pills flex-sm-row">
|
||||||
|
<li class="active flex-sm-fill">Project details</li>
|
||||||
|
<li class="flex-sm-fill">Articulated</li>
|
||||||
|
<li class="flex-sm-fill">Workstation</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Card details project -->
|
||||||
|
<fieldset>
|
||||||
|
<div class="card card-primary">
|
||||||
|
<div class="card-header">
|
||||||
|
<h3 class="card-title">Project Details</h3>
|
||||||
|
</div>
|
||||||
|
<!-- ./Card-header -->
|
||||||
|
|
||||||
|
<div class="card-body">
|
||||||
|
</div>
|
||||||
|
<!-- /.card-body -->
|
||||||
|
<div class="card-footer">
|
||||||
|
<div class="float-right">
|
||||||
|
<button type="submit" class="btn btn-primary">Save</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- ./Card card-Primary -->
|
||||||
|
|
||||||
|
<input type="button" name="previous" class="btn btn-primary previous float-left" value="Previous" />
|
||||||
|
<input type="button" name="next" class="btn btn-primary next float-right" value="Próximo" />
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<!-- ./Card details project -->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Card Articulado -->
|
||||||
|
<fieldset>
|
||||||
|
<div class="card card-primary">
|
||||||
|
<div class="card-header">
|
||||||
|
<h3 class="card-title">Project Details</h3>
|
||||||
|
</div>
|
||||||
|
<!-- ./Card-header -->
|
||||||
|
|
||||||
|
<div class="card-body">
|
||||||
|
</div>
|
||||||
|
<!-- /.card-body -->
|
||||||
|
<div class="card-footer">
|
||||||
|
<div class="float-right">
|
||||||
|
<button type="submit" class="btn btn-primary">Save</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- ./Card card-Primary -->
|
||||||
|
|
||||||
|
<input type="button" name="previous" class="btn btn-primary previous float-left" value="Previous" />
|
||||||
|
<input type="button" name="next" class="btn btn-primary next float-right" value="Próximo" />
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset>
|
||||||
|
<div class="card card-primary">
|
||||||
|
<div class="card-header">
|
||||||
|
<h3 class="card-title">Project Details</h3>
|
||||||
|
</div>
|
||||||
|
<!-- ./Card-header -->
|
||||||
|
|
||||||
|
<div class="card-body">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- /.card-body -->
|
||||||
|
<div class="card-footer">
|
||||||
|
<div class="float-right">
|
||||||
|
<button type="submit" class="btn btn-primary">Save</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- ./Card card-Primary -->
|
||||||
|
|
||||||
|
<input type="button" name="previous" class="btn btn-primary previous float-left" value="Previous" />
|
||||||
|
<input type="button" name="next" class="btn btn-primary next float-right" value="Próximo" />
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- Multiplos FieldSet -->
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
{{-- Script ProgressBar --}}
|
||||||
|
@section('scripts')
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
var activeFieldsetIndex =
|
||||||
|
"{{ session('activeFieldsetIndex') }}"; // Obtenha o índice do fieldset ativo da sessão
|
||||||
|
|
||||||
|
if (activeFieldsetIndex !== "") {
|
||||||
|
// Se activeFieldsetIndex não estiver vazio, mostre o fieldset correspondente
|
||||||
|
var fieldsets = $("fieldset");
|
||||||
|
fieldsets.hide(); // Esconda todos os fieldsets
|
||||||
|
$(fieldsets.get(activeFieldsetIndex)).show(); // Mostre o fieldset ativo
|
||||||
|
$("#progressbar li").eq(activeFieldsetIndex).addClass(
|
||||||
|
"active"); // Marque a progress bar correspondente como ativa
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
//jQuery time
|
||||||
|
var current_fs, next_fs, previous_fs; //fieldsets
|
||||||
|
var left, opacity, scale; //fieldset properties which we will animate
|
||||||
|
var animating; //flag to prevent quick multi-click glitches
|
||||||
|
|
||||||
|
$(".next").click(function() {
|
||||||
|
if (animating) return false;
|
||||||
|
animating = true;
|
||||||
|
|
||||||
|
current_fs = $(this).parent();
|
||||||
|
next_fs = $(this).parent().next();
|
||||||
|
|
||||||
|
$("#progressbar li").eq($("fieldset").index(next_fs)).addClass("active");
|
||||||
|
|
||||||
|
current_fs.animate({
|
||||||
|
opacity: 0
|
||||||
|
}, 800, function() {
|
||||||
|
current_fs.hide();
|
||||||
|
next_fs.show();
|
||||||
|
next_fs.css({
|
||||||
|
'opacity': 1
|
||||||
|
});
|
||||||
|
animating = false;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$(".previous").click(function() {
|
||||||
|
if (animating) return false;
|
||||||
|
animating = true;
|
||||||
|
|
||||||
|
current_fs = $(this).parent();
|
||||||
|
previous_fs = $(this).parent().prev();
|
||||||
|
|
||||||
|
$("#progressbar li").eq($("fieldset").index(current_fs)).removeClass("active");
|
||||||
|
|
||||||
|
current_fs.animate({
|
||||||
|
opacity: 0
|
||||||
|
}, 800, function() {
|
||||||
|
current_fs.hide();
|
||||||
|
previous_fs.show();
|
||||||
|
previous_fs.css({
|
||||||
|
'opacity': 1
|
||||||
|
});
|
||||||
|
animating = false;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
@endsection
|
||||||
273
routes/web.php
273
routes/web.php
|
|
@ -1,85 +1,38 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Route;
|
|
||||||
|
|
||||||
use App\Http\Controllers\FormController;
|
|
||||||
|
|
||||||
use Illuminate\Foundation\Auth\EmailVerificationRequest;
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Route;
|
||||||
use Illuminate\Support\Facades\Mail;
|
use Illuminate\Support\Facades\Mail;
|
||||||
|
|
||||||
use App\Http\Controllers\ForgotPasswordController;
|
|
||||||
|
|
||||||
use App\Http\Controllers\Auth\ResetPasswordController;
|
use App\Http\Controllers\Auth\ResetPasswordController;
|
||||||
|
|
||||||
use App\Http\Controllers\NewPasswordController;
|
|
||||||
use App\Http\Controllers\Auth\PasswordResetLinkController;
|
|
||||||
|
|
||||||
use App\Http\Controllers\userController;
|
|
||||||
use App\Http\Controllers\Pending_UserController;
|
|
||||||
|
|
||||||
use App\Http\Controllers\Auth\RegisteredUserController;
|
use App\Http\Controllers\Auth\RegisteredUserController;
|
||||||
|
|
||||||
use App\Http\Controllers\CustomRegistrationController;
|
use App\Http\Controllers\Auth\PasswordResetLinkController;
|
||||||
|
use Illuminate\Foundation\Auth\EmailVerificationRequest;
|
||||||
|
|
||||||
|
|
||||||
|
use App\Http\Controllers\CustomRegistrationController;
|
||||||
use App\Http\Controllers\CreateProjectController;
|
use App\Http\Controllers\CreateProjectController;
|
||||||
|
|
||||||
|
use App\Http\Controllers\ForgotPasswordController;
|
||||||
|
use App\Http\Controllers\FormController;
|
||||||
|
|
||||||
|
use App\Http\Controllers\NewPasswordController;
|
||||||
|
use App\Http\Controllers\userController;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Pending_UserController;
|
||||||
|
use App\Http\Controllers\ProjectoDatacontroller;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Route::get('/template', function () {
|
// Route::get('test',[CreateProjectController::class,'index'] )->name('test');
|
||||||
$filePath = public_path('templateExcel/FinalTemplate1.xlsx');
|
|
||||||
$fileName = 'Valves_Template.xlsx';
|
|
||||||
|
|
||||||
return response()->download($filePath, $fileName);
|
Route::get('test1', function(){
|
||||||
})->name('download');
|
return view('test2');
|
||||||
|
});
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Create Project
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Here is where you can register web routes for your application. These
|
|
||||||
| routes are loaded by the RouteServiceProvider and all of them will
|
|
||||||
| be assigned to the "web" middleware group. Make something great!
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
route::get('createProject', [CreateProjectController::class,'listCompanies'])->name('createProject');
|
|
||||||
|
|
||||||
route::post('createProject1',[CreateProjectController::class,'createProject'])->name('createProject1');
|
|
||||||
|
|
||||||
// route::get('testExcel', function(){
|
|
||||||
// return view('testExcel');
|
|
||||||
// });
|
|
||||||
|
|
||||||
|
|
||||||
Route::post('/create-equipament-project', [CreateProjectController::class,'createEquipamentProject'])->name('createEquipamentProject');
|
|
||||||
|
|
||||||
|
|
||||||
/* Api */
|
|
||||||
Route::get('/api/installations/', [CreateProjectController::class, 'getByUserNif']);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Route::post('/register', [CustomRegistrationController::class, 'store'])->name('register');
|
|
||||||
|
|
||||||
Route::get('/your-verification-route/{id}/{hash}', [UserController::class, 'yourVerificationMethod'])
|
|
||||||
->middleware(['auth', 'signed', 'throttle:6,1'])
|
|
||||||
->name('verification.verify');
|
|
||||||
|
|
||||||
|
|
||||||
Route::get('/receiveThisShit', function () {
|
|
||||||
return redirect()->route('test');
|
|
||||||
})->name('verification.notice');
|
|
||||||
|
|
||||||
|
|
||||||
Route::get('/testExcel', function(){
|
|
||||||
return view('createProject');
|
|
||||||
})->name('testExcel');
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -93,28 +46,6 @@
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Route::middleware(['auth', 'verified'])->group(function () {
|
|
||||||
|
|
||||||
|
|
||||||
// Rotas protegidas que exigem verificação de e-mail
|
|
||||||
|
|
||||||
Route::get('/', function () {
|
|
||||||
return view('Admin/index');
|
|
||||||
})->name('home');
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Create Users with Super Admin
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Here is where you can register web routes for your application. These
|
|
||||||
| routes are loaded by the RouteServiceProvider and all of them will
|
|
||||||
| be assigned to the "web" middleware group. Make something great!
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
});
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| User_Type (Super_Administrador)
|
| User_Type (Super_Administrador)
|
||||||
|
|
@ -127,6 +58,7 @@
|
||||||
Route::get('usersProfiles/{id}', [userController::class, 'UserProfile'])->name('usersProfiles');
|
Route::get('usersProfiles/{id}', [userController::class, 'UserProfile'])->name('usersProfiles');
|
||||||
Route::post('enviar-formulario', [FormController::class, 'enviarEmail'])->name('enviar.formulario');
|
Route::post('enviar-formulario', [FormController::class, 'enviarEmail'])->name('enviar.formulario');
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| CRUD - users
|
| CRUD - users
|
||||||
|
|
@ -136,13 +68,14 @@
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
Route::get('users/ListUsers', [userController::class, 'ListUsers'])->name('users.list');
|
Route::get('users/ListUsers', [userController::class, 'ListUsers'])->name('users.list');
|
||||||
|
Route::get('users/ListCompanies', [userController::class, 'ListCompanies'])->name('users.company');
|
||||||
|
|
||||||
Route::get('users/{id}', [userController::class, 'show'])->name('users.Show');
|
Route::get('users/{id}', [userController::class, 'show'])->name('users.Show');
|
||||||
Route::get('users/{id}/edit', [userController::class, 'edit'])->name('users.edit');
|
Route::get('users/{id}/edit', [userController::class, 'edit'])->name('users.edit');
|
||||||
Route::put('users/{user}', [userController::class, 'update'])->name('users.update');
|
Route::put('users/{user}', [userController::class, 'update'])->name('users.update');
|
||||||
Route::delete('users/{user}', [UserController::class, 'destroy'])->name('users.destroy');
|
Route::delete('users/{user}', [UserController::class, 'destroy'])->name('users.destroy');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Create Users with Super Admin
|
| Create Users with Super Admin
|
||||||
|
|
@ -154,18 +87,126 @@
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
Route::get('/CreateUsers', [Pending_UserController::class, 'ListPendingUsers'])->name('CreateUsers');
|
Route::get('/CreateUsers', [Pending_UserController::class, 'ListPendingUsers'])->name('CreateUsers');
|
||||||
|
|
||||||
Route::get('/CreateUsers/{id}', [Pending_UserController::class, 'ShowFormUser'])->name('ShowPendingUser');
|
Route::get('/CreateUsers/{id}', [Pending_UserController::class, 'ShowFormUser'])->name('ShowPendingUser');
|
||||||
|
Route::post('formulario/receive', [Pending_UserController::class, 'store'])->name('criarUser');
|
||||||
Route::get('formulario', function () {
|
Route::get('formulario', function () {
|
||||||
return view('email/FormAdmin');
|
return view('email/FormAdmin');
|
||||||
})->name('formulario');
|
})->name('formulario');
|
||||||
|
|
||||||
Route::post('formulario/receive', [Pending_UserController::class, 'store'])->name('criarUser');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Create Users with Super Admin
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here is where you can register web routes for your application. These
|
||||||
|
| routes are loaded by the RouteServiceProvider and all of them will
|
||||||
|
| be assigned to the "web" middleware group. Make something great!
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
Route::middleware(['auth', 'verified'])->group(function () {
|
||||||
|
|
||||||
|
|
||||||
|
// Rotas protegidas que exigem verificação de e-mail
|
||||||
|
|
||||||
|
Route::get('/', function () {
|
||||||
|
return view('Admin/index');
|
||||||
|
})->name('home');
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Template Excel
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here is where you can register web routes for your application. These
|
||||||
|
| routes are loaded by the RouteServiceProvider and all of them will
|
||||||
|
| be assigned to the "web" middleware group. Make something great!
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
Route::get('/template', function () {
|
||||||
|
$filePath = public_path('templateExcel/FinalTemplate1.xlsx');
|
||||||
|
$fileName = 'Valves_Template.xlsx';
|
||||||
|
|
||||||
|
return response()->download($filePath, $fileName);
|
||||||
|
})->name('download');
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Create Project
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here is where you can register web routes for your application. These
|
||||||
|
| routes are loaded by the RouteServiceProvider and all of them will
|
||||||
|
| be assigned to the "web" middleware group. Make something great!
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
Route::get('createProject', [CreateProjectController::class,'listCompanies'])->name('createProject');
|
||||||
|
|
||||||
|
Route::post('createProject1',[CreateProjectController::class,'createProject'])->name('createProject1');
|
||||||
|
|
||||||
|
Route::post('/create-equipament-project', [CreateProjectController::class,'createEquipamentProject'])->name('createEquipamentProject');
|
||||||
|
|
||||||
|
/* Api */
|
||||||
|
Route::get('/api/installations/', [CreateProjectController::class, 'getByUserNif']);
|
||||||
|
|
||||||
|
|
||||||
|
Route::post('/register', [CustomRegistrationController::class, 'store'])->name('register');
|
||||||
|
|
||||||
|
Route::get('/your-verification-route/{id}/{hash}', [UserController::class, 'yourVerificationMethod'])
|
||||||
|
->middleware(['auth', 'signed', 'throttle:6,1'])
|
||||||
|
->name('verification.verify');
|
||||||
|
|
||||||
|
Route::get('/receiveThisShit', function () {
|
||||||
|
return redirect()->route('test');
|
||||||
|
})->name('verification.notice');
|
||||||
|
|
||||||
|
|
||||||
|
Route::get('/testExcel', function(){
|
||||||
|
return view('createProjectExcel');
|
||||||
|
})->name('testExcel');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| CRUD -Equipaments
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here is where you can register web routes for your application. These
|
||||||
|
| routes are loaded by the RouteServiceProvider and all of them will
|
||||||
|
| be assigned to the "web" middleware group. Make something great!
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
Route::get('manageAssets',[ProjectoDatacontroller::class,'ManageAssets'])->name('manageAssets');
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| CRUD -Instalation
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here is where you can register web routes for your application. These
|
||||||
|
| routes are loaded by the RouteServiceProvider and all of them will
|
||||||
|
| be assigned to the "web" middleware group. Make something great!
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
Route::get('manageAssets',[ProjectoDatacontroller::class,'ManageAssets'])->name('manageAssets');
|
||||||
|
|
||||||
|
// Mostrar instalacao click
|
||||||
|
Route::get('units/{id}',[ProjectoDatacontroller::class,'showUnit'])->name('showUnit');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Rotas protegidas que exigem verificação de e-mail e user_type Super_Admin
|
// Rotas protegidas que exigem verificação de e-mail e user_type Super_Admin
|
||||||
// Route::get('/register', [RegisteredUserController::class, 'create'])
|
// Route::get('/register', [RegisteredUserController::class, 'create'])
|
||||||
// ->name('register');
|
// ->name('register');
|
||||||
|
|
@ -206,3 +247,53 @@
|
||||||
// Route::get('/email/notice', function (EmailVerificationRequest $request) {
|
// Route::get('/email/notice', function (EmailVerificationRequest $request) {
|
||||||
// return view('auth.verify-email');
|
// return view('auth.verify-email');
|
||||||
// })->middleware(['auth'])->name('verification.notice');
|
// })->middleware(['auth'])->name('verification.notice');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// <table class="table table-bordered">
|
||||||
|
// <thead>
|
||||||
|
// <tr>
|
||||||
|
// <th>Equipment ID</th>
|
||||||
|
// <th>Factory ID</th>
|
||||||
|
// <th>Equipament Type ID</th>
|
||||||
|
// <th>Tag</th>
|
||||||
|
// <th>equipment_description</th>
|
||||||
|
// <th>Serial Number</th>
|
||||||
|
// <th>Brand</th>
|
||||||
|
// <th>Model</th>
|
||||||
|
// <th>Is Active</th>
|
||||||
|
// <th>Attribute Description</th>
|
||||||
|
// <th>Attribute Value</th>
|
||||||
|
// </tr>
|
||||||
|
// </thead>
|
||||||
|
// <tbody>
|
||||||
|
// @foreach ($equipments as $equipment)
|
||||||
|
// <tr>
|
||||||
|
// <td>{{ $equipment->equipment_id }}</td>
|
||||||
|
// <td>{{ $equipment->factory_id }}</td>
|
||||||
|
// <td>{{ $equipment->equipament_type_id }}</td>
|
||||||
|
// <td>{{ $equipment->tag }}</td>
|
||||||
|
// <td>{{ $equipment->equipment_description }}</td>
|
||||||
|
// <td>{{ $equipment->serial_number }}</td>
|
||||||
|
// <td>{{ $equipment->brand }}</td>
|
||||||
|
// <td>{{ $equipment->model }}</td>
|
||||||
|
// <td>{{ $equipment->Is_active }}</td>
|
||||||
|
// @if (isset($equipment->specific_attributes))
|
||||||
|
// @foreach ($equipment->specific_attributes as $attribute)
|
||||||
|
// @if ($loop->first)
|
||||||
|
// <td>{{ $attribute['description'] }}</td>
|
||||||
|
// <td>{{ $attribute['value'] }}</td>
|
||||||
|
// @else
|
||||||
|
// </tr><tr>
|
||||||
|
// <td colspan="9"></td>
|
||||||
|
// <td>{{ $attribute['description'] }}</td>
|
||||||
|
// <td>{{ $attribute['value'] }}</td>
|
||||||
|
// @endif
|
||||||
|
// @endforeach
|
||||||
|
// @else
|
||||||
|
// <td colspan="2"></td>
|
||||||
|
// @endif
|
||||||
|
// </tr>
|
||||||
|
// @endforeach
|
||||||
|
// </tbody>
|
||||||
|
// </table>
|
||||||
Loading…
Reference in New Issue
Block a user