Updating the project page during execution and improvements
This commit is contained in:
parent
78df37345c
commit
71992423fa
|
|
@ -515,21 +515,25 @@ public function receiveExecutionProject($ProjectId)
|
|||
$receivePlant = Plant::where('plant_id', $DatasProject->plant_id)->first();
|
||||
$receiveCompany = Company::where('company_id', $receivePlant->company_id)->first();
|
||||
|
||||
|
||||
// Busca na model User
|
||||
$filteredUsers = User::where('type_users', 5)
|
||||
->whereRaw("SUBSTRING_INDEX(user_name, '-', -1) = ?", [$DatasProject->company_projects_id])
|
||||
->whereRaw("SUBSTRING_INDEX(SUBSTRING_INDEX(email, '@', 1), '-', 1) = ?", [$DatasProject->project_company_name])
|
||||
->whereRaw("SUBSTRING_INDEX(SUBSTRING_INDEX(email, '@', 1), '-', 1) = ?", [$DatasProject->company_projects_id])
|
||||
->get();
|
||||
|
||||
|
||||
// Adicionando a nova coluna realPassword
|
||||
$filteredUsers->map(function ($user) {
|
||||
$user->realPassword = explode('@', $user->email)[0];
|
||||
return $user;
|
||||
});
|
||||
|
||||
|
||||
// Busca todos os workstations relevantes
|
||||
$allWorkstations = ConstructionWorkstation::whereIn('name_workstations', $filteredUsers->pluck('user_name'))->get()->keyBy('name_workstations');
|
||||
|
||||
// dd($allWorkstations);
|
||||
// Adicionando a nomenclatura de workstation aos usuários filtrados
|
||||
$filteredUsers->map(function ($user) use ($allWorkstations) {
|
||||
if (isset ($allWorkstations[$user->user_name])) {
|
||||
|
|
|
|||
|
|
@ -763,4 +763,8 @@ public function createComment(Request $request){
|
|||
return back();
|
||||
}
|
||||
|
||||
public function equipmentTaskDetailsPdf(){
|
||||
return view('projectsClients.pdf.equipmentTaskDetailsPdf');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ protected function getAllowedRoutesForUserType($userType)
|
|||
'createCompany','ShowPendingUser','register','download','projectDetails_11','editEquipment','EditprocessStep1','createWorkStations','workstationsAssociationTasks','finishCreatingProject',
|
||||
'preparedProject','EditProjectForArticulated','companyEdit','reportingDataClient','ExecutionProject',
|
||||
'changeFromExecutionToPlanning','deleteWorkstation','deleteProject','showQrcodesInProject','showDataDetailsProjectClient',
|
||||
'getDataAmbitsOfProject', 'showReportingForAmbitsProject','getEquipmentsOfAmbit','getDataEquipmentsOfProject','removingElementalTasksFromProject',
|
||||
'getDataAmbitsOfProject', 'showReportingForAmbitsProject','getEquipmentsOfAmbit','getDataEquipmentsOfProject','removingElementalTasksFromProject','equipmentTaskDetailsPdf',
|
||||
];
|
||||
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 108 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 110 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 109 KiB |
|
|
@ -1547,7 +1547,9 @@ class="btn btn-primary float-right">Postos de Trabalho</a>
|
|||
class="badge badge-info">(Número da copia)</span></h4>
|
||||
<h4><b>Descrição:</b> {{ $pendingEquipment->pending_equipment_description }} <span
|
||||
class="badge badge-info">(Número da copia)</span></h4>
|
||||
<h4><b>Tipo de Equipamento:</b> {{ $pendingEquipment->equipmentType->equipment_type_name }}
|
||||
{{-- <h4><b>Tipo de Equipamento:</b> {{ $pendingEquipment->equipmentType->equipment_type_name }}
|
||||
</h4> --}}
|
||||
<h4>{{ $pendingEquipment->pending_equipment_type_id }}({{ $pendingEquipment->equipmentType->equipment_type_name }})
|
||||
</h4>
|
||||
|
||||
<select class="form-control mt-3 mb-4" name="EquipmentAmbit"
|
||||
|
|
|
|||
|
|
@ -356,6 +356,7 @@ function updateSubmitButtonState() {
|
|||
type: type
|
||||
},
|
||||
success: function(response) {
|
||||
console.log($(this));
|
||||
if (response.exists) {
|
||||
$(this).css('border', '2px solid red').removeClass(
|
||||
'valid-input').addClass('invalid-input');
|
||||
|
|
|
|||
|
|
@ -91,8 +91,8 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>Resp.Cliente:</td>
|
||||
{{-- <td>{{ $DatasProject->project_company_responsible }}</td> --}}
|
||||
<td>Yuri Empresa Teste</td>
|
||||
<td>{{ $DatasProject->project_company_responsible }}</td>
|
||||
{{-- <td>{{}}</td> --}}
|
||||
</tr>
|
||||
<tr>
|
||||
<td>N.º obra Cliente :</td>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -10,10 +10,6 @@
|
|||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
{{-- Precisa passar o ID do cliente --}}
|
||||
{{-- <li class="breadcrumb-item active"><a href="{{ route('reportingDataClient', $detailsProject->user_id) }}">Obras Concluidas</a></li> --}}
|
||||
{{-- Passar o numero da Obra --}}
|
||||
{{-- <li class="breadcrumb-item active"><a href="{{ route('showDataDetailsProjectClient', $detailsProject->company_projects_id) }}">Relatorios Gerais</a></li> --}}
|
||||
<li class="breadcrumb-item active">Relatório Individual</li>
|
||||
</ol>
|
||||
|
||||
|
|
@ -25,68 +21,6 @@
|
|||
<fieldset class="content">
|
||||
<div class="container-fluid">
|
||||
|
||||
|
||||
{{-- receiveComments --}}
|
||||
|
||||
|
||||
<div class="card card-success collapsed-card">
|
||||
<div class="card-header clickable">
|
||||
<h3 class="card-title">Comentários sobre o Equipamento</h3>
|
||||
<div class="card-tools">
|
||||
<button type="button" class="btn btn-tool collapse-button" data-card-widget="collapse"><i
|
||||
class="fas fa-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
|
||||
<div class="chat-container"
|
||||
style="height: 250px; overflow-y: scroll; padding: 10px; background-color: #f9f9f9; border: 1px solid #ddd;">
|
||||
|
||||
<!-- Mensagens do Chat -->
|
||||
@foreach ($receiveComments as $receiveComment)
|
||||
<div class="chat-message {{ $receiveComment->type_users == 2 ? 'right' : 'left' }} mt-1">
|
||||
<div class="flex-shrink-1 bg-light rounded py-2 px-3 {{ $receiveComment->type_users == 2 ? 'mr-3' : 'ml-3' }}"
|
||||
style="border: 1px solid #ccc; box-shadow: 0 2px 5px rgba(0,0,0,0.1);">
|
||||
<div class="font-weight-bold mb-1">{{ $receiveComment->user->user_name }}
|
||||
<b>({{ $receiveComment->user->userType->type_user }})</b> </div>
|
||||
<p style="color:black">{{ $receiveComment->comment }}</p>
|
||||
<div class="text-muted small text-nowrap mt-2">
|
||||
{{ $receiveComment->creation_date }} (
|
||||
{{ \Carbon\Carbon::parse($receiveComment->creation_date)->diffForHumans() }})
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
|
||||
{{-- Apenas para equipamentos de Status = 0 ou = 1 --}}
|
||||
@if ($equipmentStatus == 0)
|
||||
<!-- Área de envio de nova mensagem -->
|
||||
<div class="mt-3">
|
||||
<form action="{{ route('createComment') }}" method="post">
|
||||
@csrf
|
||||
<input type="hidden" name="projectID" value="{{ $detailsProject->company_projects_id }}">
|
||||
<input type="hidden" name="equipmentID"
|
||||
value="{{ $detailsEquipmentWorkProject->equipmentWorkHistorys_id }}">
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="comment" class="form-label">Comentário</label>
|
||||
<textarea class="form-control" id="comment" name="comment" rows="3" required
|
||||
placeholder="Digite aqui suas observações ou comentário..."></textarea>
|
||||
</div>
|
||||
<button class="btn btn-success float-right" type="submit">Enviar</button>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- ./card -->
|
||||
|
||||
@if ($equipmentStatus == 1)
|
||||
<div class="card card-success">
|
||||
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@
|
|||
|
||||
Route::get('showAmbitDetailsProjectHistory/{equipmentStatus}/{projectID}/{equipmentID}', [ProjectoDatacontroller::class, 'showAmbitDetailsProjectHistory'])->name('showAmbitDetailsProjectHistory');
|
||||
|
||||
Route::get('equipmentTaskDetailsPdf',[ProjectoDatacontroller::class,'equipmentTaskDetailsPdf'])->name('equipmentTaskDetailsPdf');
|
||||
|
||||
Route::get('getDataEquipment', [ExecutionProjectController::class, 'getDataEquipment'])->name('getDataEquipment');
|
||||
Route::get('getDetailsEquipmentQrcode', [ExecutionProjectController::class, 'getDetailsEquipmentQrcode'])->name('getDetailsEquipmentQrcode');
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user