Aggiunta impostazione per gestire checklist genitore come titolo

This commit is contained in:
MatteoPistorello 2023-07-18 17:08:33 +02:00
parent 78a303f892
commit 4e5bb66b51
3 changed files with 28 additions and 20 deletions

View File

@ -33,14 +33,14 @@ if($main_check){
?>
<div class="row">
<div class="col-md-6">
<div class="col-md-12">
{[ "type": "text", "label": "<?php echo tr('Descrizione'); ?>", "name": "content_edit", "required": 1, "value": "<?=$record->content?>" ]}
</div>
</div>
<div class="row">
<div class="col-md-12 text-right">
<button type="button" class="btn btn-success" id="save-btn"><i class='fa fa-save'></i> <?php echo tr('Salva'); ?></button>
<button type="button" class="btn btn-success" id="save-btn"><i class='fa fa-check'></i> <?php echo tr('Salva'); ?></button>
</div>
</div>

View File

@ -31,41 +31,48 @@ function renderChecklist($check, $level = 1, $parent = 0) {
<td style="padding-top:0px;padding-bottom:0px;border-top:0px;">
<table class="table" style="margin-bottom:0px;">
<tr>';
$result .= '
if (sizeof($check->children)>0 && setting('Utilizzare checklist genitore come titolo')) {
$result .= '
<td style="width:40px;"></td>
<td colspan="3" style="border-top:0px;">
<span class="text unblockable"><big>'.$check->content.'</big></span>
</td>';
} else {
$result .= '
<td style="width:40px;text-align:center;border-top:0px;border-left:3px solid #eaeaea;">
<input type="checkbox" class="checkbox unblockable" data-id="'.$check->id.'" value="'.(!empty($check->checked_at) ? '1' : '0').'" '.(!empty($check->checked_at) ? 'checked' : '').' '.(!$enabled ? 'disabled' : '').'>
</td>';
$result .= '
$result .= '
<td style="border-top:0px;">
<span class="text unblockable" style="'.(!empty($check->checked_at)?'text-decoration:line-through;':'').'">'.$check->content.' </span>
</td>';
$result .= '
$result .= '
<td style="width:500px;border-top:0px;">
{[ "type": "textarea", "class": "unblockable", "name": "note_checklist", "placeholder": "'.tr('Note').'...", "id": "'.$check->id.'", "value": "'.$check->note.'" ]}
</td>';
$result .= '
$result .= '
<td style="width:250px;border-top:0px;">';
if (intval($check->assignedUsers->pluck('id')->toArray())>0){
$result .= ' <span class="label label-info pull-right" style="padding:6px 8px;" data-toggle="tooltip" title="Assegnato a '. implode(', ', $check->assignedUsers->pluck('username')->toArray()).'"><i class="fa fa-user"></i></span>';
}else{
$result .= ' <span class="label label-danger pull-right" style="padding:6px 8px;">'. tr('Nessun utente assegnato').'</span>';
}
if (intval($check->assignedUsers->pluck('id')->toArray())>0) {
$result .= ' <span class="label label-info pull-right" style="padding:6px 8px;" data-toggle="tooltip" title="Assegnato a '. implode(', ', $check->assignedUsers->pluck('username')->toArray()).'"><i class="fa fa-user"></i></span>';
} else {
$result .= ' <span class="label label-danger pull-right" style="padding:6px 8px;">'. tr('Nessun utente assegnato').'</span>';
}
if(!empty($check->checked_at)){
$result .= '
if (!empty($check->checked_at)) {
$result .= '
<span class="label label-default pull-right" style="margin-right:5px;padding:6px 8px;">'.(!empty($check->checked_at) ? tr('Verificato da _NAME_ il _DATE_', [
'_NAME_' => $check->checkUser->username,
'_DATE_' => timestampFormat($check->checked_at),
]) : '').'
</span>';
}
$result .= '
</td>';
}
$result .= '
</td>';
}
$result .= '
<td style="width:10px;text-align:center;border-top:0px;">
@ -76,8 +83,6 @@ function renderChecklist($check, $level = 1, $parent = 0) {
</div>
</td>';
$result .= '
</tr>';

View File

@ -12,4 +12,7 @@ UPDATE `zz_modules` SET `options` = 'SELECT\r\n |select| \r\nFROM \r\n `co
INSERT INTO `em_templates` (`id`, `id_module`, `name`, `icon`, `subject`, `tipo_reply_to`, `reply_to`, `cc`, `bcc`, `body`, `read_notify`, `predefined`, `note_aggiuntive`, `deleted_at`, `id_account`, `created_at`) VALUES (NULL, (SELECT `id` FROM `zz_modules` WHERE `name` = 'Scadenzario'), 'Sollecito di pagamento raggruppato per anagrafica', 'fa fa-envelope', 'Sollecito di pagamento fatture', '', '', '', '', '<html>\r\n<head>\r\n <title></title>\r\n <link href=\"https://svc.webspellchecker.net/spellcheck31/wscbundle/css/wsc.css\" rel=\"stylesheet\" type=\"text/css\" />\r\n</head>\r\n<body data-wsc-instance=\"true\">\r\n<p>Spett.le {ragione_sociale},</p>\r\n\r\n<p>da un riscontro contabile, ci risulta che le seguenti fatture a Voi intestate, siano scadute nelle seguenti date:</p>\r\n\r\n<p>{scadenze_fatture_scadute}</p>\r\n\r\n<p>La sollecitiamo pertanto di provvedere quanto prima a regolarizzare la sua situazione contabile.</p>\r\n\r\n<p>Se ha gi&agrave; provveduto al pagamento, ritenga nulla la presente.</p>\r\n\r\n<p>&nbsp;</p>\r\n\r\n<p>La ringraziamo e le porgiamo i nostri saluti.</p>\r\n</body>\r\n</html>\r\n', '0', '0', '', NULL, '1', NULL);
-- Aggiunta impostazione intervallo di tempo attività in minuti
INSERT INTO `zz_settings` (`nome`, `valore`, `tipo`, `editable`, `sezione`, `order`, `help`) VALUES ('Numero di minuti di avanzamento delle sessioni delle attività', '1', 'string', '1', 'Attività', NULL, 'Specifica di quanti minuti aumentare o diminuire le sessioni di lavoro delle attività');
INSERT INTO `zz_settings` (`nome`, `valore`, `tipo`, `editable`, `sezione`, `order`, `help`) VALUES ('Numero di minuti di avanzamento delle sessioni delle attività', '1', 'string', '1', 'Attività', NULL, 'Specifica di quanti minuti aumentare o diminuire le sessioni di lavoro delle attività');
-- Aggiunta impostazione titolo checklist
INSERT INTO `zz_settings` (`id`, `nome`, `valore`, `tipo`, `editable`, `sezione`, `created_at`, `order`, `help`) VALUES (NULL, 'Utilizzare checklist genitore come titolo', '0', 'boolean', '1', 'Generali', NULL, NULL, 'Attivando questa impostazione non sarà possibile spuntare le checklist genitore ma verranno utilizzate come titolo');