Show additional info on workflow inbox page

This commit is contained in:
Almira Krdzic
2018-08-29 11:37:24 +02:00
parent b99a0cb856
commit 057a99b8f5
2 changed files with 17 additions and 0 deletions

View File

@@ -25,8 +25,14 @@ class Wiaas_Delivery_Process {
add_action( 'gravityflow_workflow_complete', array(__CLASS__, 'maybe_complete_parent_process_step'), 5, 3 );
add_action( 'gravityflow_workflow_complete', array(__CLASS__, 'maybe_complete_parent_order'), 10, 3 );
add_filter('gravityflow_inbox_submitter_name',array(__CLASS__, 'display_step_name_in_inbox'), 10, 3);
}
public static function display_step_name_in_inbox($name, $entry, $form) {
return $entry['wiaas_delivery_step_name'];
}
/**
* Registers our Delivery Process Step Type as available Gravity Flow Step Type
*/
@@ -159,6 +165,16 @@ class Wiaas_Delivery_Process {
),
);
$entry_meta[ 'wiaas_delivery_step_name' ] = array(
'label' => 'Wiaas Delivery Step name',
'is_numeric' => false,
'update_entry_meta_callback' => null,
'is_default_column' => false, // this column will be displayed by default on the entry list
'filter' => array(
'operators' => array( 'is' ),
),
);
return $entry_meta;
}

View File

@@ -100,6 +100,7 @@ class Wiaas_Delivery_Process_Step extends Gravity_Flow_Step {
'form_id' => $this->target_form_id,
'wiaas_delivery_process_id' => $this->get_entry_id(),
'wiaas_delivery_order_id' => $entry['wiaas_delivery_order_id'],
'wiaas_delivery_step_name' => $this->get_name(),
);
$customer_id_value = null;