function ( $member = null ) {
$packagingIndexPage = GLM_MEMBERS_PACKAGING_PLUGIN_ADMIN_URL . '?page=glm-members-admin-menu-packaging-index&glm_action=index';
$packagesTable = GLM_MEMBERS_PACKAGING_PLUGIN_DB_PREFIX . "packages";
+ $packagingEditPage = GLM_MEMBERS_PLUGIN_ADMIN_MENU_URL_BASE.'member&glm_action=packaging&option=edit';
$content = [
'title' => 'Packaging',
'buttons' => [
'textSearch' => [
'order' => 2,
'component' => 'textSearch',
+ 'entityID' => 'packageID',
'table' => $packagesTable,
'fields' => "id, title, image, ref_dest",
- 'baseUrl' => GLM_MEMBERS_PLUGIN_ADMIN_MENU_URL_BASE.'member&glm_action=packaging',
- 'resultUrl' => GLM_MEMBERS_PLUGIN_ADMIN_MENU_URL_BASE.'member&glm_action=packaging&option=edit',
- 'entityID' => 'packageID'
+ 'resultUrl' => $packagingEditPage,
+ ],
+ 'active' => [
+ 'title' => "Active Packages",
+ 'slug' => "active-packages",
+ 'order' => 3,
+ 'component' => 'list',
+ 'entityID' => 'packageID',
+ 'table' => $packagesTable,
+ 'fields' => "id, title, ref_dest",
+ 'where' => 'status='.$this->config['status_numb']['Active'] . '',
+ 'resultUrl' => $packagingEditPage,
],
'pending' => [
'title' => "Pending Packages",
'slug' => "pending-packages",
'order' => 3,
'component' => 'list',
+ 'entityID' => 'packageID',
'table' => $packagesTable,
'fields' => "id, title, ref_dest",
- 'where' => 'status = '.$this->config['status_numb']['Pending'],
+ 'where' => 'status='.$this->config['status_numb']['Pending'] . '',
+ 'resultUrl' => $packagingEditPage,
],
'expired' => [
'title' => "Expired Packages",
'slug' => "expired-packages",
'order' => 4,
'component' => 'list',
+ 'entityID' => 'packageID',
'table' => $packagesTable,
'fields' => "id, title, ref_dest",
// 'fields' => [