First part of the implementation of the work in progress

This commit is contained in:
ygbanzato 2023-07-15 21:39:24 +01:00
parent 599fd6bf7a
commit 9d510ab765
20 changed files with 1317 additions and 588 deletions

View File

@ -332,7 +332,7 @@ public function CreateNewEquipmentFromPendingEquipment(Request $request, $id)
public function processStep1(Request $request)
{
dd($request);
// dd($request);
// Validação...
$installationId = $request->input('installation_id');
@ -366,6 +366,7 @@ public function processStep1(Request $request)
$project->date_started = $request->input('date_started');
$project->plant_id = $installationId;
$project->order_project = 1;
$project->save();

View File

@ -31,7 +31,6 @@ public function store(Request $request): RedirectResponse
// Chame sendEmailVerificationNotification para enviar o e-mail de verificação
$user->sendEmailVerificationNotification();
// // Auth::login($user);
$pendingUser = PendingUser::where('pending_email', $user->email)->first();
if ($pendingUser) {

View File

@ -0,0 +1,91 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\CompanyProject;
use App\Models\ConstructionWorkstation;
use App\Models\Equipment;
use App\Models\EquipmentType;
use App\Models\OrderEquipmentTasks;
use Yajra\DataTables\Facades\DataTables;
class ExecutionProjectController extends Controller
{
public function receiveExecutionProject($ProjectId)
{
$DatasProject = CompanyProject::find($ProjectId);
$equipmentsTypes = EquipmentType::all();
// return view('projectsClients/executionProject')
return view('projectsClients/executionProject')
->with('DatasProject', $DatasProject)
->with('equipmentsTypes', $equipmentsTypes);
}
public function receiveWorkstationExecutionProject($receiveNumberProject)
{
$model = ConstructionWorkstation::where('company_projects_id', $receiveNumberProject)->with('workstationsAssociationTasks');
return DataTables::of($model)
// ->addColumn('workstations_Association_Tasks', function ($row) {
// return $row->workstationsAssociationTasks->pluck('elemental_tasks_id')->implode('-');
// })
->toJson();
}
public function receiveEquipmentIdForShowModal($EquipmentID)
{
$equipment = Equipment::find($EquipmentID);
$task_codes = $equipment->orderEquipmentTasks->map(function ($task) {
return $task->elementalTask->elemental_tasks_code;
})->toArray();
return response()->json(['task_codes' => $task_codes]);
}
public function receiveEquipmentsExecutionProject($receiveNumberProject)
{
// Recebe os dados vindos da funcao 'data' criada na view
$equipment_type_id = request('equipment_type_id');
$ambits_id = request('ambits_id');
//Recebe sempre apenas os equipamentos relacionados a obra
$model = Equipment::where('company_projects_id', $receiveNumberProject);
// Caso 'equipment_type_id' seja '#', mostra todos os equipamentos
if ($equipment_type_id == '#') {
$model = Equipment::query()->with(['equipmentType', 'unit', 'equipmentAssociationAmbit.ambitsEquipment']);
}
// Caso 'equipment_type_id' não seja '#', filtra os equipamentos por tipo e ambito (caso 'ambits_id' não seja '#')
else {
$equipment_type_id = intval($equipment_type_id);
$model = Equipment::where('equipments.equipment_type_id', $equipment_type_id)
->join('equipment_association_ambits', 'equipments.equipment_id', '=', 'equipment_association_ambits.equipment_id')
->with(['equipmentType', 'unit', 'equipmentAssociationAmbit.ambitsEquipment']);
if ($ambits_id != '#') {
$ambits_id = intval($ambits_id);
$model->where('equipment_association_ambits.ambits_id', $ambits_id);
}
}
return DataTables::of($model)
->addColumn('equipment_type', function ($row) {
return $row->equipmentType->equipment_type_name;
})
->addColumn('Ambits', function ($row) {
return $row->equipmentAssociationAmbit->ambitsEquipment->ambits_description;
})
->addColumn('order_tasks', function ($row) {
return $row->orderEquipmentTasks->map(function ($task) {
return $task->elementalTask->elemental_tasks_code;
})->implode('-');
})
->toJson();
}
}

View File

@ -34,7 +34,7 @@ public function PreparedProject($ProjectId)
->get();
return view('projectsClients/preparedProject')
->with('equipmentsProjects', $equipmentsProjects)
// ->with('equipmentsProjects', $equipmentsProjects)
->with('equipmentsTypes', $equipmentsTypes)
->with('units', $checkUnits)
->with('numberProject', $numberProject);

View File

@ -15,5 +15,12 @@ class ConstructionWorkstation extends Model
protected $primaryKey = 'id_workstations';
// public function workstationsAssociationTasks()
// {
// return $this->hasMany(WorkstationsAssociationTasks::class, 'id_workstations', 'id_workstations');
// }
public function workstationsAssociationTasks()
{
return $this->hasMany(WorkstationsAssociationTasks::class, 'id_workstations');
}
}

View File

@ -0,0 +1,21 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class ElementalTasks extends Model
{
use HasFactory;
public $timestamps = false;
protected $table = 'elemental_tasks';
protected $primaryKey = 'elemental_tasks_id';
public function orderEquipmentTasks()
{
return $this->hasMany(OrderEquipmentTasks::class,'elemental_tasks_id','elemental_tasks_id');
}
}

View File

@ -16,4 +16,9 @@ public function equipment()
{
return $this->belongsTo(Equipment::class, 'equipment_id', 'equipment_id');
}
public function elementalTask()
{
return $this->belongsTo(ElementalTasks::class,'elemental_tasks_id','elemental_tasks_id');
}
}

View File

@ -12,5 +12,14 @@ class WorkstationsAssociationTasks extends Model
public $timestamps = false;
protected $table = 'workstations_association_tasks';
// public function constructionWorkstation()
// {
// return $this->belongsTo(ConstructionWorkstation::class, 'equipment_id', 'equipment_id');
// }
public function constructionWorkstation()
{
return $this->belongsTo(ConstructionWorkstation::class, 'id_workstations');
}
}

View File

@ -11,12 +11,16 @@
use Illuminate\Support\Facades\RateLimiter;
use Illuminate\Support\ServiceProvider;
use App\Models\User;
use Illuminate\Support\Facades\Hash;
use Laravel\Fortify\Contracts\ResetPasswordViewResponse;
use App\Http\Controllers\Auth\ResetPasswordController;
use App\Http\Controllers\Auth\PasswordResetLinkController;
// use App\http\Controllers\userController;
use Laravel\Fortify\Fortify;
@ -51,23 +55,32 @@ public function boot(): void
return view('auth.verify-email');
});
// Fortify::authenticateUsing(function (Request $request) {
// return UserController::authenticateAndRedirect($request);
// });
Fortify::authenticateUsing(function (Request $request) {
$email = $request->input('email');
// Verifica se "@" já está presente no e-mail. Se não, adiciona "@isptgroup.com" ao final.
if (!str_contains($email, '@')) {
$email .= '@isptgroup.com';
}
$password = $request->input('password');
$user = User::where('email', $email)->first();
if ($user && Hash::check($password, $user->password)) {
return $user;
}
});
Fortify::createUsersUsing(CreateNewUser::class);
Fortify::updateUserProfileInformationUsing(UpdateUserProfileInformation::class);
Fortify::updateUserPasswordsUsing(UpdateUserPassword::class);
RateLimiter::for('login', function (Request $request) {
$email = (string) $request->email;
return Limit::perMinute(5)->by($email . $request->ip());
return Limit::perMinute(5)->by($email . $request->ip());
});
RateLimiter::for('two-factor', function (Request $request) {

View File

@ -0,0 +1,78 @@
body{
overflow-x: hidden;
}
#employer-post-new-job .res-steps-container .res-steps {
width: 25%;
text-align: center;
float: left;
cursor: pointer
}
#employer-post-new-job .res-steps-container .res-steps .res-step-bar {
-webkit-border-radius: 50% !important;
-moz-border-radius: 50% !important;
-ms-border-radius: 50% !important;
border-radius: 50% !important;
background: #0aa7e1;
display: inline-block;
height: 40px;
width: 40px;
margin-top: 10px;
text-align: center;
color: #fff;
padding-top: 7px;
font-size: 20px
}
#employer-post-new-job .res-steps-container .res-steps .res-progress-title {
text-align: center;
font-size: 15px;
padding-top: 10px;
display: block
}
#employer-post-new-job .res-steps-container .res-steps .res-progress-bar {
height: 5px;
background: #0aa7e1;
width: 50%;
margin: -22px 0 0 50%;
float: left
}
#employer-post-new-job .res-steps-container .res-step-two .res-progress-bar, #employer-post-new-job .res-steps-container .res-step-three .res-progress-bar, #employer-post-new-job .res-steps-container .res-step-four .res-progress-bar {
width: 100%;
margin-left: 0%
}
#employer-post-new-job .res-steps-container .res-step-four .res-progress-bar {
width: 50%;
margin-right: 50%
}
#employer-post-new-job .res-step-form {
border: 1px solid #d2d2d2;
box-shadow: 0px 6px 4px -2px silver;
position: absolute
}
#employer-post-new-job .res-step-form h3 {
margin: 10px 0;
color: #0aa7e1;
font-size: 18px
}
#employer-post-new-job .res-step-form .form-horizontal label {
font-weight: normal
}
#employer-post-new-job .res-form-two, #employer-post-new-job .res-form-three, #employer-post-new-job .res-form-four .res-form-five{
left: 150%
}
#employer-post-new-job .active .res-step-bar {
background: #f19b20 !important
}
#employer-post-new-job .active .res-progress-title {
color: #0aa7e1
}

View File

@ -157,7 +157,7 @@ class="btn btn-tool">
<div class="card-header">
<h5 class="card-title">{{ $project->company_project_description }}</h5>
<div class="card-tools">
<a href="{{ route('test2', ['id' => $project->company_projects_id]) }}"
<a href="{{ route('ExecutionProject', ['ProjectId' => $project->company_projects_id]) }}"
class="btn btn-tool">
<i class="fa-solid fa-eye" style="color:rgb(62, 62, 62)"></i>
</a>

View File

@ -6,6 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="csrf-token" content="{{ csrf_token() }}">
<link rel="stylesheet" href="{{ asset('StyleAdmin/css/styleProgressBar.css') }}">
<!-- Google Font: Source Sans Pro -->
@ -62,16 +63,108 @@
.spin {
animation: spin 1s infinite linear;
}
@keyframes spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
</style>
/* ***************************** */
.accordion {
overflow-anchor: none;
}
.accordion>.card {
overflow: hidden;
}
.accordion>.card:not(:last-of-type) {
border-bottom: 0;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
.accordion>.card:not(:first-of-type) {
border-top-left-radius: 0;
border-top-right-radius: 0;
}
.accordion>.card>.card-header {
border-radius: 0;
margin-bottom: 0;
}
/* Nome de baixo do circulo */
.steps {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 2rem;
position: relative;
}
/* Nome dentro do circulo de ainda não de chegar o progress bar */
.step-button {
width: 50px;
height: 50px;
border-radius: 50%;
border: none;
background-color: var(--prm-gray);
transition: .4s;
display: flex;
align-items: center;
text-align: center;
justify-content: center;
}
.step-button[aria-expanded="true"] {
width: 60px;
height: 60px;
background-color: var(--prm-color);
color: #fff;
}
.done {
background-color: var(--prm-color);
color: #fff;
}
.step-item {
z-index: 10;
text-align: center;
}
#progress {
-webkit-appearance: none;
position: absolute;
width: 95%;
z-index: 5;
height: 10px;
margin-left: 18px;
margin-bottom: 18px;
}
/* to customize progress bar */
#progress::-webkit-progress-value {
background-color: var(--prm-color);
transition: .5s ease;
}
#progress::-webkit-progress-bar {
background-color: var(--prm-gray);
}
</style>
</head>

View File

@ -37,7 +37,7 @@
@csrf
<div class="input-group mb-3">
<input type="email" name="email" class="form-control" placeholder="Utilizador" id="email" placeholder="email">
<input type="text" name="email" class="form-control" placeholder="Utilizador" id="email" placeholder="email">
{{-- <input type="text" name="user_nif" id="user_nif" class="form-control" value="{{ old('user_nif') }}" required autofocus> --}}
<div class="input-group-append">
<div class="input-group-text">

View File

@ -1,13 +1,655 @@
@extends('Templates/templateAdmin')
@section('Main-content')
<!-- Content Header (Page header) -->
<section class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1>{{ $DatasProject->company_project_description }}</h1>
<input type="hidden" value="{{ $DatasProject->company_projects_id }}" id="receiveNumberProject">
</div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item"><a href="{{ route('home') }}">Dashboard</a></li>
<li class="breadcrumb-item"><a href="./preparadas.html">Em Execucao</a></li>
<li class="breadcrumb-item active">{{ $DatasProject->company_project_description }}</li>
</ol>
</div><!-- /.col -->
</div>
</div><!-- /.container-fluid -->
</section>
<!-- /.content-header -->
<!-- Main content -->
<section class="content">
<div class="container-fluid">
<div class="row justify-content-center">
<div class="col-md-12">
<!-- Card box criar instalção -->
<form>
<div class="row">
<div class="col-sm-6" id="BotaoDetalhesObra">
<a href="#" type="button" class="btn btn-block bg-gradient-primary btn-lg">
Detalhes da Obra</a>
</div>
<div class="col-sm-6" id="BotaoArticulado">
<a href="#" type="button"
class="btn btn-block bg-gradient-primary btn-lg">Articulado</a>
</div>
<div class="col-sm-6" id="BotaoPostosDeTrabalho">
<a href="#" type="button" class="btn btn-block bg-gradient-primary btn-lg">Postos de
Trabalho</a>
</div>
</div>
<br><br>
<div class="card card-primary" id="CardDetalhesObra">
<div class="card-header">
<h3 class="card-title">Detalhes da Obra</h3>
<div class="card-tools">
</div>
<!-- /.card-tools -->
</div>
<!-- /.card-header -->
<div class="card-body p-0">
<table class="table table-striped text-center">
<tbody>
<tr>
<td>Descrição da obra:</td>
<td>{{ $DatasProject->company_project_description }}</td>
</tr>
<tr>
<td>N.ºobra ISPT:</td>
<td>{{ $DatasProject->project_ispt_number }}</td>
</tr>
<tr>
<td>Resp.ISPT:</td>
<td>{{ $DatasProject->project_ispt_responsible }}</td>
</tr>
<tr>
<td>Cliente :</td>
<td>Cliente1</td>
</tr>
<tr>
<td>N.ºobra Cliente :</td>
<td>{{ $DatasProject->project_company_number }}</td>
</tr>
<tr>
<td>Resp.Cliente:</td>
<td>{{ $DatasProject->project_company_responsible }}</td>
</tr>
<tr>
<td>Obra Iniciada em :</td>
<td>{{ $DatasProject->date_started }}</td>
</tr>
</tbody>
</table>
</div>
<!-- /.card-body -->
<div class="card-footer">
<div class="float-right">
{{-- <a href="#" type="button" class="btn btn-primary">Editar</a> --}}
<h1>test</h1>
<ul id="myList">
<!-- Itens da lista serão gerados dinamicamente aqui -->
</ul>
</div>
</div>
</div>
<!-- /.card -->
</form>
<!-- /.Card box criar instalção -->
<!-- Card box criar equipamentos -->
<form>
<!-- Articulado -->
<div class="card card-primary" id="CardArticuladoObra">
<div class="card-header">
<h3 class="card-title">Articulado</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">
<!-- Table articulado de obra -->
<div class="card">
<div class="card-header">
<h3 class="card-title">Equipamentos da obra</h3>
</div>
<!-- /.card-header -->
<div class="card-body">
<div class="table-responsive">
<div class="row text-center">
<div class="form-group col-sm-3">
<label>Tipo de Equipamento </label>
<select id="tipo_valvulasList" name="equipmentTypeId"
class="form-control">
<option value='#' selected>Mostrar Todos</option>
@foreach ($equipmentsTypes as $equipmentsType)
<option value="{{ $equipmentsType->equipment_type_id }}">
{{ $equipmentsType->equipment_type_name }}</option>
@endforeach
</select>
</div>
<div class="col-sm-3">
<div class="form-group">
<label>Ambitos </label>
<select class="form-control" name="EquipmentAmbit"
id="AmbitsEquipments_list" required>
<option value="#" hidden>Mostrar Todos</option>
</select>
</div>
</div>
<div class="col-sm-3">
<div class="form-group">
<label>Inspeção</label>
<select id="inspecValvula" class="form-control">
<option value="#">Mostrar Todos</option>
<option value="Sim">Sim </option>
<option value="Nao">Nao </option>
</select>
</div>
</div>
</div>
<br>
<table id="TableExecutionProject" class="table table-bordered table-striped">
<thead>
<tr>
<th>Tag</th>
<th>Tipo Equipamento</th>
<th>Ambito</th>
<th>Tarefas</th>
<th>Tarefa Atual</th>
<th>Data Entrada</th>
<th>Data Conclusao</th>
<th>Inspecao</th>
<th>Detalhes</th>
</tr>
</thead>
</table>
<!-- /. Table-->
</div>
<!--/table obra-->
</div>
<!-- /.card-body -->
</div>
<!-- ./card -->
</div>
{{-- card-body --}}
<!-- TEM DE TER FOOTER -->
</div>
<!--/.CardArticuladoObra -->
</form>
<!-- /.card -->
<!-- /.Card box criar equipamentos -->
<form>
<div class="card card-primary" id="CardPostosDeTrabalhoObra">
<div class="card-header">
<h3 class="card-title">Postos de Trabalho</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">
<!-- Criar tarefa -->
<div class="card card-primary collapsed-card">
<!-- /.card-header -->
<div class="card-body">
<div class="card ">
<div class="form-group col-md-12">
<div class="card">
<div class="form-group">
<label>Selecione o Numero de Postos Pretendidos :
</label>
<input class="form-control" type="number" id="numberPosts">
</div>
</div>
<!-- <p id="receiveNumberPosts"></p> -->
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Postos de Trabalho</th>
</tr>
</thead>
<tbody id="receiveNumberPosts">
<!-- Vai receber o Numero de Oficinas -->
</tbody>
</table>
</div>
</div>
</div>
<!-- /.card-body -->
</div>
<!--/Criar tarefa-->
<div class="card">
<div class="card-header">
<h3 class="card-title">Listas de Postos de Obra</h3>
</div>
<div class="card-body">
<div class="table-responsive">
<table id="TableExecutionProjectWorkstation"
class="table table-bordered table-striped">
<thead>
<tr>
<th>Postos de Trabalho</th>
<th>Nome Posto</th>
<th>Tarefas Elementares</th>
<th>Tarefas Complementares</th>
</tr>
</thead>
</table>
</div>
<!--/articulado de obra-->
</div>
<!-- /.card-body -->
</div>
<!-- modal Remover -->
<!-- /.card -->
</div>
<!-- /.card-body -->
</form>
</div>
</div>
</div>
</section>
<!-- ./content -->
{{-- Modal-showProgressEquipment --}}
<div class="modal fade" id="modal-showProgressEquipment" tabindex="-1" role="dialog"
aria-labelledby="ModalTransferForArticulated" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="ModalTransferForArticulatedLabel">Mudar Projeto para Articulado</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<h1 id="equipmentId"></h1>
<h2 id="task_codes"></h2>
<section id="employer-post-new-job">
<div class="row">
<div class="container">
<div class="row">
<div class="col-xs-10 col-xs-offset-1" id="container">
<div class="res-steps-container">
<div class="res-steps res-step-one active" data-class=".res-form-one">
<div class="res-step-bar">1</div>
<div class="res-progress-bar"></div>
<div class="res-progress-title">Add Title & Description 1</div>
</div>
<div class="res-steps res-step-two" data-class=".res-form-two">
<div class="res-step-bar">2</div>
<div class="res-progress-bar"></div>
<div class="res-progress-title">Add Title & Description 2</div>
</div>
<div class="res-steps res-step-three" data-class=".res-form-three">
<div class="res-step-bar">3</div>
<div class="res-progress-bar"></div>
<div class="res-progress-title">Add Title & Description 3</div>
</div>
<div class="res-steps res-step-four" data-class=".res-form-four">
<div class="res-step-bar">4</div>
<div class="res-progress-bar"></div>
<div class="res-progress-title">Add Title & Description 4</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Fechar</button>
</div>
</div>
</div>
</div>
{{-- ./Modal-showProgressEquipment --}}
@endsection
@section('scriptsTemplateAdmin')
<script type="text/javascript">
$(document).ready(function() {
//Cards das div : Destricao - Articulado - Postos de Trabalho
$("#CardArticuladoObra").hide();
$("#CardPostosDeTrabalhoObra").hide();
//Botoes : Destricao - Articulado - Postos de Trabalho
$('#BotaoDetalhesObra').hide();
// $('#BotaoArticulado').hide();
// $('BotaoPostosDeTrabalho').hide();
$('#BotaoArticulado').on('click', function() {
// Mostra o Card do Articulado e o Botao de detalhes
$('#CardArticuladoObra').show();
$("#BotaoDetalhesObra").show();
$('#BotaoPostosDeTrabalho').show();
$('#BotaoArticulado').hide();
$("#CardPostosDeTrabalhoObra").hide();
$("#CardDetalhesObra").hide();
});
$('#BotaoDetalhesObra').on('click', function() {
// Mostra o Card do Articulado e o Botao de detalhes
$('#CardDetalhesObra').show();
$("#BotaoArticulado").show();
$('#BotaoPostosDeTrabalho').show();
$('#BotaoDetalhesObra').hide();
$("#CardPostosDeTrabalhoObra").hide();
$("#CardArticuladoObra").hide();
});
$('#BotaoPostosDeTrabalho').on('click', function() {
// Mostra o Card do Articulado e o Botao de detalhes
$('#CardPostosDeTrabalhoObra').show();
$("#BotaoArticulado").show();
$("#BotaoDetalhesObra").show();
$('#BotaoPostosDeTrabalho').hide();
$("#CardDetalhesObra").hide();
$("#CardArticuladoObra").hide();
});
})
</script>
<script type="Text/javascript">
$(document).ready(function() {
$('#TableExecutionProjectWorkstation').DataTable({
autoWidth: false,
processing: true,
serverSide: true,
ajax: {
url: '/api/receiveWorkstationExecutionProject/' + $('#receiveNumberProject').val()
},
columns: [{
data: 'name_workstations',
name: 'name_workstations'
},
{
data: 'nomenclature_workstation',
name: 'nomenclature_workstation'
}
// {
// data: 'workstations_Association_Tasks',
// name: 'workstations_Association_Tasks'
// }
]
})
})
</script>
@endsection
<script>
$(document).ready(function() {
$('#TableExecutionProject').DataTable({
autoWidth: false,
processing: true,
serverSide: true,
ajax: {
url: '/api/receiveEquipmentsExecutionProject/' + $('#receiveNumberProject').val(),
data: function(d) {
d.equipment_type_id = $('#tipo_valvulasList').val();
d.ambits_id = $('#AmbitsEquipments_list').val();
},
},
columns: [{
data: 'equipment_tag',
name: 'equipment_tag'
},
{
data: 'equipment_type',
name: 'equipment_type'
},
{
data: 'Ambits',
name: 'Ambits'
},
{
data: 'order_tasks',
name: 'order_tasks'
},
{
data: 'equipment_id',
name: 'equipment_id',
render: function(data, type, row) {
return '<a href="#" data-toggle="modal" data-target="#modal-showProgressEquipment" data-equipment-id="' +
data + '"><i class="fa-solid fa-eye text-secondary"></i> </a>';
}
}
],
rowId: 'equipment_id'
});
// Scripts para que com base no recebido , ele atualiza a pagina automaticamente
$('#tipo_valvulasList').on('change', function() {
// Atualiza a tabela quando o valor selecionado no select de tipo de válvulas for alterado
$('#TableExecutionProject').DataTable().ajax.reload();
});
$('#AmbitsEquipments_list').on('change', function() {
// Atualiza a tabela quando o valor selecionado no select de tipo de válvulas for alterado
$('#TableExecutionProject').DataTable().ajax.reload();
});
$(document).on('click', '[data-toggle="modal"]', function() {
var equipmentId = $(this).data('equipment-id');
$('#equipmentId').text(equipmentId);
});
});
</script>
<script>
$(document).ready(function() {
$('#tipo_valvulasList').on('change', function() {
var equipmentTypeID = $(this).val();
if (equipmentTypeID) {
$.ajax({
url: '/api/ambits/prepared' + equipmentTypeID,
type: 'GET',
success: function(data) {
$('#AmbitsEquipments_list').empty(); // Limpar o select de ambits
$('#AmbitsEquipments_list').append(
'<option value="#" selected>Mostrar Todos</option>'
); // Opção para mostrar todos
$('#AmbitsEquipments_list').append(
'<option value="" hidden>Selecionar Tipo de Ambito...</option>'
);
$.each(data, function(key, value) {
$('#AmbitsEquipments_list').append('<option value="' +
value.ambits_id + '">' + value
.ambits_description + '</option>');
});
}
});
} else {
$('#AmbitsEquipments_list')
.empty(); // Limpar o select de ambits se não há tipo de equipamento selecionado
$('#AmbitsEquipments_list').append(
'<option value="#" hidden>Mostrar Todos</option>');
}
});
});
</script>
<script>
$('#modal-showProgressEquipment').on('shown.bs.modal', function(event) {
var button = $(event.relatedTarget); // Botão que acionou o modal
var equipmentId = button.data(
'equipment-id'); // Extrai o ID do equipamento dos atributos de dados do botão
$.ajax({
url: '/ReceiveEquipmentIdForShowModal/' + equipmentId,
type: 'GET',
success: function(data) {
// Aqui, você pode preencher os campos da modal com os dados retornados
$('#equipmentId').text(data.id);
var task_codes = data.task_codes;
console.log(task_codes);
createListItems(task_codes);
}
});
});
</script>
<script>
function createListItems(task_codes) {
// Limpar quaisquer itens de lista anteriores
$('#myList').empty();
// Criar e inserir itens de lista dinamicamente
for (var i = 0; i < task_codes.length; i++) {
var listItem = $('<li>', {
text: task_codes[i]
});
$('#myList').append(listItem);
}
}
</script>
<script>
$(document).ready(function() {
var steps = ['.res-step-one', '.res-step-two', '.res-step-three', '.res-step-four'];
var i = 1;
$(".res-step-form .res-btn-orange").click(function() {
var getClass = $(this).attr('data-class');
$(".res-steps").removeClass('active');
$(steps[i]).addClass('active');
i++;
if (getClass != ".res-form-four") {
$(getClass).animate({
left: '-150%'
}, 500, function() {
$(getClass).css('left', '150%');
});
$(getClass).next().animate({
left: '0%'
}, 500, function() {
$(this).css('display', 'block');
});
}
});
/* step back */
$(".res-step-form .res-btn-gray").click(function() {
var getClass = $(this).attr('data-class');
$(".res-steps").removeClass('active');
i--;
$(steps[i - 1]).addClass('active');
$(getClass).prev().css('left', '-150%')
$(getClass).animate({
left: '150%'
}, 500);
$(getClass).prev().animate({
left: '0%'
}, 500)
});
/* click from top bar steps */
$('.res-step-one').click(function() {
if (!$(this).hasClass('active')) {
$(".res-steps").removeClass('active');
i = 0;
$(steps[i]).addClass('active');
i++;
$('.res-form-one').css('left', '-150%');
$('.res-form-two, .res-form-three, .res-form-four').animate({
left: '150%'
}, 500);
$('.res-form-one').animate({
left: '0%'
}, 500);
}
});
$('.res-step-two').click(function() {
if (!$(this).hasClass('active')) {
$(".res-steps").removeClass('active');
i = 1;
$(steps[i]).addClass('active');
i++;
$('.res-form-two').css('left', '-150%');
$('.res-form-one, .res-form-three, .res-form-four').animate({
left: '150%'
}, 500);
$('.res-form-two').animate({
left: '0%'
}, 500);
}
});
$('.res-step-three').click(function() {
if (!$(this).hasClass('active')) {
$(".res-steps").removeClass('active');
i = 2;
$(steps[i]).addClass('active');
i++;
$('.res-form-three').css('left', '-150%');
$('.res-form-one, .res-form-two, .res-form-four').animate({
left: '150%'
}, 500);
$('.res-form-three').animate({
left: '0%'
}, 500);
}
});
$('.res-step-four').click(function() {
if (!$(this).hasClass('active')) {
$(".res-steps").removeClass('active');
i = 3;
$(steps[i]).addClass('active');
i++;
$('.res-form-four').css('left', '-150%');
$('.res-form-one, .res-form-two, .res-form-four').animate({
left: '150%'
}, 500);
$('.res-form-four').animate({
left: '0%'
}, 500);
}
});
});
</script>
@endsection

View File

@ -273,7 +273,8 @@ class="form-control">
</div>
<div class="card-body">
<div class="table-responsive">
<table id="example3" class="table table-bordered table-striped">
<table id="TableReceiveWorkstationsPrepared" class="table table-bordered table-striped">
<thead>
<tr>
<th>Postos de Trabalho</th>
@ -281,18 +282,6 @@ class="form-control">
<th>Tarefas Complementares</th>
</tr>
</thead>
<tbody>
<tr>
<td>workstation1-69</td>
<td>TE2 - TE5 - TE11 - </td>
<td>TC1 - </td>
</tr>
<tr>
<td>workstation2-69</td>
<td>TE1 - TE2 - TE6 - </td>
<td></td>
</tr>
</tbody>
</table>
</div>
<!--/articulado de obra-->
@ -634,17 +623,11 @@ class="checkboxChoseTasksOficesCV"
//Cards das div : Destricao - Articulado - Postos de Trabalho
// ******** Estrutura do Layout da Página :
// $("#CardDetalhesObra").hide();
$("#CardArticuladoObra").hide();
$("#CardPostosDeTrabalhoObra").hide();
//Botoes : Destricao - Articulado - Postos de Trabalho
$('#BotaoDetalhesObra').hide();
// $('#BotaoArticulado').hide();
// $('BotaoPostosDeTrabalho').hide();
$('#BotaoArticulado').on('click', function() {
// Mostra o Card do Articulado e o Botao de detalhes
@ -678,327 +661,10 @@ class="checkboxChoseTasksOficesCV"
$("#CardDetalhesObra").hide();
$("#CardArticuladoObra").hide();
});
// A Propriedade do Botao começa desabilitada
// Chamamos os 3 selects e verificamos
$("#tipo_valvulasList").change(function() {
var tipo_valvulas = $("#tipo_valvulasList").val();
// will show the scopes of each valve according to the selection of the type field in "create a new task"
if (tipo_valvulas == "PSV") {
$("#Val_PSV").show();
} else {
$("#Val_PSV").hide();
}
if (tipo_valvulas == "ISV") {
$("#Val_ISV").show();
} else {
$("#Val_ISV").hide();
}
if (tipo_valvulas == "CV") {
$("#Val_CV").show();
} else {
$("#Val_CV").hide();
}
if (tipo_valvulas == "Init") {
$("#DivAmbitos").show();
} else {
$("#DivAmbitos").hide();
}
})
// Tabelas de cada Valvula
$("#Val_PSV").hide();
$("#Val_ISV").hide();
$("#Val_CV").hide();
// Ambitos de PSV
$("#boxPSVSubs").hide();
$("#boxPSVCalib").hide();
$("#boxPSVRep_Local").hide();
$("#boxPSVRep_Oficina").hide();
// Ambitos de ISV
$("#boxISVRep_Local").hide();
$("#boxISVRep_Oficina").hide();
$("#boxISVSubs").hide();
$("#boxISVEmpan").hide();
$("#boxISVTestPress").hide();
// Ambitos de CV
$("#Amb_Oficina_Val_CV").hide();
$("#Amb_local_Val_CV").hide();
// Ambitos de CV Local
$("#boxCVLocalBenef_tip1").hide();
$("#boxCVLocalBenef_tip2B").hide();
// A Propriedade do Botao começa desabilitada
// Chamamos os 3 selects e verificamos
$("#tipo_valvulas").change(function() {
var tipo_valvulas = $("#tipo_valvulas").val();
if (tipo_valvulas == "PSV") {
$("#Val_PSV").show();
} else {
$("#Val_PSV").hide();
}
if (tipo_valvulas == "ISV") {
$("#Val_ISV").show();
} else {
$("#Val_ISV").hide();
}
if (tipo_valvulas == "CV") {
$("#Val_CV").show();
} else {
$("#Val_CV").hide();
}
})
// **** Para uma lista de tarefas elementares pre selecionadas de acordo com o ambito
$("#selectPSV").change(function() {
var Amb_PSV = $('#selectPSV').val();
if (Amb_PSV == "Subs") {
$("#boxPSVSubs").show();
} else {
$("#boxPSVSubs").hide();
}
if (Amb_PSV == "Calib") {
$("#boxPSVCalib").show();
} else {
$("#boxPSVCalib").hide();
}
if (Amb_PSV == "Rep_Local") {
$("#boxPSVRep_Local").show();
} else {
$("#boxPSVRep_Local").hide();
}
if (Amb_PSV == "Rep_Oficina") {
$("#boxPSVRep_Oficina").show();
} else {
$("#boxPSVRep_Oficina").hide();
}
})
// **** Para uma lista de tarefas elementares pre selecionadas de acordo com o ambito
$("#selectISV").change(function() {
var Amb_ISV = $('#selectISV').val();
if (Amb_ISV == "Rep_Local") {
$("#boxISVRep_Local").show();
} else {
$("#boxISVRep_Local").hide();
}
if (Amb_ISV == "Rep_Oficina") {
$("#boxISVRep_Oficina").show();
} else {
$("#boxISVRep_Oficina").hide();
}
if (Amb_ISV == "Subs") {
$("#boxISVSubs").show();
} else {
$("#boxISVSubs").hide();
}
if (Amb_ISV == "Empan") {
$("#boxISVEmpan").show();
} else {
$("#boxISVEmpan").hide();
}
if (Amb_ISV == "TestPress") {
$("#boxISVTestPress").show();
} else {
$("#boxISVTestPress").hide();
}
})
// **** Para uma lista de tarefas elementares pre selecionadas de acordo com o ambito
$("#selectCV").change(function() {
var Amb_CV = $('#selectCV').val();
if (Amb_CV == "Amb_Local") {
$("#Amb_local_Val_CV").show();
} else {
$("#Amb_local_Val_CV").hide();
}
if (Amb_CV == "Amb_Ofice") {
$("#Amb_Oficina_Val_CV").show();
} else {
$("#Amb_Oficina_Val_CV").hide();
}
})
// Ambitos locais, válvulas CV
$("#select_amb_local_CV").change(function() {
var Amb_CV_Local = $('#select_amb_local_CV').val();
if (Amb_CV_Local == "Benef_tip1") {
$("#boxCVLocalBenef_tip1").show();
} else {
$("#boxCVLocalBenef_tip1").hide();
}
if (Amb_CV_Local == "Benef_tip2B") {
$("#boxCVLocalBenef_tip2B").show();
} else {
$("#boxCVLocalBenef_tip2B").hide();
}
})
// Ambitos oficina, válvulas CV
$("#Amb_Oficina_Val_CV").change(function() {
var Amb_CVOficina = $('#Amb_Oficina_Val_CV').val();
if (Amb_CVOficina == "Benef_tip1") {
$("#boxCVLocalBenef_tip1").show();
} else {
$("#boxCVLocalBenef_tip1").hide();
}
if (Amb_CVOficina == "Benef_tip2B") {
$("#boxCVLocalBenef_tip2B").show();
} else {
$("#boxCVLocalBenef_tip2B").hide();
}
})
// Funcao onde recebemos os valores que esta em check nas tarefas elementares
updateValues_PSV_Subs();
$('.checkbox_PSV_Subs').change(updateValues_PSV_Subs);
updateValues_Inspec_PSV_Subs();
$('.checkbox_Inspec_PSV_Subs').change(updateValues_Inspec_PSV_Subs);
// Funções das tarefas dos Postos
updateTasksOfcicesCV();
$('.checkboxChoseTasksOficesCV').change(updateTasksOfcicesCV);
updateTasksOfcicesPSV();
$('.checkboxChoseTasksOficesPSV').change(updateTasksOfcicesPSV);
updateTasksOfcicesISV();
$('.checkboxChoseTasksOficesISV').change(updateTasksOfcicesISV);
})
function updateValues_PSV_Subs() {
var Values_PSV_Subs = [];
$('.checkbox_PSV_Subs:checked').each(function() {
Values_PSV_Subs.push($(this).val())
});
var list = "<ul>";
for (var i = 0; i < Values_PSV_Subs.length; i++) {
list += "<li>" + Values_PSV_Subs[i] + "</li>";
}
// Valor para a lista nao ordenada das tarefas selecionadas
$("#receiveValues_PSV_Subs").html(list);
// Valor para o campo de "Inspecionar"
$("#receiveValues_Inspec_PSV_Subs").val()
// $("#receiveValues_PSV_Subs").text(Values_PSV_Subs.join('<br>'));
}
function updateValues_Inspec_PSV_Subs() {
var receiveValuesInspec = [];
var list = [];
$('.checkbox_Inspec_PSV_Subs:checked').each(function() {
receiveValuesInspec.push($(this).val())
});
for (var i = 1; i <= receiveValuesInspec.length; i++) {
list = i;
}
$('#receiveValues_Inspec_PSV_Subs').val(list);
}
// Atualizar os valores
function updateTasksOfcicesCV() {
var receivetasksOfices = [];
// Para criar uma lista, só funciona se for "Classe" na Checkbox!!
$('.checkboxChoseTasksOficesCV:checked').each(function() {
receivetasksOfices.push($(this).val())
});
var list;
if (receivetasksOfices.length == 0) {
list = "";
} else {
list = "<h4>Válvula CV</h4><ul>";
}
for (var i = 0; i < receivetasksOfices.length; i++) {
list += "<li style='list-style:none'>" + receivetasksOfices[i] + "</li>";
}
$("#ReceiveCheckboxChoseTasksOficesCV").html(list);
}
function updateTasksOfcicesPSV() {
var receivetasksOfices = [];
// Para criar uma lista, só funciona se for "Classe" na Checkbox!!
$('.checkboxChoseTasksOficesPSV:checked').each(function() {
receivetasksOfices.push($(this).val())
});
var list;
if (receivetasksOfices.length == 0) {
list = "";
} else {
list = "<h4>Válvula PSV</h4><ul>";
}
for (var i = 0; i < receivetasksOfices.length; i++) {
list += "<li style='list-style:none'>" + receivetasksOfices[i] + "</li>";
}
$("#ReceiveCheckboxChoseTasksOficesPSV").html(list);
}
function updateTasksOfcicesISV() {
var receivetasksOfices = [];
// Para criar uma lista, só funciona se for "Classe" na Checkbox!!
$('.checkboxChoseTasksOficesISV:checked').each(function() {
receivetasksOfices.push($(this).val())
});
var list;
if (receivetasksOfices.length == 0) {
list = "";
} else {
list = "<h4>Válvula ISV</h4><ul>";
}
for (var i = 0; i < receivetasksOfices.length; i++) {
list += "<li style='list-style:none'>" + receivetasksOfices[i] + "</li>";
}
$("#ReceiveCheckboxChoseTasksOficesISV").html(list);
}
</script>
<script>
// $(document).ready(function () {
// $("input#numberPosts").on("input", function () {
// var num = parseInt($(this).val());
// var table = "<table><tbody>";
// for (var i = 1; i <= num; i++) {
// table += "<tr><td>" + i + "</td></tr>";
// }
// table += "</tbody></table>";
// $("#receiveNumberPosts").html(table);
// });
// });
$(document).ready(function() {
$("#numberPosts").on("input", function() {
var num = parseInt($(this).val());
@ -1016,206 +682,5 @@ function updateTasksOfcicesISV() {
});
});
</script>
<script src="dist/js/pages/dashboard.js"></script>
<script>
$(function() {
$('#description').hide();
$('#description2').hide();
$('#checkboxPrimary1').change(function() {
if ($('#checkboxPrimary1').is(':checked')) {
$('#description').fadeIn();
} else {
$('#description').hide();
}
});
$('#checkboxPrimary2').change(function() {
if ($('#checkboxPrimary2').is(':checked')) {
$('#description2').fadeIn();
} else {
$('#description2').hide();
}
});
});
</script>
<script>
$(function() {
$('input[name="daterange"]').daterangepicker({
opens: 'right'
}, function(start, end, label) {
console.log("A new date selection was made: " + start.format('YYYY-MM-DD') + ' to ' + end
.format('YYYY-MM-DD'));
});
});
</script>
<script>
$(function() {
// Copy e CSV... Secção do Detalhes da Obra
$("#example1").DataTable({
"responsive": true,
"lengthChange": false,
"autoWidth": false,
"buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"]
}).buttons().container().appendTo('#example1_wrapper .col-md-6:eq(0)');
// Copy e CSV... Secção do Detalhes da Obra
$("#example2").DataTable({
"responsive": true,
"lengthChange": false,
"autoWidth": false,
"buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"]
}).buttons().container().appendTo('#example2_wrapper .col-md-6:eq(0)');
$("#example3").DataTable({
"responsive": true,
"lengthChange": false,
"autoWidth": false,
"buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"]
}).buttons().container().appendTo('#example3_wrapper .col-md-6:eq(0)');
});
</script>
<script>
$(function() {
//Datemask dd/mm/yyyy
$('#datemask').inputmask('dd/mm/yyyy', {
'placeholder': 'dd/mm/yyyy'
})
//Datemask2 mm/dd/yyyy
$('#datemask2').inputmask('mm/dd/yyyy', {
'placeholder': 'mm/dd/yyyy'
})
//Money Euro
$('[data-mask]').inputmask()
//Date picker
$('#reservationdate').datetimepicker({
format: 'L'
});
//Date and time picker
$('#reservationdatetime').datetimepicker({
icons: {
time: 'far fa-clock'
}
});
//Date range picker
$('#reservation').daterangepicker()
//Date range picker with time picker
$('#reservationtime').daterangepicker({
timePicker: true,
timePickerIncrement: 30,
locale: {
format: 'MM/DD/YYYY hh:mm A'
}
})
//Date range as a button
$('#daterange-btn').daterangepicker({
ranges: {
'Today': [moment(), moment()],
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'Last 7 Days': [moment().subtract(6, 'days'), moment()],
'Last 30 Days': [moment().subtract(29, 'days'), moment()],
'This Month': [moment().startOf('month'), moment().endOf('month')],
'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1,
'month').endOf('month')]
},
startDate: moment().subtract(29, 'days'),
endDate: moment()
},
function(start, end) {
$('#reportrange span').html(start.format('MMMM D, YYYY') + ' - ' + end.format(
'MMMM D, YYYY'))
}
)
//Timepicker
$('#timepicker').datetimepicker({
format: 'LT'
})
//Bootstrap Duallistbox
$('.duallistbox').bootstrapDualListbox()
//Colorpicker
$('.my-colorpicker1').colorpicker()
//color picker with addon
$('.my-colorpicker2').colorpicker()
$('.my-colorpicker2').on('colorpickerChange', function(event) {
$('.my-colorpicker2 .fa-square').css('color', event.color.toString());
})
$("input[data-bootstrap-switch]").each(function() {
$(this).bootstrapSwitch('state', $(this).prop('checked'));
})
})
// BS-Stepper Init
document.addEventListener('DOMContentLoaded', function() {
window.stepper = new Stepper(document.querySelector('.bs-stepper'))
})
// DropzoneJS Demo Code Start
Dropzone.autoDiscover = false
// Get the template HTML and remove it from the doumenthe template HTML and remove it from the doument
var previewNode = document.querySelector("#template")
previewNode.id = ""
var previewTemplate = previewNode.parentNode.innerHTML
previewNode.parentNode.removeChild(previewNode)
var myDropzone = new Dropzone(document.body, { // Make the whole body a dropzone
url: "/target-url", // Set the url
thumbnailWidth: 80,
thumbnailHeight: 80,
parallelUploads: 20,
previewTemplate: previewTemplate,
autoQueue: false, // Make sure the files aren't queued until manually added
previewsContainer: "#previews", // Define the container to display the previews
clickable: ".fileinput-button" // Define the element that should be used as click trigger to select files.
})
myDropzone.on("addedfile", function(file) {
// Hookup the start button
file.previewElement.querySelector(".start").onclick = function() {
myDropzone.enqueueFile(file)
}
})
// Update the total progress bar
myDropzone.on("totaluploadprogress", function(progress) {
document.querySelector("#total-progress .progress-bar").style.width = progress + "%"
})
myDropzone.on("sending", function(file) {
// Show the total progress bar when upload starts
document.querySelector("#total-progress").style.opacity = "1"
// And disable the start button
file.previewElement.querySelector(".start").setAttribute("disabled", "disabled")
})
// Hide the total progress bar when nothing's uploading anymore
myDropzone.on("queuecomplete", function(progress) {
document.querySelector("#total-progress").style.opacity = "0"
})
// Setup the buttons for all transfers
// The "add files" button doesn't need to be setup because the config
// `clickable` has already been specified.
document.querySelector("#actions .start").onclick = function() {
myDropzone.enqueueFiles(myDropzone.getFilesWithStatus(Dropzone.ADDED))
}
document.querySelector("#actions .cancel").onclick = function() {
myDropzone.removeAllFiles(true)
}
// DropzoneJS Demo Code End
</script>
@endsection

View File

@ -0,0 +1,207 @@
@extends('Templates/templateAdmin')
@section('Main-content')
<div class="card-body">
<!-- Table articulado de obra -->
{{-- <div class="card">
<div class="card-header">
<h3 class="card-title">Equipamentos da obra</h3>
</div>
<!-- /.card-header -->
<div class="card-body">
<div class="table-responsive">
<div class="row text-center">
<div class="form-group col-sm-3">
<label>Tipo de Equipamento </label>
<select id="tipo_valvulasList" name="equipmentTypeId" class="form-control">
<option value='#' selected>Mostrar Todos</option>
@foreach ($equipmentsTypes as $equipmentsType)
<option value="{{ $equipmentsType->equipment_type_id }}">
{{ $equipmentsType->equipment_type_name }}</option>
@endforeach
</select>
</div>
<div class="col-sm-3">
<div class="form-group">
<label>Ambitos </label>
<select class="form-control" name="EquipmentAmbit" id="AmbitsEquipments_list" required>
<option value="#" hidden>Mostrar Todos</option>
</select>
</div>
</div>
<div class="col-sm-3">
<div class="form-group">
<label>Inspeção de Equipamentos </label>
<select id="inspecValvula" class="form-control">
<option value="#">Mostrar Todos</option>
<option value="Sim">Sim </option>
<option value="Nao">Nao </option>
</select>
</div>
</div>
</div>
<br>
<table id="TableExecutionProject" class="table table-bordered table-striped">
<thead>
<tr>
<th>Tag</th>
<th>Tipo Equipamento</th>
<th>Ambito</th>
<th>Tarefas</th>
<th>Tarefa Atual</th>
<th>Data Entrada</th>
<th>Data Conclusao</th>
<th>Inspecao</th>
</tr>
</thead>
</table>
<!-- /. Table-->
</div>
<!--/table obra-->
</div>
<!-- /.card-body -->
</div> --}}
<!-- ./card -->
</div>
<div class="card-body">
<!-- Table articulado de obra -->
<div class="card">
<div class="card-header">
<h3 class="card-title">Equipamentos da obra</h3>
</div>
<!-- /.card-header -->
<div class="card-body">
<div class="table-responsive">
<br>
<table id="TableExecutionProject" class="table table-bordered table-striped">
<thead>
<tr>
<th>Tag</th>
<th>Tipo Equipamento</th>
<th>Ambito</th>
<th>Tarefas</th>
<th>Tarefa Atual</th>
<th>Data Entrada</th>
<th>Data Conclusao</th>
<th>Inspecao</th>
<th>Detalhes</th>
</tr>
</thead>
</table>
<!-- /. Table-->
</div>
<!--/table obra-->
</div>
<!-- /.card-body -->
</div>
<!-- ./card -->
</div>
{{-- card-body --}}
@endsection
@section('scriptsTemplateAdmin')
<script type="text/javascript">
$(document).ready(function() {
//Cards das div : Destricao - Articulado - Postos de Trabalho
$("#CardArticuladoObra").hide();
$("#CardPostosDeTrabalhoObra").hide();
//Botoes : Destricao - Articulado - Postos de Trabalho
$('#BotaoDetalhesObra').hide();
// $('#BotaoArticulado').hide();
// $('BotaoPostosDeTrabalho').hide();
$('#BotaoArticulado').on('click', function() {
// Mostra o Card do Articulado e o Botao de detalhes
$('#CardArticuladoObra').show();
$("#BotaoDetalhesObra").show();
$('#BotaoPostosDeTrabalho').show();
$('#BotaoArticulado').hide();
$("#CardPostosDeTrabalhoObra").hide();
$("#CardDetalhesObra").hide();
});
$('#BotaoDetalhesObra').on('click', function() {
// Mostra o Card do Articulado e o Botao de detalhes
$('#CardDetalhesObra').show();
$("#BotaoArticulado").show();
$('#BotaoPostosDeTrabalho').show();
$('#BotaoDetalhesObra').hide();
$("#CardPostosDeTrabalhoObra").hide();
$("#CardArticuladoObra").hide();
});
$('#BotaoPostosDeTrabalho').on('click', function() {
// Mostra o Card do Articulado e o Botao de detalhes
$('#CardPostosDeTrabalhoObra').show();
$("#BotaoArticulado").show();
$("#BotaoDetalhesObra").show();
$('#BotaoPostosDeTrabalho').hide();
$("#CardDetalhesObra").hide();
$("#CardArticuladoObra").hide();
});
})
</script>
<script>
$(document).ready(function() {
$('#TableExecutionProject').DataTable({
autoWidth: false,
processing: true,
serverSide: true,
ajax: {
url: '/api/receiveEquipmentsExecutionProject/' + $('#receiveNumberProject').val(),
data: function(d) {
d.equipment_type_id = $('#tipo_valvulasList').val();
d.ambits_id = $('#AmbitsEquipments_list').val();
},
},
columns: [{
data: 'equipment_tag',
name: 'equipment_tag'
},
{
data: 'equipment_type',
name: 'equipment_type'
},
{
data: 'Ambits',
name: 'Ambits'
},
{
data: 'order_tasks',
name: 'order_tasks'
},
],
rowId: 'equipment_id'
});
// Scripts para que com base no recebido , ele atualiza a pagina automaticamente
$('#tipo_valvulasList').on('change', function() {
// Atualiza a tabela quando o valor selecionado no select de tipo de válvulas for alterado
$('#TableExecutionProject').DataTable().ajax.reload();
});
$('#AmbitsEquipments_list').on('change', function() {
// Atualiza a tabela quando o valor selecionado no select de tipo de válvulas for alterado
$('#TableExecutionProject').DataTable().ajax.reload();
});
});
</script>
@endsection

View File

@ -36,16 +36,6 @@
@endsection
@section('idiotaScripts')
{{-- <script>
$(function() {
$("#example").DataTable({
"responsive": true,
"lengthChange": false,
"autoWidth": false,
"buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"]
}).buttons().container().appendTo('#example_wrapper .col-md-6:eq(0)');
});
</script> --}}
<script>
$(document).ready(function() {
var table = $('.example').DataTable({

View File

@ -0,0 +1,114 @@
@extends('Templates/templateAdmin')
@section('Main-content')
@endsection
@section('scriptsTemplateAdmin')
<script>
$(document).ready(function() {
var steps = ['.res-step-one', '.res-step-two', '.res-step-three', '.res-step-four'];
var i = 1;
$(".res-step-form .res-btn-orange").click(function() {
var getClass = $(this).attr('data-class');
$(".res-steps").removeClass('active');
$(steps[i]).addClass('active');
i++;
if (getClass != ".res-form-four") {
$(getClass).animate({
left: '-150%'
}, 500, function() {
$(getClass).css('left', '150%');
});
$(getClass).next().animate({
left: '0%'
}, 500, function() {
$(this).css('display', 'block');
});
}
});
/* step back */
$(".res-step-form .res-btn-gray").click(function() {
var getClass = $(this).attr('data-class');
$(".res-steps").removeClass('active');
i--;
$(steps[i - 1]).addClass('active');
$(getClass).prev().css('left', '-150%')
$(getClass).animate({
left: '150%'
}, 500);
$(getClass).prev().animate({
left: '0%'
}, 500)
});
/* click from top bar steps */
$('.res-step-one').click(function() {
if (!$(this).hasClass('active')) {
$(".res-steps").removeClass('active');
i = 0;
$(steps[i]).addClass('active');
i++;
$('.res-form-one').css('left', '-150%');
$('.res-form-two, .res-form-three, .res-form-four').animate({
left: '150%'
}, 500);
$('.res-form-one').animate({
left: '0%'
}, 500);
}
});
$('.res-step-two').click(function() {
if (!$(this).hasClass('active')) {
$(".res-steps").removeClass('active');
i = 1;
$(steps[i]).addClass('active');
i++;
$('.res-form-two').css('left', '-150%');
$('.res-form-one, .res-form-three, .res-form-four').animate({
left: '150%'
}, 500);
$('.res-form-two').animate({
left: '0%'
}, 500);
}
});
$('.res-step-three').click(function() {
if (!$(this).hasClass('active')) {
$(".res-steps").removeClass('active');
i = 2;
$(steps[i]).addClass('active');
i++;
$('.res-form-three').css('left', '-150%');
$('.res-form-one, .res-form-two, .res-form-four').animate({
left: '150%'
}, 500);
$('.res-form-three').animate({
left: '0%'
}, 500);
}
});
$('.res-step-four').click(function() {
if (!$(this).hasClass('active')) {
$(".res-steps").removeClass('active');
i = 3;
$(steps[i]).addClass('active');
i++;
$('.res-form-four').css('left', '-150%');
$('.res-form-one, .res-form-two, .res-form-three').animate({
left: '150%'
}, 500);
$('.res-form-four').animate({
left: '0%'
}, 500);
}
});
});
</script>
@endsection

View File

@ -9,7 +9,8 @@
<!-- Theme style -->
<link rel="stylesheet" href="{{ asset('StyleAdmin/css/adminlte.css') }}">
<link rel="stylesheet" href="{{ asset('StyleAdmin/css/styleProgressBar.css') }}">
<!-- Google Font: Source Sans Pro -->
<link rel="stylesheet"
@ -47,26 +48,16 @@
<!-- DataTables -->
<link rel="stylesheet" href="{{ asset('plugins/datatables-bs4/css/dataTables.bootstrap4.min.css') }}">
<link rel="stylesheet" href="{{ asset('plugins/datatables-responsive/css/responsive.bootstrap4.min.css') }}">
<link rel="stylesheet" href="{{ asset('plugins/datatables-buttons/css/buttons.bootstrap4.min.css') }}">
</head>
<body>
@yield('idiota')
{{-- <script src="{{ asset('plugins/jquery/jquery.min.js') }}"></script>
<script src="{{ asset('plugins/datatables/jquery.dataTables.min.js') }}"></script>
<script src="{{ asset('plugins/datatables-buttons/js/dataTables.buttons.min.js') }}"></script>
<script href="{{ asset('plugins/datatables-responsive/js/dataTables.responsive.min.js')}}"></script> --}}
<script src="{{ asset('plugins/jquery/jquery.min.js') }}"></script>
<!-- jQuery UI 1.11.4 -->
<script src="{{ asset('plugins/jquery-ui/jquery-ui.min.js') }}"></script>
@ -96,11 +87,7 @@
<script src="{{ asset('plugins/overlayScrollbars/js/jquery.overlayScrollbars.min.js') }}"></script>
<!-- AdminLTE App -->
<script src="{{ asset('js/adminlte.js') }}"></script>
<!-- AdminLTE for demo purposes -->
{{-- <script src="{{ asset('js/demo.js') }}"></script>
<!-- AdminLTE dashboard demo (This is only for demo purposes) -->
<script src="{{ asset('js/pages/dashboard.js') }}"></script> --}}
<!-- jQuery Script fadeIn fadeOut for the dropdown -->
<script src="{{ asset('plugins/datatables/jquery.dataTables.min.js') }}"></script>
<script src="{{ asset('plugins/datatables-bs4/js/dataTables.bootstrap4.min.js') }}"></script>

View File

@ -26,8 +26,17 @@
use App\Http\Controllers\ProjectoDatacontroller;
use App\Http\Controllers\PreparedProjectController;
use App\Http\Controllers\ExecutionProjectController;
Route::get('ExecutionProject/{ProjectId}',[ExecutionProjectController::class,'receiveExecutionProject'])->name('ExecutionProject');
Route::get('/ReceiveEquipmentIdForShowModal/{EquipmentID}',[ExecutionProjectController::class,'receiveEquipmentIdForShowModal'])->name('ReceiveEquipmentIdForShowModal ');
Route::get('/api/receiveEquipmentsExecutionProject/{receiveNumberProject}',[ExecutionProjectController::class,'receiveEquipmentsExecutionProject'])->name('receiveEquipmentsExecutionProject');
Route::get('/api/receiveWorkstationExecutionProject/{receiveNumberProject}',[ExecutionProjectController::class,'receiveWorkstationExecutionProject' ]);
Route::get('user-data', [PreparedProjectController::class, 'getData1'])->name('getData');
Route::get('/api/ambits/prepared{equipmentType}', [PreparedProjectController::class,'getAmbits']);
@ -53,7 +62,7 @@
route::get('idiota',function(){
return view('recebeIdiota');
return view('recebeTestProgressBar');
});
Route::get('/api/equipment/{id}', [CreateProjectController::class,'showJson']);
@ -162,13 +171,11 @@
|
*/
Route::middleware(['auth', 'verified'])->group(function () {
// Rotas protegidas que exigem verificação de e-mail
Route::get('/', [ProjectoDatacontroller::class,('HomePage')])->name('home');
});
// Rotas protegidas que exigem verificação de e-mail
Route::get('/', [ProjectoDatacontroller::class,('HomePage')])->name('home');
//
});
/*
|--------------------------------------------------------------------------