Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
By Palele
#828679
At first, sorry for my english :) I created a plugin that displays the required information for a logged in user and by dbclick summary dynaform. But I would like to add case notes in that row like in advanced search. Is it possible? How can I do that?
Code: Select all
var storeUser = new Ext.data.Store({
      proxy:new Ext.data.HttpProxy({
        url:    "ajax/owncases",
        method: "POST"
      }),

      reader:new Ext.data.JsonReader({
        root: "resultRoot",
        totalProperty: "resultTotal",
        fields: [{name: "APP_UID"},
					{name: "REPLACER"},
					{name: "TEST1"},
					{name: "APP_TAS_TITLE"},
					{name: "TEST2"},
					{name: "APP_PRO_TITLE"},
					{name: "APP_INIT_DATE"}
                ]
      }),
Code: Select all
    var cmodel = new Ext.grid.ColumnModel({
      defaults: {
        width:50,
        sortable:true
      },
      columns:[//{header: "Numer systemowy", APP_UID: "APP_UID", dataIndex: "APP_UID", width: 40, align: "left" /*hidden: true*/},
				{header: "TEST1", dataIndex: "TEST1",width: 12, align: "center"},
				{header: "TEST2", dataIndex: "TEST2",width: 12, align: "center"},
				{header: "Aktualny stan zgłoszenia", dataIndex: "APP_TAS_TITLE", width: 30, align: "center"},
				{header: "Sprawą aktualnie zajmuje się", dataIndex: "OSOBA", width: 15, align: "center"},
				{header: "Rodzaj zgłoszenia", dataIndex: "APP_PRO_TITLE", width: 20, align: "center"},
				{header: "Data stworzenia zgłoszenia", dataIndex: "APP_INIT_DATE", width: 11, align: "center"},
              ]
    });
owncases.php
Code: Select all
<?php


$con = \Propel::getConnection('workflow');
$con->begin();
global $RBAC;
$userlogged = $_SESSION['USER_LOGGED'];

$sql = "SELECT A.APP_UID, A.APP_TAS_TITLE, B.TEST1, B.TEST2, A.APP_NUMBER, C.APP_INIT_DATE, CONCAT(U.USR_FIRSTNAME, ' ', U.USR_LASTNAME) AS OSOBA, A.APP_PRO_TITLE
		from application C, app_cache_view A, alt_case_info B, users U  
		where A.APP_UID = B.APP_UID AND C.APP_UID = B.APP_UID AND C.APP_UID = A.APP_UID AND C.APP_CUR_USER = U.USR_UID
		AND A.DEL_LAST_INDEX = 1 and C.APP_STATUS = 'TO_DO' AND C.APP_INIT_USER = '".$userlogged."' ";

$app_num = (int) $_POST['app_num'];
if (!empty($app_num)) {
   $sql .= " AND A.APP_NUMBER = ".$app_num;
}
$app_car = (string) $_POST['app_car'];
if (!empty($app_car)) {
   $sql .= " AND B.TEST2 LIKE '%".$app_car."%'";
}

$start_date = (date) $_POST['start_date'];
if (!empty($start_date)) {
   $sql .= " AND B.APP_INIT_DATE > ".$start_date;
}
$end_date = (date) $_POST['end_date'];
if (!empty($end_date)) {
   $sql .= " AND B.APP_INIT_DATE < ".$end_date;
}

$rs = $con->executeQuery($sql);
$rs->setFetchmode(\ResultSet::FETCHMODE_ASSOC); 
   
$cases = array();
$i=1;

while ($rs->next()) {
   $row = $rs->getRow();
   $cases[] = array(
		"ID"            => $i, 
        "APP_UID"    	=> $row['APP_UID'],
		"APP_TAS_TITLE" => $row['APP_TAS_TITLE'],
        "TEST1" 		=> $row['TEST1'],
		"TEST2" 	=> $row['TEST2'],
        "APP_NUMBER"  	=> $row['APP_NUMBER'],
        "OSOBA" 		=> $row['OSOBA'],
        "APP_PRO_TITLE" => $row['APP_PRO_TITLE'],
        "APP_INIT_DATE" => $row['APP_INIT_DATE']
   );
   $i++;
}
$con->commit();

echo G::json_encode(array(
   "success"     => true, 
   "resultTotal" => $i, 
   "resultRoot"  => $cases
));

?>
Attachments
1.PNG
1.PNG (31.87 KiB) Viewed 7721 times
By mohasami
#828720
programerboy wrote: Tue Nov 24, 2020 3:07 am Hi,
You can get Interface plugin and use its features:
http://pmlearning.info/plugin.php?t=Dedicated-panel-plugin-ProcessMaker
Thanks
i change menu like your plugin, but i have problems:
1) url address for inbox menu in main menu is not correct
2) how to show number of cases in inbox menu like cases list in sidebar menu

can you help me?
By Palele
#828856
programerboy wrote: Tue Nov 24, 2020 3:07 am Hi,
You can get Interface plugin and use its features:
http://pmlearning.info/plugin.php?t=Dedicated-panel-plugin-ProcessMaker
Thanks
Hi,
I would like to do it own and I got it. :D
obraz_2021-01-12_114431.png
obraz_2021-01-12_114431.png (27.92 KiB) Viewed 7121 times
mohasami wrote:
i change menu like your plugin, but i have problems:
1) url address for inbox menu in main menu is not correct
2) how to show number of cases in inbox menu like cases list in sidebar menu

can you help me?
I created my own database for another plugin because I use it to other stuff like charts or annual statistics.
I wrote some major database queries. Then using php and html code it displays it.

Betvisa clone scripts are pre-built software solut[…]

A Bet365 Clone Script is essentially a ready-made […]

BC. Game Clone Script is a ready-made software sol[…]

A cryptocurrency exchange script is essentially pr[…]