|
|
@@ -148,7 +148,7 @@ class Przypomnij {
|
|
|
$r->_l_app_date = $r->L_APPOITMENT_DATE;
|
|
|
$this->_data['proces'][$r->ID] = $r;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
$sqlAclFltrProblems = "
|
|
|
and (probl.`A_ADM_COMPANY` in({$sqlUsrAclGroups})
|
|
|
or probl.`A_CLASSIFIED` in({$sqlUsrAclGroups})
|
|
|
@@ -184,6 +184,36 @@ class Przypomnij {
|
|
|
$this->_data['task'][$r->ID] = $r;
|
|
|
}
|
|
|
|
|
|
+ $sqlAclFltrProces = "
|
|
|
+ and (p.`A_ADM_COMPANY` in({$sqlUsrAclGroups})
|
|
|
+ or p.`A_CLASSIFIED` in({$sqlUsrAclGroups})
|
|
|
+ or p.`L_APPOITMENT_USER`='{$userLogin}'
|
|
|
+ )
|
|
|
+ ";
|
|
|
+ $sql = "select p.ID
|
|
|
+ , p.`DESC`
|
|
|
+ , p.`A_STATUS`
|
|
|
+ , p.`TYPE`
|
|
|
+ , p.`L_APPOITMENT_DATE`
|
|
|
+ , p.`L_APPOITMENT_USER`
|
|
|
+ , p.`L_APPOITMENT_INFO`
|
|
|
+ from `CRM_LISTA_ZASOBOW` as p
|
|
|
+ where p.`A_STATUS` in('NORMAL', 'WAITING')
|
|
|
+ and p.`L_APPOITMENT_DATE`!=''
|
|
|
+ and p.`L_APPOITMENT_USER`!=''
|
|
|
+ {$sqlAclFltrProces}
|
|
|
+ ";
|
|
|
+ $res = $db->query($sql);
|
|
|
+ while ($r = $db->fetch($res)) {
|
|
|
+ $r->_task_type = 'zasob';
|
|
|
+ $r->_show = false;
|
|
|
+ $r->_title = $r->DESC;
|
|
|
+ $r->_type = $r->TYPE;
|
|
|
+ $r->_l_app = $r->L_APPOITMENT_USER;
|
|
|
+ $r->_l_app_date = $r->L_APPOITMENT_DATE;
|
|
|
+ $this->_data['zasob'][$r->ID] = $r;
|
|
|
+ }
|
|
|
+
|
|
|
$this->_fetchLAppUsers();
|
|
|
}
|
|
|
|
|
|
@@ -600,9 +630,9 @@ if(V::get('DBG_P', '', $_GET) > 2){echo'<pre style="max-height:200px;overflow:au
|
|
|
if (!isset($this->_tblIdCache[$type])) {
|
|
|
$this->_tblIdCache[$type] = null;
|
|
|
|
|
|
- $allowedTypes = array('projekt', 'proces', 'koresp', 'task');
|
|
|
+ $allowedTypes = array('projekt', 'proces', 'koresp', 'task', 'zasob');
|
|
|
if (empty($type) || !in_array($type, $allowedTypes)) {
|
|
|
- echo '<div class="alert alert-danger cls-line-' . __LINE__ . '">' . "Brak dostępu" . '</div>';
|
|
|
+ echo '<div class="alert alert-danger cls-line-' . __LINE__ . '">' . "Brak dostępu #" . __LINE__ . '</div>';
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
@@ -620,8 +650,11 @@ if(V::get('DBG_P', '', $_GET) > 2){echo'<pre style="max-height:200px;overflow:au
|
|
|
case 'task':
|
|
|
$this->_tblIdCache[$type] = ProcesHelper::getZasobTableID('PROBLEMS');
|
|
|
break;
|
|
|
+ case 'zasob':
|
|
|
+ $this->_tblIdCache[$type] = ProcesHelper::getZasobTableID('CRM_LISTA_ZASOBOW');
|
|
|
+ break;
|
|
|
default:
|
|
|
- echo '<div class="alert alert-danger cls-line-' . __LINE__ . '">' . "Brak dostępu" . '</div>';
|
|
|
+ echo '<div class="alert alert-danger cls-line-' . __LINE__ . '">' . "Brak dostępu #" . __LINE__ . '</div>';
|
|
|
return null;
|
|
|
}
|
|
|
}
|