Merge branch 'main' into feature/user_profile
# Conflicts: # public/userarea/include/navbar.php
This commit is contained in:
@@ -1,4 +1,184 @@
|
||||
<?php include('include/headscript.php'); ?>
|
||||
<?php
|
||||
$dashboardSections = [
|
||||
[
|
||||
'id' => 'secOperativo',
|
||||
'title' => 'Operativo',
|
||||
'subtitle' => 'Azioni principali di produzione e attività in scadenza',
|
||||
'icon' => '🚀',
|
||||
'open' => true,
|
||||
'buttons' => [
|
||||
[
|
||||
'label' => 'Programmazione',
|
||||
'icon' => '🗓️',
|
||||
'class' => 'btn-programmazione',
|
||||
'url' => 'produzione_programmazione_drag.php',
|
||||
'permission' => 'production.programming.view',
|
||||
],
|
||||
[
|
||||
'label' => 'Line View',
|
||||
'icon' => '⚙️',
|
||||
'class' => 'btn-status',
|
||||
'url' => 'production_line_view2.php',
|
||||
'permission' => 'production.line_view.view',
|
||||
],
|
||||
[
|
||||
'label' => 'Statistiche',
|
||||
'icon' => '📈',
|
||||
'class' => 'btn-statistiche',
|
||||
'url' => 'production_stats.php',
|
||||
'permission' => 'production.stats.view',
|
||||
],
|
||||
[
|
||||
'label' => 'Manager',
|
||||
'icon' => '👔',
|
||||
'class' => 'btn-manager',
|
||||
'url' => 'manager_produzione.php',
|
||||
'permission' => 'production.manager.view',
|
||||
],
|
||||
[
|
||||
'label' => 'Manager Stats',
|
||||
'icon' => '📊',
|
||||
'class' => 'btn-manager-stats',
|
||||
'url' => 'manager_stats.php',
|
||||
'permission' => 'production.manager_stats.view',
|
||||
],
|
||||
[
|
||||
'label' => 'Magazzino',
|
||||
'icon' => '📦',
|
||||
'class' => 'btn-magazzino',
|
||||
'url' => 'warehouse_dashboard.php',
|
||||
'permission' => 'warehouse.dashboard.view',
|
||||
],
|
||||
[
|
||||
'label' => 'Scadenziario',
|
||||
'icon' => '⏰',
|
||||
'class' => 'btn-scadenziario',
|
||||
'url' => 'scadenzario/index.php',
|
||||
'permission' => 'deadlines.view',
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'id' => 'secAnagrafiche',
|
||||
'title' => 'Anagrafiche',
|
||||
'subtitle' => 'Dati di base e setup di produzione',
|
||||
'icon' => '🗂️',
|
||||
'open' => false,
|
||||
'buttons' => [
|
||||
[
|
||||
'label' => 'Mescole',
|
||||
'icon' => '⚗️',
|
||||
'class' => 'btn-mescole',
|
||||
'url' => 'mescole.php',
|
||||
'permission' => 'masterdata.mescole.view',
|
||||
],
|
||||
[
|
||||
'label' => 'Elenco Profili',
|
||||
'icon' => '🧩',
|
||||
'class' => 'btn-matrici',
|
||||
'url' => 'matrici.php',
|
||||
'permission' => 'masterdata.matrici.view',
|
||||
],
|
||||
[
|
||||
'label' => 'Linee Produzione',
|
||||
'icon' => '🏭',
|
||||
'class' => 'btn-linee',
|
||||
'url' => 'linee.php',
|
||||
'permission' => 'masterdata.linee.view',
|
||||
],
|
||||
[
|
||||
'label' => 'Imballaggi',
|
||||
'icon' => '📦',
|
||||
'class' => 'btn-setup',
|
||||
'url' => 'packaging_items.php',
|
||||
'permission' => 'masterdata.packaging.view',
|
||||
],
|
||||
[
|
||||
'label' => 'Suppliers',
|
||||
'icon' => '🏷️',
|
||||
'class' => 'btn-setup',
|
||||
'url' => 'suppliers.php',
|
||||
'permission' => 'masterdata.suppliers.view',
|
||||
],
|
||||
[
|
||||
'label' => 'Setup',
|
||||
'icon' => '⚙️',
|
||||
'class' => 'btn-setup',
|
||||
'url' => 'lookup_values.php',
|
||||
'permission' => 'masterdata.lookup.view',
|
||||
],
|
||||
[
|
||||
'label' => 'Fogli di lavoro',
|
||||
'icon' => '🗒️',
|
||||
'class' => 'btn-setup',
|
||||
'url' => 'worksheets.php',
|
||||
'permission' => 'masterdata.worksheets.view',
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'id' => 'secServizi',
|
||||
'title' => 'Servizi',
|
||||
'subtitle' => 'Status, cause pausa, attrezzature',
|
||||
'icon' => '🧰',
|
||||
'open' => false,
|
||||
'buttons' => [
|
||||
[
|
||||
'label' => 'Status',
|
||||
'icon' => '📋',
|
||||
'class' => 'btn-setup',
|
||||
'url' => 'production_status.php',
|
||||
'permission' => 'services.status.view',
|
||||
],
|
||||
[
|
||||
'label' => 'Cause di Pausa',
|
||||
'icon' => '🛑',
|
||||
'class' => 'btn-problem',
|
||||
'url' => 'production_pause_reasons.php',
|
||||
'permission' => 'services.pause_reasons.view',
|
||||
],
|
||||
[
|
||||
'label' => 'Attrezzature',
|
||||
'icon' => '🛠️',
|
||||
'class' => 'btn-tools',
|
||||
'url' => 'production_tools.php',
|
||||
'permission' => 'services.tools.view',
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'id' => 'secPersonale',
|
||||
'title' => 'Personale',
|
||||
'subtitle' => 'Dipendenti, skill',
|
||||
'icon' => '👥',
|
||||
'open' => false,
|
||||
'buttons' => [
|
||||
[
|
||||
'label' => 'Employees',
|
||||
'icon' => '👥',
|
||||
'class' => 'btn-employees',
|
||||
'url' => 'employees.php',
|
||||
'permission' => 'hr.employees.view',
|
||||
],
|
||||
[
|
||||
'label' => 'Departments',
|
||||
'icon' => '🏢',
|
||||
'class' => 'btn-departments',
|
||||
'url' => 'departments.php',
|
||||
'permission' => 'hr.departments.view',
|
||||
],
|
||||
[
|
||||
'label' => 'Skills',
|
||||
'icon' => '🧠',
|
||||
'class' => 'btn-setup',
|
||||
'url' => 'skills.php',
|
||||
'permission' => 'hr.skills.view',
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
?>
|
||||
<!doctype html>
|
||||
<html lang="it">
|
||||
|
||||
@@ -396,188 +576,71 @@
|
||||
<!-- ===== SEZIONI COLLASSABILI ===== -->
|
||||
<div class="sections-wrap" id="prodAccordion">
|
||||
|
||||
<!-- OPERATIVO -->
|
||||
<div class="section-card">
|
||||
<button type="button" class="section-header" data-bs-toggle="collapse" data-bs-target="#secOperativo" aria-expanded="true" aria-controls="secOperativo">
|
||||
<div class="section-left">
|
||||
<div class="section-icon">🚀</div>
|
||||
<div style="min-width:0;">
|
||||
<p class="section-title">Operativo</p>
|
||||
<p class="section-subtitle">Azioni principali di produzione e attività in scadenza</p>
|
||||
<?php
|
||||
$hasVisibleSections = false;
|
||||
|
||||
foreach ($dashboardSections as $section):
|
||||
$buttons = visibleButtons($section['buttons']);
|
||||
|
||||
// If no visible buttons are available, do not show the section.
|
||||
if (empty($buttons)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$hasVisibleSections = true;
|
||||
|
||||
$sectionId = htmlspecialchars($section['id'], ENT_QUOTES, 'UTF-8');
|
||||
$isOpen = !empty($section['open']);
|
||||
?>
|
||||
|
||||
<div class="section-card">
|
||||
<button type="button"
|
||||
class="section-header"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#<?= $sectionId ?>"
|
||||
aria-expanded="<?= $isOpen ? 'true' : 'false' ?>"
|
||||
aria-controls="<?= $sectionId ?>">
|
||||
<div class="section-left">
|
||||
<div class="section-icon"><?= htmlspecialchars($section['icon'], ENT_QUOTES, 'UTF-8') ?></div>
|
||||
<div style="min-width:0;">
|
||||
<p class="section-title"><?= htmlspecialchars($section['title'], ENT_QUOTES, 'UTF-8') ?></p>
|
||||
<p class="section-subtitle"><?= htmlspecialchars($section['subtitle'], ENT_QUOTES, 'UTF-8') ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chev">⌄</div>
|
||||
</button>
|
||||
<div class="chev">⌄</div>
|
||||
</button>
|
||||
|
||||
<div id="secOperativo" class="collapse show" data-bs-parent="#prodAccordion">
|
||||
<div class="section-body">
|
||||
<div class="dashboard-grid">
|
||||
<button class="dash-btn btn-programmazione" onclick="location.href='produzione_programmazione_drag.php'">
|
||||
<div class="dash-icon">🗓️</div>
|
||||
<div>Programmazione</div>
|
||||
</button>
|
||||
<div id="<?= $sectionId ?>"
|
||||
class="collapse <?= $isOpen ? 'show' : '' ?>"
|
||||
data-bs-parent="#prodAccordion">
|
||||
<div class="section-body">
|
||||
<div class="dashboard-grid">
|
||||
|
||||
<?php foreach ($buttons as $button): ?>
|
||||
<button class="dash-btn <?= htmlspecialchars($button['class'], ENT_QUOTES, 'UTF-8') ?>"
|
||||
onclick="location.href='<?= htmlspecialchars($button['url'], ENT_QUOTES, 'UTF-8') ?>'">
|
||||
<div class="dash-icon"><?= htmlspecialchars($button['icon'], ENT_QUOTES, 'UTF-8') ?></div>
|
||||
<div><?= htmlspecialchars($button['label'], ENT_QUOTES, 'UTF-8') ?></div>
|
||||
</button>
|
||||
<?php endforeach; ?>
|
||||
|
||||
|
||||
<button class="dash-btn btn-status" onclick="location.href='production_line_view2.php'">
|
||||
<div class="dash-icon">⚙️</div>
|
||||
<div>Line View</div>
|
||||
</button>
|
||||
|
||||
<button class="dash-btn btn-statistiche" onclick="location.href='production_stats.php'">
|
||||
<div class="dash-icon">📈</div>
|
||||
<div>Statistiche</div>
|
||||
</button>
|
||||
|
||||
<button class="dash-btn btn-manager" onclick="location.href='manager_produzione.php'">
|
||||
<div class="dash-icon">👔</div>
|
||||
<div>Manager</div>
|
||||
</button>
|
||||
|
||||
<button class="dash-btn btn-manager-stats" onclick="location.href='manager_stats.php'">
|
||||
<div class="dash-icon">📊</div>
|
||||
<div>Manager Stats</div>
|
||||
</button>
|
||||
|
||||
<button class="dash-btn btn-magazzino" onclick="location.href='warehouse_dashboard.php'">
|
||||
<div class="dash-icon">📦</div>
|
||||
<div>Magazzino</div>
|
||||
|
||||
</button>
|
||||
<button class="dash-btn btn-scadenziario" onclick="location.href='scadenzario/index.php'">
|
||||
<div class="dash-icon">⏰</div>
|
||||
<div>Scadenziario</div>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ANAGRAFICHE -->
|
||||
<div class="section-card">
|
||||
<button type="button" class="section-header" data-bs-toggle="collapse" data-bs-target="#secAnagrafiche" aria-expanded="false" aria-controls="secAnagrafiche">
|
||||
<div class="section-left">
|
||||
<div class="section-icon">🗂️</div>
|
||||
<div style="min-width:0;">
|
||||
<p class="section-title">Anagrafiche</p>
|
||||
<p class="section-subtitle">Dati di base e setup di produzione</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chev">⌄</div>
|
||||
</button>
|
||||
<div id="secAnagrafiche" class="collapse" data-bs-parent="#prodAccordion">
|
||||
<div class="section-body">
|
||||
<div class="dashboard-grid">
|
||||
<button class="dash-btn btn-mescole" onclick="location.href='mescole.php'">
|
||||
<div class="dash-icon">⚗️</div>
|
||||
<div>Mescole</div>
|
||||
</button>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<button class="dash-btn btn-matrici" onclick="location.href='matrici.php'">
|
||||
<div class="dash-icon">🧩</div>
|
||||
<div>Elenco Profili</div>
|
||||
</button>
|
||||
|
||||
<button class="dash-btn btn-linee" onclick="location.href='linee.php'">
|
||||
<div class="dash-icon">🏭</div>
|
||||
<div>Linee Produzione</div>
|
||||
</button>
|
||||
|
||||
<button class="dash-btn btn-setup" onclick="location.href='packaging_items.php'">
|
||||
<div class="dash-icon">📦</div>
|
||||
<div>Imballaggi</div>
|
||||
</button>
|
||||
|
||||
<button class="dash-btn btn-setup" onclick="location.href='suppliers.php'">
|
||||
<div class="dash-icon">🏷️</div>
|
||||
<div>Suppliers</div>
|
||||
</button>
|
||||
|
||||
<button class="dash-btn btn-setup" onclick="location.href='lookup_values.php'">
|
||||
<div class="dash-icon">⚙️</div>
|
||||
<div>Setup</div>
|
||||
</button>
|
||||
<button class="dash-btn btn-setup" onclick="location.href='worksheets.php'">
|
||||
<div class="dash-icon">🗒️</div>
|
||||
<div>Fogli di lavoro</div>
|
||||
</button>
|
||||
</div>
|
||||
<?php if (!$hasVisibleSections): ?>
|
||||
<div class="section-card">
|
||||
<div class="section-body text-center">
|
||||
Nessuna sezione disponibile per il tuo profilo.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- QUALITÀ / SERVIZI -->
|
||||
<div class="section-card">
|
||||
<button type="button" class="section-header" data-bs-toggle="collapse" data-bs-target="#secServizi" aria-expanded="false" aria-controls="secServizi">
|
||||
<div class="section-left">
|
||||
<div class="section-icon">🧰</div>
|
||||
<div style="min-width:0;">
|
||||
<p class="section-title">Servizi</p>
|
||||
<p class="section-subtitle">Status, cause pausa, attrezzature</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chev">⌄</div>
|
||||
</button>
|
||||
|
||||
<div id="secServizi" class="collapse" data-bs-parent="#prodAccordion">
|
||||
<div class="section-body">
|
||||
<div class="dashboard-grid">
|
||||
<button class="dash-btn btn-setup" onclick="location.href='production_status.php'">
|
||||
<div class="dash-icon">📋</div>
|
||||
<div>Status</div>
|
||||
</button>
|
||||
|
||||
<button class="dash-btn btn-problem" onclick="location.href='production_pause_reasons.php'">
|
||||
<div class="dash-icon">🛑</div>
|
||||
<div>Cause di Pausa</div>
|
||||
</button>
|
||||
|
||||
<button class="dash-btn btn-tools" onclick="location.href='production_tools.php'">
|
||||
<div class="dash-icon">🛠️</div>
|
||||
<div>Attrezzature</div>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- PERSONALE -->
|
||||
<div class="section-card">
|
||||
<button type="button" class="section-header" data-bs-toggle="collapse" data-bs-target="#secPersonale" aria-expanded="false" aria-controls="secPersonale">
|
||||
<div class="section-left">
|
||||
<div class="section-icon">👥</div>
|
||||
<div style="min-width:0;">
|
||||
<p class="section-title">Personale</p>
|
||||
<p class="section-subtitle">Dipendenti, skill</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chev">⌄</div>
|
||||
</button>
|
||||
|
||||
<div id="secPersonale" class="collapse" data-bs-parent="#prodAccordion">
|
||||
<div class="section-body">
|
||||
<div class="dashboard-grid">
|
||||
|
||||
<button class="dash-btn btn-employees" onclick="location.href='employees.php'">
|
||||
<div class="dash-icon">👥</div>
|
||||
<div>Employees</div>
|
||||
</button>
|
||||
|
||||
<button class="dash-btn btn-departments" onclick="location.href='departments.php'">
|
||||
<div class="dash-icon">🏢</div>
|
||||
<div>Departments</div>
|
||||
</button>
|
||||
|
||||
<button class="dash-btn btn-setup" onclick="location.href='skills.php'">
|
||||
<div class="dash-icon">🧠</div>
|
||||
<div>Skills</div>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div> <!-- /sections-wrap -->
|
||||
</div>
|
||||
<!-- /sections-wrap -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user