|
|
@@ -502,6 +502,133 @@ function validate() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private function operationalRaportNote() {
|
|
|
+ $refTable = BiAuditRefTables::getRefTable("BI_audit_operational_raport_note", $this->SOURCE['TABLE']);
|
|
|
+ if (!$refTable) throw new Exception("Brak konfiguracji notatki operacyjnej dla tabeli '{$this->SOURCE['TABLE']}'");
|
|
|
+ $action = V::get('action', '', $_POST);
|
|
|
+ switch ($action) {
|
|
|
+ case "add":
|
|
|
+ $sqlArr = array_filter([
|
|
|
+ 'OznaczenieSprawy' => trim(V::get('OznaczenieSprawy', '', $_POST)),
|
|
|
+ 'Oznaczenie_Sprawy_dla_eskalacji' => trim(V::get('Oznaczenie_Sprawy_dla_eskalacji', '', $_POST)),
|
|
|
+ 'Zglaszajacy' => trim(V::get('Zglaszajacy', '', $_POST)),
|
|
|
+ 'DataZgloszenia' => trim(V::get('DataZgloszenia', '', $_POST)),
|
|
|
+ 'note' => trim(V::get('note', '', $_POST)),
|
|
|
+ 'long_note' => trim(V::get('long_note', '', $_POST)),
|
|
|
+ 'Wnioski_z_analizy' => trim(V::get('Wnioski_z_analizy', '', $_POST)),
|
|
|
+ 'Wnioski_z_analizy_opis' => trim(V::get('Wnioski_z_analizy_opis', '', $_POST)),
|
|
|
+ 'action' => trim(V::get('form_action', '', $_POST)),
|
|
|
+ ], function($v) {
|
|
|
+ if ($v) return true;
|
|
|
+ return false;
|
|
|
+ });
|
|
|
+ $sqlArr['A_RECORD_CREATE_AUTHOR'] = User::getName();
|
|
|
+ $sqlArr['A_RECORD_CREATE_DATE'] = date('Y-m-d-H:i');
|
|
|
+ $noteId = DB::getPDO()->insert('BI_audit_operational_raport_note', $sqlArr);
|
|
|
+ if (!$noteId) throw new Exception("Wystąpił błąd podczas zapisywania notatki do bazy");
|
|
|
+ DB::getPDO()->insert($refTable, ['PRIMARY_KEY' => $noteId, 'REMOTE_PRIMARY_KEY' => $this->SOURCE['ID']]);
|
|
|
+?>
|
|
|
+<center>
|
|
|
+ <h4>Pomyślnie dodano notatkę operacyjną.</h4>
|
|
|
+ <a href="<?=$this->REFERER?>" class="btn btn-primary">Powrót</a>
|
|
|
+</center>
|
|
|
+<?php
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+?>
|
|
|
+<div class="container" style="margin-top:20px">
|
|
|
+ <form method="post" class="form-horizontal">
|
|
|
+ <legend>
|
|
|
+ Dodawanie notatki operacyjnej
|
|
|
+ <span class="pull-right">Tabela: <?=$this->SOURCE['TABLE']?>, rekord ID: <?=$this->SOURCE['ID']?></span>
|
|
|
+ </legend>
|
|
|
+ <div class="form-group">
|
|
|
+ <label class="col-sm-3 control-label">Oznaczenie sprawy</label>
|
|
|
+ <div class="col-sm-9">
|
|
|
+ <input type="text" class="form-control" name="OznaczenieSprawy" maxlength="100" autocomplete="off"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group">
|
|
|
+ <label class="col-sm-3 control-label">Oznaczenie sprawy dla eskalacji</label>
|
|
|
+ <div class="col-sm-9">
|
|
|
+ <input type="text" class="form-control" name="Oznaczenie_Sprawy_dla_eskalacji" maxlength="100" autocomplete="off"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group">
|
|
|
+ <label class="col-sm-3 control-label">Zgłaszający</label>
|
|
|
+ <div class="col-sm-9">
|
|
|
+ <input type="text" class="form-control" name="Zglaszajacy" maxlength="100" autocomplete="off"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group">
|
|
|
+ <label class="col-sm-3 control-label">Data zgłoszenia</label>
|
|
|
+ <div class="col-sm-2">
|
|
|
+ <div class="input-group">
|
|
|
+ <input type="text" class="form-control se_type-date" id="DataZgloszenia" name="DataZgloszenia" maxlength="10">
|
|
|
+ <span class="input-group-addon">
|
|
|
+ <span class="glyphicon glyphicon-calendar"/>
|
|
|
+ </span>
|
|
|
+ </input>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group">
|
|
|
+ <label class="col-sm-3 control-label">Tytuł notatki</label>
|
|
|
+ <div class="col-sm-9">
|
|
|
+ <input type="text" class="form-control" name="note" maxlength="255" autocomplete="off"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group">
|
|
|
+ <label class="col-sm-3 control-label">Pełny opis</label>
|
|
|
+ <div class="col-sm-9">
|
|
|
+ <textarea class="form-control" name="long_note" autocomplete="off"></textarea>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group">
|
|
|
+ <label class="col-sm-3 control-label">Wnioski z analizy</label>
|
|
|
+ <div class="col-sm-9">
|
|
|
+ <input type="text" class="form-control" name="Wnioski_z_analizy" maxlength="255" autocomplete="off"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group">
|
|
|
+ <label class="col-sm-3 control-label">Wnioski z analizy - opis</label>
|
|
|
+ <div class="col-sm-9">
|
|
|
+ <textarea class="form-control" name="Wnioski_z_analizy_opis" autocomplete="off"></textarea>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group">
|
|
|
+ <label class="col-sm-3 control-label">Akcja zgłoszenia</label>
|
|
|
+ <div class="col-sm-2">
|
|
|
+ <select name="form_action" class="form-control">
|
|
|
+ <option value="REPORT" selected>Eskaluj i alarmuj</option>
|
|
|
+ <option value="IGNORE">Ignoruj i nie pokazuj</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group">
|
|
|
+ <div class="col-sm-12">
|
|
|
+ <center>
|
|
|
+ <input type="hidden" name="REFERER" value="<?=$_SERVER['HTTP_REFERER']?>"/>
|
|
|
+ <button type="submit" class="btn btn-primary" name="action" value="add" style="width: 80px;">Dodaj</button>
|
|
|
+ <a href="<?=$_SERVER['HTTP_REFERER']?>" class="btn btn-default">Powrót</a>
|
|
|
+ </center>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+</div>
|
|
|
+<script>
|
|
|
+jQuery(document.getElementById('DataZgloszenia')).parent().datetimepicker({
|
|
|
+format: 'YYYY-MM-DD'
|
|
|
+, locale: 'pl'
|
|
|
+, showTodayButton: false
|
|
|
+, date: '<?=date("Y-m-d")?>'
|
|
|
+, maxDate: '<?=date("Y-m-d")?>'
|
|
|
+});
|
|
|
+</script>
|
|
|
+<?php
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
private function urlActionOnItem() {
|
|
|
try {
|
|
|
if (!$this->SOURCE) throw new Exception("Błąd danych");
|
|
|
@@ -516,6 +643,9 @@ function validate() {
|
|
|
if (in_array($this->SOURCE['TABLE'], ['BI_audit_KRS_person'])) $this->showKrsForKrsPerson();
|
|
|
else throw new Exception("Błąd wyzwolenia funkcji BiAuditGenerate");
|
|
|
break;
|
|
|
+ case "operationalRaportNote":
|
|
|
+ $this->operationalRaportNote();
|
|
|
+ break;
|
|
|
default:
|
|
|
switch ($this->SOURCE['TABLE']) {
|
|
|
case "BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA":
|
|
|
@@ -1769,8 +1899,11 @@ function toggleCheckSecond(check) {
|
|
|
if (($ID = V::get('ID_BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA', 0, $_GET, 'int')) > 0) $this->SOURCE['TABLE'] = 'BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA';
|
|
|
elseif (($ID = V::get('ID_BI_audit_ENERGA_PRACOWNICY', 0, $_GET, 'int')) > 0) $this->SOURCE['TABLE'] = 'BI_audit_ENERGA_PRACOWNICY';
|
|
|
elseif (($ID = V::get('ID_BI_audit_KRS', 0, $_GET, 'int')) > 0) $this->SOURCE['TABLE'] = 'BI_audit_KRS';
|
|
|
- elseif (($ID = V::get('ID_BI_audit_MSIG', 0, $_GET, 'int')) > 0) $this->SOURCE['TABLE'] = 'BI_audit_MSIG';
|
|
|
elseif (($ID = V::get('ID_BI_audit_KRS_person', 0, $_GET, 'int')) > 0) $this->SOURCE['TABLE'] = 'BI_audit_KRS_person';
|
|
|
+ elseif (($ID = V::get('ID_BI_audit_MSIG', 0, $_GET, 'int')) > 0) $this->SOURCE['TABLE'] = 'BI_audit_MSIG';
|
|
|
+ elseif (($ID = V::get('ID_BI_audit_MSIG_person', 0, $_GET, 'int')) > 0) $this->SOURCE['TABLE'] = 'BI_audit_MSIG_person';
|
|
|
+ elseif (($ID = V::get('ID_BI_audit_CEIDG', 0, $_GET, 'int')) > 0) $this->SOURCE['TABLE'] = 'BI_audit_CEIDG';
|
|
|
+ elseif (($ID = V::get('ID_BI_audit_CEIDG_pelnomocnicy', 0, $_GET, 'int')) > 0) $this->SOURCE['TABLE'] = 'BI_audit_CEIDG_pelnomocnicy';
|
|
|
if ($this->SOURCE) {
|
|
|
$this->SOURCE['ID'] = $ID;
|
|
|
$this->urlActionOnItem();
|