rifattoizzata gestione immagni articoli con tabella kendo

This commit is contained in:
2025-09-01 15:48:15 +02:00
parent a053096cee
commit e8287bd36c
10 changed files with 3697 additions and 621 deletions

View File

@@ -3,6 +3,21 @@
<component name="PhpDockerContainerSettings">
<list>
<map>
<entry key="567d2c7a-851a-482a-b1f0-351a5d183c75">
<value>
<DockerContainerSettings>
<option name="version" value="1" />
<option name="volumeBindings">
<list>
<DockerVolumeBindingImpl>
<option name="containerPath" value="/opt/project" />
<option name="hostPath" value="$PROJECT_DIR$" />
</DockerVolumeBindingImpl>
</list>
</option>
</DockerContainerSettings>
</value>
</entry>
<entry key="798c1055-f5cd-4fc7-94ce-172726f2f18a">
<value>
<DockerContainerSettings>

67
.idea/php.xml generated
View File

@@ -11,7 +11,7 @@
</component>
<component name="PhpCodeSniffer">
<phpcs_settings>
<phpcs_by_interpreter asDefaultInterpreter="true" interpreter_id="1864307c-cd7f-480f-80fe-4bf27e854f94" timeout="30000" />
<phpcs_by_interpreter asDefaultInterpreter="true" interpreter_id="567d2c7a-851a-482a-b1f0-351a5d183c75" timeout="30000" />
</phpcs_settings>
</component>
<component name="PhpDebugIgnoredPathsSettings">
@@ -79,6 +79,70 @@
<path value="$PROJECT_DIR$/public_html/vendor/phpfastcache/phpfastcache" />
</include_path>
</component>
<component name="PhpInterpreters">
<interpreters>
<interpreter id="567d2c7a-851a-482a-b1f0-351a5d183c75" name="pvm-php-apache:latest" home="docker://DATA" auto="false" debugger_id="php.debugger.XDebug">
<remote_data INTERPRETER_PATH="php" HELPERS_PATH="/opt/.phpstorm_helpers" VALID="true" RUN_AS_ROOT_VIA_SUDO="false" DOCKER_ACCOUNT_NAME="Docker" DOCKER_IMAGE_NAME="pvm-php-apache:latest" DOCKER_REMOTE_PROJECT_PATH="/opt/project" />
</interpreter>
</interpreters>
</component>
<component name="PhpInterpretersPhpInfoCache">
<phpInfoCache>
<interpreter name="pvm-php-apache:latest">
<phpinfo binary_type="PHP" php_cli="/usr/local/bin/php" path_separator=":" version="7.4.33">
<additional_php_ini>/usr/local/etc/php/conf.d/docker-php-ext-gd.ini, /usr/local/etc/php/conf.d/docker-php-ext-imagick.ini, /usr/local/etc/php/conf.d/docker-php-ext-sodium.ini, /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini, /usr/local/etc/php/conf.d/docker-php-ext-zip.ini, /usr/local/etc/php/conf.d/error_reporting.ini</additional_php_ini>
<configuration_file>/usr/local/etc/php/php.ini</configuration_file>
<configuration_options>
<configuration_option name="include_path" value=".:/usr/local/lib/php" />
</configuration_options>
<debuggers>
<debugger_info debugger="xdebug" debugger_version="3.1.6">
<debug_extensions />
</debugger_info>
</debuggers>
<loaded_extensions>
<extension name="Core" />
<extension name="PDO" />
<extension name="Phar" />
<extension name="Reflection" />
<extension name="SPL" />
<extension name="SimpleXML" />
<extension name="ctype" />
<extension name="curl" />
<extension name="date" />
<extension name="dom" />
<extension name="fileinfo" />
<extension name="filter" />
<extension name="ftp" />
<extension name="gd" />
<extension name="hash" />
<extension name="iconv" />
<extension name="imagick" />
<extension name="json" />
<extension name="libxml" />
<extension name="mbstring" />
<extension name="mysqlnd" />
<extension name="openssl" />
<extension name="pcre" />
<extension name="pdo_sqlite" />
<extension name="posix" />
<extension name="readline" />
<extension name="session" />
<extension name="sodium" />
<extension name="sqlite3" />
<extension name="standard" />
<extension name="tokenizer" />
<extension name="xdebug" />
<extension name="xml" />
<extension name="xmlreader" />
<extension name="xmlwriter" />
<extension name="zip" />
<extension name="zlib" />
</loaded_extensions>
</phpinfo>
</interpreter>
</phpInfoCache>
</component>
<component name="PhpProjectSharedConfiguration">
<option name="suggestChangeDefaultLanguageLevel" value="false" />
</component>
@@ -92,6 +156,7 @@
</component>
<component name="PhpUnit">
<phpunit_settings>
<phpunit_by_interpreter interpreter_id="567d2c7a-851a-482a-b1f0-351a5d183c75" custom_loader_path="C:/work/Prod_Web/PVM/public_html/vendor/autoload.php" />
<PhpUnitSettings custom_loader_path="$PROJECT_DIR$/public_html/vendor/autoload.php" />
</phpunit_settings>
</component>

View File

@@ -5,6 +5,9 @@ ARG PHP_VERSION="7.4"
# Immagine finale
FROM php:${PHP_VERSION}-apache-bullseye AS final
COPY --from=composer /usr/bin/composer /usr/bin/composer
RUN composer self-update
# Enable Apache modules to ensure proper functionality
RUN a2enmod rewrite

View File

@@ -21,6 +21,7 @@ class ArticoliAnag {
foreach ($arr_rows as $i => $row) {
$arr_photo = array();
$arr_files = array();
$codMart = $row["cod_mart"];
$row["descr_articolo"] = htmlentities($row["descr_articolo"]);
@@ -35,26 +36,33 @@ class ArticoliAnag {
);
$allowDelete = $allegato["allow_delete"];
$fileName = $allegato["file_name"];
if (Utility\File::isImageFromName($allegato["file_name"])) {
$downloadUrl = Allegati::getRenderedFileUrl($key, "articolo", array("targetName" => $allegato["cod_mart"] . " - " . $allegato["id_riga"]));
$downloadUrl = Allegati::getRenderedFileUrl($key, "articolo", array("targetName" => $allegato["cod_mart"] . " - " . $allegato["id_riga"]));
if ($downloadUrl) {
if ($downloadUrl) {
if (Utility\File::isImageFromName($allegato["file_name"])) {
$arr_photo[] = array(
"key" => $key,
"cache_path" => $downloadUrl,
"allow_delete" => $allowDelete
"allow_delete" => $allowDelete,
"file_name" => $fileName
);
} else {
break;
$arr_files[] = array(
"key" => $key,
"cache_path" => $downloadUrl,
"allow_delete" => $allowDelete,
"file_name" => $fileName
);
}
}
}
$row["allegati"] = $arr_photo;
$row["arr_files"] = $arr_files;
}
$arr_rows[$i] = $row;
}
@@ -136,4 +144,4 @@ class ArticoliAnag {
}
return $ret;
}
}
}

View File

@@ -0,0 +1 @@
.modal-title{margin:0;line-height:1.42857143;font-size:18px;font-weight:500;text-align:center}.modal-body{position:relative;padding:15px;max-height:70vh;overflow-y:auto}.panel-default{border-color:#ddd}.panel-toggle-link{color:#333;text-decoration:none;display:flex;align-items:center;justify-content:space-between}.panel-body{padding:15px}.panel-body-no-padding{padding:0}.modal-body .container-fluid{display:flex;align-items:center;gap:10px}.document-container{display:grid;grid-template-columns:repeat(4, 1fr);grid-gap:10px 10px;justify-items:center}.image-container{display:grid;grid-template-columns:repeat(3, 1fr);justify-items:center}.image-item{width:280px}.document-item{width:100%}/*# sourceMappingURL=modal.css.map */

View File

@@ -1,52 +1,105 @@
<div class="container-fluid">
<div class="container-fluid" id="container-fluid">
<div class="row mt-20">
<div class="col-xs-12 col-md-12">
<table id="list-articoli" class="table table-hover table-striped">
<thead>
<tr class="filters">
<!-- <th class="icon-holder">-->
<!-- <a href="#"><i class="fa fa-filter fa-lg tableFilter-btn"></i></a>-->
<!-- </th>-->
<th>
<label class="table-label" for="filter_articolo">Articolo</label>
<input type="text" id="filter_articolo" name="filter_articolo"
class="form-control input-sm font-weight-normal filterInput" placeholder="Articolo"/>
</th>
<th>
<label class="table-label" for="filter_gruppo">Gruppo</label>
<input type="text" id="filter_gruppo" name="filter_gruppo"
class="form-control input-sm font-weight-normal filterInput" placeholder="Gruppo"/>
</th>
<th>
<label class="table-label" for="filter_sottogruppo">Sottogruppo</label>
<input type="text" id="filter_sottogruppo" name="filter_sottogruppo"
class="form-control input-sm font-weight-normal filterInput" placeholder="Sottogruppo"/>
</th>
<th>
<label class="table-label" for="filter_sottofamiglia">Sottofamiglia</label>
<input type="text" id="filter_sottofamiglia" name="filter_sottofamiglia"
class="form-control input-sm font-weight-normal filterInput"
placeholder="Sottofamiglia"/>
</th>
<th>
<label class="table-label" for="filter_unitaMisura">Unità Misura</label>
<input style="text-align: center" type="text" id="filter_unitaMisura" name="filter_unitaMisura"
class="form-control input-sm font-weight-normal filterInput" placeholder="Unità Misura"/>
</th>
<div id="grid"></div>
<th>Foto</th>
</tr>
</thead>
<tbody>
</tbody>
<tfoot>
<tr>
<td colspan="12" class="p-0">
<ul id="paginator" class="pagination my-10 pull-right"></ul>
</td>
</tr>
</tfoot>
</table>
<!-- <div id="imageModal" class="modal fade" tabindex="-1" role="dialog">-->
<!-- <div class="modal-dialog modal-lg" role="document">-->
<!-- <div class="modal-content">-->
<!-- <div class="modal-header" style="overflow: visible;">-->
<!---->
<!-- <button type="button" class="close" data-dismiss="modal" aria-label="Close" style="float:right;">-->
<!-- <span aria-hidden="true">&times;</span>-->
<!-- </button>-->
<!-- <h4 class="modal-title" style="clear:both;">Immagini Prodotto</h4>-->
<!---->
<!-- </div>-->
<!-- <div class="modal" id="confermaContainer" style=" width: 350px; height: 120px; border-radius:12px; padding: 20px; background: #ffffff; box-shadow: 0px 10px 25px rgba(0, 0, 0, 0.2); display:none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 1051; flex-direction: column; align-items: center; justify-content: center; ">-->
<!-- <p>Sei sicuro di voler eliminare questo elemento?</p>-->
<!-- <div class="btn-group" style="top: 20px; left: 40px; display:flex; gap: 10px">-->
<!-- <button onclick="confElimina()" class="btn btn-danger">-->
<!-- <i class="fa fa-trash"></i> , elimina-->
<!-- </button>-->
<!-- <button onclick="annulElimina()" class="btn btn-secondary">-->
<!-- <i class="fa fa-times"></i> Annulla-->
<!-- </button>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="modal-body">-->
<!-- <div class="container">-->
<!---->
<!-- <div style="width:300px; background: #bbafaf; float:left; margin-bottom:10px;">-->
<!-- <input class="btn btn-primary" style="border-color: #bbafaf; background: #bbafaf;" name="files" id="files" type="file" aria-label="Allega Foto" multiple />-->
<!-- </div>-->
<!---->
<!-- <div style="width:350px; background: #bbafaf; float:left; margin-left:10px; margin-bottom:10px;">-->
<!-- <div class="input-group">-->
<!-- <input type="text" id="imageUrlInput" class="form-control" placeholder="Inserisci URL immagine" aria-label="URL Immagine">-->
<!-- <span class="input-group-btn" style="border-color: #bbafaf;">-->
<!-- <button class="btn btn-primary" style="border-color: #bbafaf; background: #bbafaf;" id="addImageUrlBtn" type="button">Aggiungi URL</button>-->
<!-- </span>-->
<!-- </div>-->
<!-- </div>-->
<!---->
<!---->
<!-- </div>-->
<!---->
<!---->
<!-- <br>-->
<!-- <div class="image-bar" id="toggleImages" style="border: 1px solid lightgrey; background: #eeeeee; padding: 15px 20px; cursor: pointer; display: flex; justify-content: space-between; align-items: center;">-->
<!-- <strong>Immagini</strong>-->
<!-- <div id="arrow" style="font-size: 20px;"><i class="fas fa-caret-up"></i></div>-->
<!-- </div>-->
<!-- <div class="image-container" id="imageContainer" style="max-height: 400px; overflow: auto; transition: max-height 0.3s ease; border: 1px solid lightgrey"></div>-->
<!-- <div class="panel panel-default">-->
<!-- <div class="panel-heading" role="tab" id="headingImages">-->
<!-- <h4 class="panel-title">-->
<!-- <a role="button" data-toggle="collapse" href="#collapseImages" aria-expanded="true" aria-controls="collapseImages" style="display: flex; justify-content: space-between; align-items: center; text-decoration: none;">-->
<!-- <strong><u>Immagini</u></strong>-->
<!-- <span class="arrow-icon"><i class="fas fa-caret-up"></i></span>-->
<!-- </a>-->
<!-- </h4>-->
<!-- </div>-->
<!-- <div id="collapseImages" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingImages">-->
<!-- <div class="panel-body" style="padding: 0;">-->
<!-- <div class="image-container p-20" id="imageContainer" style="max-height: 400px; overflow: auto; border: 1px solid lightgrey"></div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!---->
<!-- <div class="panel panel-default">-->
<!-- <div class="panel-heading" role="tab" id="headingDocuments">-->
<!-- <h4 class="panel-title">-->
<!-- <a role="button" data-toggle="collapse" href="#collapseDocuments" aria-expanded="true" aria-controls="collapseDocuments" style="display: flex; justify-content: space-between; align-items: center; text-decoration: none;">-->
<!-- <strong><u>Documenti</u></strong>-->
<!-- <span class="arrow-icon"><i class="fas fa-caret-up"></i></span>-->
<!-- </a>-->
<!-- </h4>-->
<!-- </div>-->
<!-- <div id="collapseDocuments" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingDocuments">-->
<!-- <div class="panel-body" style="padding: 0;">-->
<!-- <div class="image-container1 p-20" id="imageContainer1" style="max-height: 400px; overflow: auto; border: 1px solid lightgrey"></div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="image-bar" id="toggleImages1" style="border: 1px solid lightgrey; background: #eeeeee; padding: 15px 20px; cursor: pointer; display: flex; justify-content: space-between; align-items: center;">-->
<!-- <strong>Documenti</strong>-->
<!-- <div id="arrow1" style="font-size: 20px;"><i class="fas fa-caret-up"></i></div>-->
<!-- </div>-->
<!-- <div class="image-container1" id="imageContainer1" style="max-height: 400px; overflow: auto; transition: max-height 0.3s ease; border: 1px solid lightgrey""></div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
</div>
</div>
</div>
</div>
</div>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,61 @@
.modal-title {
margin: 0;
line-height: 1.42857143;
font-size: 18px;
font-weight: 500;
text-align: center;
}
.modal-body {
position: relative;
padding: 15px;
max-height: 70vh;
overflow-y: auto;
}
.panel-default {
border-color: #ddd;
}
.panel-toggle-link {
color: #333;
text-decoration: none;
display: flex;
align-items: center;
justify-content: space-between;
}
.panel-body {
padding: 15px;
}
.panel-body-no-padding {
padding: 0;
}
.modal-body .container-fluid{
display: flex;
align-items: center;
gap: 10px;
}
.document-container {
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-gap: 10px 10px;
justify-items: center;
}
.image-container {
display: grid;
grid-template-columns: repeat(3, 1fr);
justify-items: center;
}
.image-item{
width: 280px;
}
.document-item{
width: 100%;
}