diff --git a/backend/app/plugins/wiaas/includes/admin/class-wiaas-admin-delivery-process.php b/backend/app/plugins/wiaas/includes/admin/class-wiaas-admin-delivery-process.php index 582eab6..db0f925 100644 --- a/backend/app/plugins/wiaas/includes/admin/class-wiaas-admin-delivery-process.php +++ b/backend/app/plugins/wiaas/includes/admin/class-wiaas-admin-delivery-process.php @@ -43,18 +43,23 @@ class Wiaas_Admin_Delivery_Process { continue; } - $is_step_running = $step->get_status() === 'pending'; - $is_step_completed = $step->get_status() === 'complete'; - $is_current_step = $step->get_id() === $current_step->get_id(); + $is_step_completed = $step->get_status() === 'complete' || $step->get_status() === 'approved'; + $is_current_step = $current_step && $step->get_id() === $current_step->get_id(); - //$disabled_style = $is_step_running ? '' : 'opacity: 0.5'; - $completed_style = $is_step_completed ? 'border-left: 4px solid #46b450;' : ''; + if ($is_current_step) { + $style = 'color: #FD8049;'; + } else if ($is_step_completed) { + $style = 'color: #34C388;'; + } else { + $style = 'opacity: 0.5; color: #CCC;'; + } ?> -
+

+ get_name(), 'wiaas') ?>

@@ -163,28 +168,38 @@ class Wiaas_Admin_Delivery_Process { $label = $field->get_field_label(false, $action_entry[$field->id]); echo '' . - '
' . $label . ' :
' . + '' . $label . ' : ' . '' . $value . '' . ''; } - if (! empty($current_action_step)) { + ?> - ?> + + + + - - - - - get_name() . ' ' . $current_action_step->get_status_label($current_action_step->get_status()) ?> - - - - + get_status_label($current_action_step->get_status()) . ': ' . $current_action_step->get_name(); + echo '' . + ' ' . + ''; + + } else { + echo $workflow_api->get_status($action_entry); + } + ?> + + + + + + + diff --git a/backend/app/plugins/wiaas/includes/class-wiaas-db-update.php b/backend/app/plugins/wiaas/includes/class-wiaas-db-update.php index 4d57c07..5368ef7 100644 --- a/backend/app/plugins/wiaas/includes/class-wiaas-db-update.php +++ b/backend/app/plugins/wiaas/includes/class-wiaas-db-update.php @@ -6,7 +6,6 @@ class Wiaas_DB_Update { private static $db_updates = array( '20180801222206' => 'wiaas_db_update_setup_gravity', - '20180802222206' => 'wiaas_db_update_add_delivery_process_forms', '20180811134511' => 'wiaas_db_update_enable_orders_access_management', '20180911101010' => 'wiaas_db_setup_exclusive_taxonomies', '20181003164100' => 'wiaas_db_setup_customer_capabilities', @@ -22,7 +21,7 @@ class Wiaas_DB_Update { '20191019014550' => 'wiaas_db_update_add_general_ui_fields', '20191019014650' => 'wiaas_db_update_add_product_properties_ui_fields', '20181019064450' => 'wiaas_db_update_add_bundle_properties_ui_field', - '20191020014650' => 'wiaas_create_organization_roles_capabilities' + '20191020014650' => 'wiaas_create_organization_roles_capabilities', ); public static function execute() { diff --git a/backend/app/plugins/wiaas/includes/class-wiaas-delivery-process.php b/backend/app/plugins/wiaas/includes/class-wiaas-delivery-process.php index f5d6dce..ddec2e9 100644 --- a/backend/app/plugins/wiaas/includes/class-wiaas-delivery-process.php +++ b/backend/app/plugins/wiaas/includes/class-wiaas-delivery-process.php @@ -11,21 +11,22 @@ defined( 'ABSPATH' ) || exit; class Wiaas_Delivery_Process { public static function init() { - self::_register_delivery_process_step_type(); + self::_register_delivery_process(); self::_init_hooks(); } private static function _init_hooks() { - add_action('woocommerce_new_order', array( __CLASS__, 'create_delivery_process_for_order' )); - // add_action( 'gravityflow_workflow_complete', array(__CLASS__, 'maybe_complete_parent_order'), 10, 3 ); + add_action( 'gravityflow_workflow_complete', array(__CLASS__, 'maybe_complete_parent_order'), 10, 2 ); } /** - * Registers our Delivery Process Step Type as available Gravity Flow Step Type + * + * Registers our Delivery Process Addons + * */ - private static function _register_delivery_process_step_type() { + private static function _register_delivery_process() { require_once( 'delivery-process/class-wiaas-delivery-process-step.php' ); require_once( 'delivery-process/class-wiaas-delivery-process-addon.php' ); @@ -39,9 +40,6 @@ class Wiaas_Delivery_Process { require_once( 'delivery-process/class-wiaas-field-order-supplier-select.php' ); require_once( 'delivery-process/class-wiaas-field-order-bundle-document.php' ); - - require_once( 'delivery-process/class-wiaas-date-list-field.php' ); - Gravity_Flow_Steps::register( new Wiaas_Delivery_Process_Step() ); GFAddOn::register( 'Wiaas_Delivery_Process_Addon' ); @@ -55,7 +53,8 @@ class Wiaas_Delivery_Process { public static function maybe_complete_parent_order($entry_id, $form) { $entry = GFAPI::get_entry($entry_id); - $order_id = $entry['wiaas_delivery_order_id']; + $order_field = GFCommon::get_fields_by_type($form, 'wiaas_order')[0]; + $order_id = empty($order_field) ? null : absint($entry[$order_field->id]); if (!isset($order_id)) { return; @@ -277,17 +276,7 @@ class Wiaas_Delivery_Process { continue; } - $action_code = 'manual'; - $action_form = GFAPI::get_form($step->target_form_id); - $has_action_form = $action_form !== false; - - if ($has_action_form) { - - $delivery_settings = rgar($action_form, 'wiaas_delivery_process'); - - $action_code = empty($delivery_settings['delivery_action_code']) ? 'manual' : $delivery_settings['delivery_action_code']; - } - + $action_code = Wiaas_Delivery_Process_Action::get_process_step_action_form_action_code($step); $info = $step->get_feed_meta(); $status = $step->get_status(); @@ -310,44 +299,40 @@ class Wiaas_Delivery_Process { return $delivery_process; } - - - /** - * Automatically create delivery process instance when order is created - * @param $order_id - */ - public static function create_delivery_process_for_order($order_id) { - $process_form = null; - - $forms = GFAPI::get_forms(); - foreach ( $forms as $form ) { - $delivery_settings = rgar($form, 'wiaas_delivery_process'); - if ( ! empty($delivery_settings) && $delivery_settings['delivery_form_type'] === 'process'){ - $process_form = $form; - - break; - } - } - - if (empty($process_form)) { - - return; - } - - $order = wc_get_order( $order_id ); - $order_field = GFCommon::get_fields_by_type($form, 'wiaas_order')[0]; - $order_field_id = $order_field->id; - - $new_process_entry = array( - 'form_id' => $process_form->id, - "$order_field_id" => $order_id, - 'wiaas_delivery_order_id' => $order_id, - ); - $process_entry_id = GFAPI::add_entry( $new_process_entry ); - - add_post_meta($order_id, 'wiaas_delivery_process_id', $process_form->id); - add_post_meta($order_id, 'wiaas_delivery_process_entry_id', $process_entry_id); - } } add_action( 'gravityflow_loaded', array('Wiaas_Delivery_Process', 'init') ); + + +add_filter( 'gform_notification', 'rw_notification_attachments', 10, 3 ); +function rw_notification_attachments( $notification, $form, $entry ) { + + $fileupload_fields = GFAPI::get_fields_by_type( $form, array( 'fileupload' ) , true); + + if ( ! is_array( $fileupload_fields ) ) { + return $notification; + } + + $notification['attachments'] = rgar( $notification, 'attachments', array() ); + $upload_root = RGFormsModel::get_upload_root(); + + foreach( $fileupload_fields as $field ) { + + $url = rgar( $entry, $field->id ); + + if ( empty( $url ) ) { + continue; + } elseif ( $field->multipleFiles ) { + $uploaded_files = json_decode( stripslashes( $url ), true ); + foreach ( $uploaded_files as $uploaded_file ) { + $attachment = preg_replace( '|^(.*?)/gravity_forms/|', $upload_root, $uploaded_file ); + $notification['attachments'][] = $attachment; + } + } else { + $attachment = preg_replace( '|^(.*?)/gravity_forms/|', $upload_root, $url ); + $notification['attachments'][] = $attachment; + } + } + + return $notification; +} diff --git a/backend/app/plugins/wiaas/includes/db-updates/data/delivery-forms/delivery-action-forms.json b/backend/app/plugins/wiaas/includes/db-updates/data/delivery-forms/delivery-action-forms.json new file mode 100644 index 0000000..593b25c --- /dev/null +++ b/backend/app/plugins/wiaas/includes/db-updates/data/delivery-forms/delivery-action-forms.json @@ -0,0 +1 @@ +{"0":{"title":"ACTION: Supplier Configuration Approval","description":"Bundle configuration for supplier.","labelPlacement":"top_label","descriptionPlacement":"below","button":{"type":"text","text":"Submit","imageUrl":""},"fields":[{"type":"wiaas_order","allowsPrepopulate":true,"id":3,"label":"Order","adminLabel":"","isRequired":true,"size":"medium","errorMessage":"","visibility":"administrative","inputs":null,"formId":"11","description":"","inputMask":false,"inputMaskValue":"","inputType":"","labelPlacement":"","descriptionPlacement":"","subLabelPlacement":"","placeholder":"","cssClass":"","inputName":"order_id","noDuplicates":false,"defaultValue":"","choices":"","conditionalLogic":"","enableCalculation":false,"numberFormat":"decimal_dot","rangeMin":"","rangeMax":"","productField":"","multipleFiles":false,"maxFiles":"","calculationFormula":"","calculationRounding":"","disableQuantity":false,"displayAllCategories":false,"useRichTextEditor":false,"displayOnly":"","enablePrice":""},{"type":"wiaas_order_supplier","id":7,"label":"Supplier","adminLabel":"","isRequired":false,"size":"medium","errorMessage":"","visibility":"visible","inputs":null,"formId":"11","description":"","allowsPrepopulate":false,"inputMask":false,"inputMaskValue":"","inputType":"","labelPlacement":"","descriptionPlacement":"","subLabelPlacement":"","placeholder":"","cssClass":"","inputName":"","noDuplicates":false,"defaultValue":"","choices":[],"conditionalLogic":"","failed_validation":"","productField":"","multipleFiles":false,"maxFiles":"","calculationFormula":"","calculationRounding":"","enableCalculation":"","disableQuantity":false,"displayAllCategories":false,"useRichTextEditor":false,"displayOnly":"","enablePrice":""},{"type":"wiaas_order_bundle","id":8,"label":"Bundle","adminLabel":"","isRequired":false,"size":"medium","errorMessage":"","visibility":"visible","inputs":null,"formId":"11","description":"","allowsPrepopulate":false,"inputMask":false,"inputMaskValue":"","inputType":"","labelPlacement":"","descriptionPlacement":"","subLabelPlacement":"","placeholder":"","cssClass":"","inputName":"","noDuplicates":false,"defaultValue":"","choices":[],"conditionalLogic":"","failed_validation":"","productField":"","multipleFiles":false,"maxFiles":"","calculationFormula":"","calculationRounding":"","enableCalculation":"","disableQuantity":false,"displayAllCategories":false,"useRichTextEditor":false,"displayOnly":"","enablePrice":""},{"type":"fileupload","id":10,"label":"File","adminLabel":"","isRequired":false,"size":"medium","errorMessage":"","visibility":"visible","inputs":null,"formId":"11","description":"","allowsPrepopulate":false,"inputMask":false,"inputMaskValue":"","inputType":"","labelPlacement":"","descriptionPlacement":"","subLabelPlacement":"","placeholder":"","cssClass":"","inputName":"","noDuplicates":false,"defaultValue":"","choices":"","conditionalLogic":"","maxFileSize":"","maxFiles":"","multipleFiles":false,"allowedExtensions":"","productField":"","displayOnly":"","enablePrice":""},{"type":"wiaas_order_bundle_document","wiaasDocTypeFilter":"config","id":9,"label":"Config Document","adminLabel":"","isRequired":false,"size":"medium","errorMessage":"","visibility":"visible","inputs":null,"formId":"11","description":"","allowsPrepopulate":false,"inputMask":false,"inputMaskValue":"","inputType":"","labelPlacement":"","descriptionPlacement":"","subLabelPlacement":"","placeholder":"","cssClass":"","inputName":"","noDuplicates":false,"defaultValue":"","choices":"","conditionalLogic":"","maxFileSize":"","maxFiles":"","multipleFiles":false,"allowedExtensions":"","productField":"","calculationFormula":"","calculationRounding":"","enableCalculation":"","disableQuantity":false,"displayAllCategories":false,"useRichTextEditor":false,"displayOnly":"","enablePrice":""}],"version":"2.3.2","id":"11","useCurrentUserAsAuthor":true,"postContentTemplateEnabled":false,"postTitleTemplateEnabled":false,"postTitleTemplate":"","postContentTemplate":"","lastPageButton":null,"pagination":null,"firstPageCssClass":null,"gravityflowparentchild":{"parent_form_1":"0","parent_form_3":"0","parent_form_4":"0","parent_form_5":"1","parent_form_6":"0","parent_form_7":"0","parent_form_11":"0","parent_form_12":"0"},"wiaas_delivery":{"wiaas_delivery_form_type":"step","wiaas_order_mappings":{"3":"","4":"","5":"","6":""}},"wiaas_delivery_process":{"delivery_form_type":"action","delivery_action_code":"","automatic_action_entries_enabled":"0","automatic_action_entries_type":"single"},"is_active":"1","date_created":"2018-10-27 22:13:02","is_trash":"0","notifications":[{"id":"5bd4e2eeaef5b","to":"{admin_email}","name":"Admin Notification","event":"form_submission","toType":"email","subject":"New submission from {form_title}","message":"{all_fields}"}],"confirmations":[{"id":"5bd4e2eeaf4c1","name":"Default Confirmation","isDefault":true,"type":"message","message":"Thanks for contacting us! We will get in touch with you shortly.","url":"","pageId":"","queryString":""}],"feeds":{"gravityflow":[{"id":"28","form_id":"11","is_active":"1","feed_order":"0","meta":{"step_name":"Approve Supplier Configuration","description":"Supplier must review and approve configuration","step_type":"approval","step_highlight":"0","step_highlight_type":"color","step_highlight_color":"#dd3333","feed_condition_conditional_logic":"0","feed_condition_conditional_logic_object":[],"scheduled":"0","schedule_type":"delay","schedule_date":"","schedule_delay_offset":"","schedule_delay_unit":"hours","schedule_date_field_offset":"0","schedule_date_field_offset_unit":"hours","schedule_date_field_before_after":"after","type":"select","assignees":["role|supplier"],"routing":[{"assignee":"user_id|2","fieldId":"0","operator":"is","value":"","type":""}],"assignee_policy":"all","instructionsEnable":"1","instructionsValue":"Instructions<\/strong>: please review the values in the fields below and click on the Approve<\/span><\/strong> or Reject<\/span><\/strong> button\r\n\r\n ","display_fields_mode":"all_fields","assignee_notification_enabled":"1","assignee_notification_from_name":"Wiaas","assignee_notification_from_email":"{admin_email}","assignee_notification_reply_to":"","assignee_notification_bcc":"","assignee_notification_subject":"Approve Configuration","assignee_notification_message":"A new entry is pending your approval. Please check your Workflow Inbox.\r\n\r\n \r\n\r\n{workflow_entry_link}\r\n\r\n{all_fields}\r\n\r\n ","assignee_notification_disable_autoformat":"0","resend_assignee_emailEnable":"0","resend_assignee_emailValue":"7","resend_assignee_email_repeatEnable":"0","resend_assignee_email_repeatValue":"3","rejection_notification_enabled":"1","rejection_notification_type":"select","rejection_notification_users":["role|administrator"],"rejection_notification_routing":[{"assignee":"user_id|2","fieldId":"0","operator":"is","value":"","type":""}],"rejection_notification_from_name":"{Supplier:5}","rejection_notification_from_email":"{admin_email}","rejection_notification_reply_to":"","rejection_notification_bcc":"","rejection_notification_subject":"","rejection_notification_message":"Entry {entry_id} has been rejected","rejection_notification_disable_autoformat":"0","approval_notification_enabled":"1","approval_notification_type":"select","approval_notification_users":["role|administrator"],"approval_notification_routing":[{"assignee":"user_id|2","fieldId":"0","operator":"is","value":"","type":""}],"approval_notification_from_name":"{Supplier:5}","approval_notification_from_email":"{admin_email}","approval_notification_reply_to":"","approval_notification_bcc":"","approval_notification_subject":"{Order:3} : Supplier approved configuration for {Bundle:6}","approval_notification_message":"Entry {entry_id} has been approved","approval_notification_disable_autoformat":"0","revertEnable":"0","revertValue":"40","note_mode":"not_required","expiration":"0","expiration_type":"delay","expiration_date":"","expiration_delay_offset":"","expiration_delay_unit":"hours","expiration_date_field_offset":"0","expiration_date_field_offset_unit":"hours","expiration_date_field_before_after":"after","status_expiration":"rejected","destination_expired":"next","destination_rejected":"40","destination_approved":"complete"},"addon_slug":"gravityflow","event_type":null},{"id":"40","form_id":"11","is_active":"1","feed_order":"0","meta":{"step_name":"Update Rejected Supplier Configuration","description":"","step_type":"user_input","step_highlight":"0","step_highlight_type":"color","step_highlight_color":"#dd3333","feed_condition_conditional_logic":"0","feed_condition_conditional_logic_object":[],"scheduled":"0","schedule_type":"delay","schedule_date":"","schedule_delay_offset":"","schedule_delay_unit":"hours","schedule_date_field_offset":"0","schedule_date_field_offset_unit":"hours","schedule_date_field_before_after":"after","type":"select","assignees":["role|administrator"],"editable_fields":["9"],"routing":"","assignee_policy":"any","highlight_editable_fields_enabled":"0","highlight_editable_fields_class":"green-triangle","instructionsEnable":"0","instructionsValue":"","display_fields_mode":"all_fields","default_status":"hidden","note_mode":"not_required","assignee_notification_enabled":"1","assignee_notification_from_name":"{Supplier:7}","assignee_notification_from_email":"{admin_email}","assignee_notification_reply_to":"","assignee_notification_bcc":"","assignee_notification_subject":"","assignee_notification_message":"{workflow_entry_url}\r\n\r\n{workflow_entry_url}\r\n\r\n \r\n\r\n ","assignee_notification_disable_autoformat":"0","resend_assignee_emailEnable":"0","resend_assignee_emailValue":"7","resend_assignee_email_repeatEnable":"0","resend_assignee_email_repeatValue":"3","in_progress_notification_enabled":"0","in_progress_notification_type":"select","in_progress_notification_routing":[{"assignee":"user_id|2","fieldId":"0","operator":"is","value":"","type":""}],"in_progress_notification_from_name":"","in_progress_notification_from_email":"{admin_email}","in_progress_notification_reply_to":"","in_progress_notification_bcc":"","in_progress_notification_subject":"","in_progress_notification_message":"Entry {entry_id} has been updated and remains in progress.","in_progress_notification_disable_autoformat":"0","complete_notification_enabled":"0","complete_notification_type":"select","complete_notification_routing":[{"assignee":"user_id|2","fieldId":"0","operator":"is","value":"","type":""}],"complete_notification_from_name":"","complete_notification_from_email":"{admin_email}","complete_notification_reply_to":"","complete_notification_bcc":"","complete_notification_subject":"","complete_notification_message":"Entry {entry_id} has been updated completing the step.","complete_notification_disable_autoformat":"0","confirmation_messageEnable":"0","confirmation_messageValue":"Thank you.","expiration":"0","expiration_type":"delay","expiration_date":"","expiration_delay_offset":"","expiration_delay_unit":"hours","expiration_date_field_offset":"0","expiration_date_field_offset_unit":"hours","expiration_date_field_before_after":"after","status_expiration":"complete","destination_expired":"next","destination_complete":"28"},"addon_slug":"gravityflow","event_type":null}]}},"1":{"title":"ACTION: Validate Customer Questionnaire","description":"Bundle configuration for supplier.","labelPlacement":"top_label","descriptionPlacement":"below","button":{"type":"text","text":"Submit","imageUrl":""},"fields":[{"type":"wiaas_order","id":12,"label":"Order Number","adminLabel":"","isRequired":true,"size":"medium","errorMessage":"","visibility":"visible","inputs":null,"formId":"12","description":"","allowsPrepopulate":true,"inputMask":false,"inputMaskValue":"","inputType":"","labelPlacement":"","descriptionPlacement":"","subLabelPlacement":"","placeholder":"","cssClass":"","inputName":"order_id","noDuplicates":false,"defaultValue":"0","choices":"","conditionalLogic":"","enableCalculation":false,"numberFormat":"decimal_dot","rangeMin":"","rangeMax":"","productField":"","multipleFiles":false,"maxFiles":"","calculationFormula":"","calculationRounding":"","disableQuantity":false,"displayAllCategories":false,"useRichTextEditor":false,"displayOnly":"","enablePrice":""},{"type":"wiaas_order_bundle","id":13,"label":"Bundle","adminLabel":"","isRequired":true,"size":"medium","errorMessage":"","visibility":"visible","inputs":null,"formId":"12","description":"","allowsPrepopulate":true,"inputMask":false,"inputMaskValue":"","inputType":"","labelPlacement":"","descriptionPlacement":"","subLabelPlacement":"","placeholder":"","cssClass":"","inputName":"bundle_id","noDuplicates":false,"defaultValue":"","choices":[],"conditionalLogic":"","failed_validation":"","productField":"","displayOnly":"","multipleFiles":false,"maxFiles":"","calculationFormula":"","calculationRounding":"","enableCalculation":"","disableQuantity":false,"displayAllCategories":false,"useRichTextEditor":false,"enablePrice":""},{"type":"wiaas_order_bundle_document","wiaasDocTypeFilter":"order_questionaire","id":17,"label":"Questionnaire Document","adminLabel":"","isRequired":true,"size":"medium","errorMessage":"","visibility":"visible","inputs":null,"formId":"12","description":"","allowsPrepopulate":false,"inputMask":false,"inputMaskValue":"","inputType":"","labelPlacement":"","descriptionPlacement":"","subLabelPlacement":"","placeholder":"","cssClass":"","inputName":"","noDuplicates":false,"defaultValue":"","choices":"","conditionalLogic":"","maxFileSize":"","maxFiles":"","multipleFiles":false,"allowedExtensions":"","productField":"","calculationFormula":"","calculationRounding":"","enableCalculation":"","disableQuantity":false,"displayAllCategories":false,"useRichTextEditor":false,"displayOnly":"","enablePrice":""},{"type":"workflow_discussion","id":9,"label":"Notes","adminLabel":"","isRequired":false,"size":"small","errorMessage":"","visibility":"visible","inputs":null,"formId":"12","description":"","allowsPrepopulate":false,"inputMask":false,"inputMaskValue":"","inputType":"","labelPlacement":"","descriptionPlacement":"","subLabelPlacement":"","placeholder":"","cssClass":"","inputName":"","noDuplicates":false,"defaultValue":"","choices":"","conditionalLogic":"","productField":"","form_id":"","useRichTextEditor":false,"multipleFiles":false,"maxFiles":"","calculationFormula":"","calculationRounding":"","enableCalculation":"","disableQuantity":false,"displayAllCategories":false,"displayOnly":"","enablePrice":""}],"version":"2.3.2","id":"12","useCurrentUserAsAuthor":true,"postContentTemplateEnabled":false,"postTitleTemplateEnabled":false,"postTitleTemplate":"","postContentTemplate":"","lastPageButton":null,"pagination":null,"firstPageCssClass":null,"gravityflowparentchild":{"parent_form_1":"0","parent_form_3":"0","parent_form_4":"0","parent_form_5":"1","parent_form_6":"0","parent_form_7":"0","parent_form_11":"0","parent_form_12":"0"},"wiaas_delivery":{"delivery_form_type":"action","automatic_step_entries_enabled":"1","automatic_action_entries_type":"bundle"},"is_active":"1","date_created":"2018-10-28 15:09:59","is_trash":"0","wiaas_delivery_process":{"delivery_form_type":"action","delivery_action_code":"validate-questionnaire","automatic_action_entries_enabled":"1","automatic_action_entries_type":"bundle"},"confirmations":[{"id":"5bd4e2eeaf4c1","name":"Default Confirmation","isDefault":true,"type":"message","message":"Thanks for contacting us! We will get in touch with you shortly.","url":"","pageId":"","queryString":""}],"notifications":[{"id":"5bd4e2eeaef5b","to":"{admin_email}","name":"Admin Notification","event":"form_submission","toType":"email","subject":"New submission from {form_title}","message":"{all_fields}"}],"feeds":{"gravityflow":[{"id":"27","form_id":"12","is_active":"1","feed_order":"0","meta":{"step_name":"Approve configuration info","description":"","step_type":"approval","step_highlight":"0","step_highlight_type":"color","step_highlight_color":"#dd3333","feed_condition_conditional_logic":"0","feed_condition_conditional_logic_object":{"conditionalLogic":{"actionType":"show","logicType":"all","rules":[{"fieldId":"12","operator":"isnot","value":"0"}]}},"scheduled":"0","schedule_type":"delay","schedule_date":"","schedule_delay_offset":"","schedule_delay_unit":"hours","schedule_date_field_offset":"0","schedule_date_field_offset_unit":"hours","schedule_date_field_before_after":"after","type":"select","assignees":["role|administrator"],"routing":[{"assignee":"user_id|2","fieldId":"0","operator":"is","value":"","type":""}],"assignee_policy":"all","instructionsEnable":"1","instructionsValue":"Review customer configuration {Questionnaire Document:17} for {Bundle:13}","display_fields_mode":"selected_fields","display_fields_selected":["13","17","9"],"assignee_notification_enabled":"1","assignee_notification_from_name":"","assignee_notification_from_email":"{admin_email}","assignee_notification_reply_to":"","assignee_notification_bcc":"","assignee_notification_subject":"","assignee_notification_message":"A new entry is pending your approval. Please check your Workflow Inbox.\r\n\r\n{all_fields}\r\n\r\n \r\n\r\n{workflow_entry_link}","assignee_notification_disable_autoformat":"0","resend_assignee_emailEnable":"0","resend_assignee_emailValue":"7","resend_assignee_email_repeatEnable":"0","resend_assignee_email_repeatValue":"3","rejection_notification_enabled":"1","rejection_notification_type":"select","rejection_notification_routing":[{"assignee":"user_id|2","fieldId":"0","operator":"is","value":"","type":""}],"rejection_notification_from_name":"Wiaas","rejection_notification_from_email":"{admin_email}","rejection_notification_reply_to":"","rejection_notification_bcc":"","rejection_notification_subject":"{Order:3} : Bundle questionnaire has been rejected {Bundle:6}","rejection_notification_message":"Entry {entry_id} has been rejected","rejection_notification_disable_autoformat":"0","approval_notification_enabled":"1","approval_notification_type":"select","approval_notification_routing":[{"assignee":"user_id|2","fieldId":"0","operator":"is","value":"","type":""}],"approval_notification_from_name":"Wiaas","approval_notification_from_email":"{admin_email}","approval_notification_reply_to":"","approval_notification_bcc":"","approval_notification_subject":"{Order:3} : Bundle questionnaire has been approved","approval_notification_message":" \r\n\r\n{all_fields}\r\n\r\nEntry {entry_id} has been approved","approval_notification_disable_autoformat":"0","revertEnable":"0","revertValue":"29","note_mode":"hidden","expiration":"0","expiration_type":"delay","expiration_date":"","expiration_delay_offset":"","expiration_delay_unit":"hours","expiration_date_field_offset":"0","expiration_date_field_offset_unit":"hours","expiration_date_field_before_after":"after","status_expiration":"rejected","destination_expired":"next","destination_rejected":"44","destination_approved":"complete"},"addon_slug":"gravityflow","event_type":null},{"id":"44","form_id":"12","is_active":"1","feed_order":"0","meta":{"step_name":"Add reject reason","description":"","step_type":"user_input","step_highlight":"0","step_highlight_type":"color","step_highlight_color":"#dd3333","feed_condition_conditional_logic":"0","feed_condition_conditional_logic_object":[],"scheduled":"0","schedule_type":"delay","schedule_date":"","schedule_delay_offset":"","schedule_delay_unit":"hours","schedule_date_field_offset":"0","schedule_date_field_offset_unit":"hours","schedule_date_field_before_after":"after","type":"select","assignees":["role|administrator"],"editable_fields":["9"],"routing":"","assignee_policy":"all","highlight_editable_fields_enabled":"0","highlight_editable_fields_class":"green-triangle","instructionsEnable":"0","instructionsValue":"","display_fields_mode":"all_fields","default_status":"hidden","note_mode":"not_required","assignee_notification_enabled":"1","assignee_notification_from_name":"","assignee_notification_from_email":"{admin_email}","assignee_notification_reply_to":"","assignee_notification_bcc":"","assignee_notification_subject":"","assignee_notification_message":"A new entry requires your input.","assignee_notification_disable_autoformat":"0","resend_assignee_emailEnable":"0","resend_assignee_emailValue":"7","resend_assignee_email_repeatEnable":"0","resend_assignee_email_repeatValue":"3","in_progress_notification_enabled":"0","in_progress_notification_type":"select","in_progress_notification_routing":[{"assignee":"user_id|2","fieldId":"0","operator":"is","value":"","type":""}],"in_progress_notification_from_name":"","in_progress_notification_from_email":"{admin_email}","in_progress_notification_reply_to":"","in_progress_notification_bcc":"","in_progress_notification_subject":"","in_progress_notification_message":"Entry {entry_id} has been updated and remains in progress.","in_progress_notification_disable_autoformat":"0","complete_notification_enabled":"0","complete_notification_type":"select","complete_notification_routing":[{"assignee":"user_id|2","fieldId":"0","operator":"is","value":"","type":""}],"complete_notification_from_name":"","complete_notification_from_email":"{admin_email}","complete_notification_reply_to":"","complete_notification_bcc":"","complete_notification_subject":"","complete_notification_message":"Entry {entry_id} has been updated completing the step.","complete_notification_disable_autoformat":"0","confirmation_messageEnable":"0","confirmation_messageValue":"Thank you.","expiration":"0","expiration_type":"delay","expiration_date":"","expiration_delay_offset":"","expiration_delay_unit":"hours","expiration_date_field_offset":"0","expiration_date_field_offset_unit":"hours","expiration_date_field_before_after":"after","status_expiration":"complete","destination_expired":"next","destination_complete":"next"},"addon_slug":"gravityflow","event_type":null},{"id":"29","form_id":"12","is_active":"1","feed_order":"0","meta":{"step_name":"Update bundle configuration","description":"Since administrator rejected questionnaire provided by customer, he needs to update it and upload it again.","step_type":"user_input","step_highlight":"0","step_highlight_type":"color","step_highlight_color":"#dd3333","feed_condition_conditional_logic":"0","feed_condition_conditional_logic_object":[],"scheduled":"0","schedule_type":"delay","schedule_date":"","schedule_delay_offset":"","schedule_delay_unit":"hours","schedule_date_field_offset":"0","schedule_date_field_offset_unit":"hours","schedule_date_field_before_after":"after","type":"select","assignees":["role|customer"],"editable_fields":["17","9"],"routing":"","assignee_policy":"any","highlight_editable_fields_enabled":"0","highlight_editable_fields_class":"green-triangle","instructionsEnable":"1","instructionsValue":"Please download and update questionnaire.","display_fields_mode":"selected_fields","display_fields_selected":["12","13","17","9"],"default_status":"submit_buttons","note_mode":"hidden","assignee_notification_enabled":"1","assignee_notification_from_name":"Wiaas","assignee_notification_from_email":"{admin_email}","assignee_notification_reply_to":"","assignee_notification_bcc":"","assignee_notification_subject":"{Order:3}: Questionnaire rejected for {Bundle:6}","assignee_notification_message":"A new entry requires your input.\r\n\r\n{workflow_entry_link}\r\n\r\n{all_fields}","assignee_notification_disable_autoformat":"0","resend_assignee_emailEnable":"0","resend_assignee_emailValue":"7","resend_assignee_email_repeatEnable":"0","resend_assignee_email_repeatValue":"3","in_progress_notification_enabled":"0","in_progress_notification_type":"select","in_progress_notification_routing":[{"assignee":"user_id|2","fieldId":"0","operator":"is","value":"","type":""}],"in_progress_notification_from_name":"","in_progress_notification_from_email":"{admin_email}","in_progress_notification_reply_to":"","in_progress_notification_bcc":"","in_progress_notification_subject":"","in_progress_notification_message":"Entry {entry_id} has been updated and remains in progress.","in_progress_notification_disable_autoformat":"0","complete_notification_enabled":"1","complete_notification_type":"select","complete_notification_users":["role|administrator"],"complete_notification_routing":[{"assignee":"user_id|2","fieldId":"0","operator":"is","value":"","type":""}],"complete_notification_from_name":"{user:display_name}","complete_notification_from_email":"{admin_email}","complete_notification_reply_to":"","complete_notification_bcc":"","complete_notification_subject":"{Order:3}: Questionnaire updated for {Bundle:6}","complete_notification_message":"Entry {entry_id} has been updated completing the step.","complete_notification_disable_autoformat":"0","confirmation_messageEnable":"1","confirmation_messageValue":"Thank you.","expiration":"0","expiration_type":"delay","expiration_date":"","expiration_delay_offset":"","expiration_delay_unit":"hours","expiration_date_field_offset":"0","expiration_date_field_offset_unit":"hours","expiration_date_field_before_after":"after","status_expiration":"complete","destination_expired":"next","destination_complete":"27"},"addon_slug":"gravityflow","event_type":null}]}},"2":{"title":"ACTION: Complete Installation And Upload Test Protocol","description":"","labelPlacement":"top_label","descriptionPlacement":"below","button":{"type":"text","text":"Submit","imageUrl":""},"fields":[{"type":"wiaas_order","id":1,"label":"Order ID","adminLabel":"","isRequired":true,"size":"medium","errorMessage":"","visibility":"visible","inputs":null,"formId":14,"description":"","allowsPrepopulate":true,"inputMask":false,"inputMaskValue":"","inputType":"","labelPlacement":"","descriptionPlacement":"","subLabelPlacement":"","placeholder":"","cssClass":"","inputName":"order_id","noDuplicates":false,"defaultValue":"","choices":"","conditionalLogic":"","enableCalculation":false,"numberFormat":"decimal_dot","rangeMin":"","rangeMax":"","productField":"","multipleFiles":false,"maxFiles":"","calculationFormula":"","calculationRounding":"","disableQuantity":false,"displayAllCategories":false,"useRichTextEditor":false,"displayOnly":"","enablePrice":""},{"type":"wiaas_order_supplier","id":4,"label":"Installation Company","adminLabel":"","isRequired":true,"size":"medium","errorMessage":"","visibility":"visible","inputs":null,"formId":14,"description":"","allowsPrepopulate":false,"inputMask":false,"inputMaskValue":"","inputType":"","labelPlacement":"","descriptionPlacement":"","subLabelPlacement":"","placeholder":"","cssClass":"","inputName":"","noDuplicates":false,"defaultValue":"","choices":[],"conditionalLogic":"","failed_validation":"","productField":"","multipleFiles":false,"maxFiles":"","calculationFormula":"","calculationRounding":"","enableCalculation":"","disableQuantity":false,"displayAllCategories":false,"useRichTextEditor":false,"displayOnly":"","enablePrice":""},{"type":"fileupload","id":6,"label":"Installation protocol","adminLabel":"","isRequired":false,"size":"medium","errorMessage":"","visibility":"visible","inputs":null,"formId":14,"description":"","allowsPrepopulate":false,"inputMask":false,"inputMaskValue":"","inputType":"","labelPlacement":"","descriptionPlacement":"","subLabelPlacement":"","placeholder":"","cssClass":"","inputName":"","noDuplicates":false,"defaultValue":"","choices":"","conditionalLogic":"","maxFileSize":"","maxFiles":"","multipleFiles":false,"allowedExtensions":"","productField":"","calculationFormula":"","calculationRounding":"","enableCalculation":"","disableQuantity":false,"displayAllCategories":false,"useRichTextEditor":false,"displayOnly":"","enablePrice":""}],"version":"2.3.2","id":14,"useCurrentUserAsAuthor":true,"postContentTemplateEnabled":false,"postTitleTemplateEnabled":false,"postTitleTemplate":"","postContentTemplate":"","lastPageButton":null,"pagination":null,"firstPageCssClass":null,"wiaas_delivery":{"wiaas_delivery_form_type":"step"},"wiaas_delivery_process":{"delivery_form_type":"action","delivery_action_code":"","automatic_action_entries_enabled":"1","automatic_action_entries_type":"single"},"notifications":[{"id":"5bd66ca932e4a","to":"{admin_email}","name":"Admin Notification","event":"form_submission","toType":"email","subject":"New submission from {form_title}","message":"{all_fields}"}],"confirmations":[{"id":"5bd66ca93384b","name":"Default Confirmation","isDefault":true,"type":"message","message":"Thanks for contacting us! We will get in touch with you shortly.","url":"","pageId":"","queryString":""}],"feeds":{"gravityflow":[{"id":"34","form_id":"14","is_active":"1","feed_order":"0","meta":{"step_name":"Installation completed confirmation","description":"","step_type":"approval","step_highlight":"0","step_highlight_type":"color","step_highlight_color":"#dd3333","feed_condition_conditional_logic":"0","feed_condition_conditional_logic_object":[],"scheduled":"0","schedule_type":"delay","schedule_date":"","schedule_delay_offset":"","schedule_delay_unit":"hours","schedule_date_field_offset":"0","schedule_date_field_offset_unit":"hours","schedule_date_field_before_after":"after","type":"select","assignees":["role|supplier"],"routing":[{"assignee":"role|administrator","fieldId":"0","operator":"is","value":"","type":""}],"assignee_policy":"all","instructionsEnable":"0","instructionsValue":"Instructions: please review the values in the fields below and click on the Approve or Reject button","display_fields_mode":"all_fields","assignee_notification_enabled":"1","assignee_notification_from_name":"Wiaas","assignee_notification_from_email":"{admin_email}","assignee_notification_reply_to":"","assignee_notification_bcc":"","assignee_notification_subject":"","assignee_notification_message":"Confirm if installation is completed.\r\n\r\n{workflow_entry_link}","assignee_notification_disable_autoformat":"0","resend_assignee_emailEnable":"0","resend_assignee_emailValue":"7","resend_assignee_email_repeatEnable":"0","resend_assignee_email_repeatValue":"3","rejection_notification_enabled":"0","rejection_notification_type":"select","rejection_notification_routing":[{"assignee":"role|administrator","fieldId":"0","operator":"is","value":"","type":""}],"rejection_notification_from_name":"","rejection_notification_from_email":"{admin_email}","rejection_notification_reply_to":"","rejection_notification_bcc":"","rejection_notification_subject":"","rejection_notification_message":"Entry {entry_id} has been rejected","rejection_notification_disable_autoformat":"0","approval_notification_enabled":"0","approval_notification_type":"select","approval_notification_routing":[{"assignee":"role|administrator","fieldId":"0","operator":"is","value":"","type":""}],"approval_notification_from_name":"","approval_notification_from_email":"{admin_email}","approval_notification_reply_to":"","approval_notification_bcc":"","approval_notification_subject":"","approval_notification_message":"Entry {entry_id} has been approved","approval_notification_disable_autoformat":"0","revertEnable":"0","revertValue":"35","note_mode":"not_required","expiration":"0","expiration_type":"delay","expiration_date":"","expiration_delay_offset":"","expiration_delay_unit":"hours","expiration_date_field_offset":"0","expiration_date_field_offset_unit":"hours","expiration_date_field_before_after":"after","status_expiration":"rejected","destination_expired":"next","destination_rejected":"complete","destination_approved":"35"},"addon_slug":"gravityflow","event_type":null},{"id":"35","form_id":"14","is_active":"1","feed_order":"0","meta":{"step_name":"Upload installation protocol","description":"","step_type":"user_input","step_highlight":"0","step_highlight_type":"color","step_highlight_color":"#dd3333","feed_condition_conditional_logic":"0","feed_condition_conditional_logic_object":[],"scheduled":"0","schedule_type":"delay","schedule_date":"","schedule_delay_offset":"","schedule_delay_unit":"hours","schedule_date_field_offset":"0","schedule_date_field_offset_unit":"hours","schedule_date_field_before_after":"after","type":"select","assignees":["role|supplier"],"editable_fields":["6"],"routing":"","assignee_policy":"all","highlight_editable_fields_enabled":"1","highlight_editable_fields_class":"green-triangle","instructionsEnable":"0","instructionsValue":"","display_fields_mode":"all_fields","default_status":"hidden","note_mode":"not_required","assignee_notification_enabled":"1","assignee_notification_from_name":"Wiaas","assignee_notification_from_email":"{admin_email}","assignee_notification_reply_to":"","assignee_notification_bcc":"","assignee_notification_subject":"Upload installation test protocol for {Order ID:1}","assignee_notification_message":"A new entry requires your input.","assignee_notification_disable_autoformat":"0","resend_assignee_emailEnable":"1","resend_assignee_emailValue":"7","resend_assignee_email_repeatEnable":"0","resend_assignee_email_repeatValue":"3","in_progress_notification_enabled":"0","in_progress_notification_type":"select","in_progress_notification_routing":[{"assignee":"role|administrator","fieldId":"0","operator":"is","value":"","type":""}],"in_progress_notification_from_name":"","in_progress_notification_from_email":"{admin_email}","in_progress_notification_reply_to":"","in_progress_notification_bcc":"","in_progress_notification_subject":"","in_progress_notification_message":"Entry {entry_id} has been updated and remains in progress.","in_progress_notification_disable_autoformat":"0","complete_notification_enabled":"0","complete_notification_type":"select","complete_notification_routing":[{"assignee":"role|administrator","fieldId":"0","operator":"is","value":"","type":""}],"complete_notification_from_name":"","complete_notification_from_email":"{admin_email}","complete_notification_reply_to":"","complete_notification_bcc":"","complete_notification_subject":"","complete_notification_message":"Entry {entry_id} has been updated completing the step.","complete_notification_disable_autoformat":"0","confirmation_messageEnable":"0","confirmation_messageValue":"Thank you.","expiration":"0","expiration_type":"delay","expiration_date":"","expiration_delay_offset":"","expiration_delay_unit":"hours","expiration_date_field_offset":"0","expiration_date_field_offset_unit":"hours","expiration_date_field_before_after":"after","status_expiration":"complete","destination_expired":"next","destination_complete":"complete"},"addon_slug":"gravityflow","event_type":null}]}},"3":{"title":"ACTION: Customer Acceptance","description":"","labelPlacement":"top_label","descriptionPlacement":"below","button":{"type":"text","text":"Submit","imageUrl":""},"fields":[{"type":"wiaas_order","id":1,"label":"Order Number","adminLabel":"","isRequired":false,"size":"medium","errorMessage":"","visibility":"visible","inputs":null,"formId":16,"description":"","allowsPrepopulate":true,"inputMask":false,"inputMaskValue":"","inputType":"","labelPlacement":"","descriptionPlacement":"","subLabelPlacement":"","placeholder":"","cssClass":"","inputName":"order_id","noDuplicates":false,"defaultValue":"","choices":"","conditionalLogic":"","enableCalculation":false,"numberFormat":"decimal_dot","rangeMin":"","rangeMax":"","productField":"","multipleFiles":false,"maxFiles":"","calculationFormula":"","calculationRounding":"","disableQuantity":false,"displayAllCategories":false,"useRichTextEditor":false,"displayOnly":"","enablePrice":""},{"type":"fileupload","id":2,"label":"Acceptance Document","adminLabel":"","isRequired":false,"size":"medium","errorMessage":"","visibility":"visible","inputs":null,"formId":16,"description":"","allowsPrepopulate":false,"inputMask":false,"inputMaskValue":"","inputType":"","labelPlacement":"","descriptionPlacement":"","subLabelPlacement":"","placeholder":"","cssClass":"","inputName":"","noDuplicates":false,"defaultValue":"","choices":"","conditionalLogic":"","maxFileSize":"","maxFiles":"","multipleFiles":true,"allowedExtensions":"","productField":"","calculationFormula":"","calculationRounding":"","enableCalculation":"","disableQuantity":false,"displayAllCategories":false,"useRichTextEditor":false,"displayOnly":"","enablePrice":""},{"type":"date","id":6,"label":"Expiration Date","adminLabel":"","isRequired":false,"size":"medium","errorMessage":"","visibility":"visible","inputs":null,"dateType":"datepicker","calendarIconType":"none","formId":16,"description":"","allowsPrepopulate":false,"inputMask":false,"inputMaskValue":"","inputType":"","labelPlacement":"","descriptionPlacement":"","subLabelPlacement":"","placeholder":"","cssClass":"","inputName":"","noDuplicates":false,"defaultValue":"","choices":"","conditionalLogic":"","calendarIconUrl":"","dateFormat":"","productField":"","multipleFiles":false,"maxFiles":"","calculationFormula":"","calculationRounding":"","enableCalculation":"","disableQuantity":false,"displayAllCategories":false,"useRichTextEditor":false,"displayOnly":""},{"type":"radio","id":4,"label":"Acceptance","adminLabel":"","isRequired":false,"size":"medium","errorMessage":"","visibility":"visible","inputs":null,"choices":[{"text":"Not Accepted","value":"pending","isSelected":false,"price":""},{"text":"Accepted","value":"accept","isSelected":false,"price":""},{"text":"Declined","value":"decline","isSelected":false,"price":""}],"formId":16,"description":"","allowsPrepopulate":false,"inputMask":false,"inputMaskValue":"","inputType":"","labelPlacement":"","descriptionPlacement":"","subLabelPlacement":"","placeholder":"","cssClass":"","inputName":"","noDuplicates":false,"defaultValue":"","conditionalLogic":"","productField":"","enableOtherChoice":"","enablePrice":"","multipleFiles":false,"maxFiles":"","calculationFormula":"","calculationRounding":"","enableCalculation":"","disableQuantity":false,"displayAllCategories":false,"useRichTextEditor":false,"enableChoiceValue":true,"displayOnly":""},{"type":"textarea","id":3,"label":"Decline Reason","adminLabel":"","isRequired":false,"size":"small","errorMessage":"","visibility":"visible","inputs":null,"formId":16,"description":"","allowsPrepopulate":true,"inputMask":false,"inputMaskValue":"","inputType":"","labelPlacement":"","descriptionPlacement":"","subLabelPlacement":"","placeholder":"","cssClass":"","inputName":"order_decline_reason","noDuplicates":false,"defaultValue":"","choices":"","conditionalLogic":{"actionType":"show","logicType":"all","rules":[{"fieldId":"4","operator":"is","value":"decline"}]},"productField":"","form_id":"","useRichTextEditor":false,"multipleFiles":false,"maxFiles":"","calculationFormula":"","calculationRounding":"","enableCalculation":"","disableQuantity":false,"displayAllCategories":false,"displayOnly":"","enablePrice":""}],"version":"2.3.2","id":16,"useCurrentUserAsAuthor":true,"postContentTemplateEnabled":false,"postTitleTemplateEnabled":false,"postTitleTemplate":"","postContentTemplate":"","lastPageButton":null,"pagination":null,"firstPageCssClass":null,"wiaas_delivery_process":{"delivery_form_type":"action","delivery_action_code":"customer-acceptance","automatic_action_entries_enabled":"1","automatic_action_entries_type":"single"},"confirmations":[{"id":"5bd8668e50997","name":"Default Confirmation","isDefault":true,"type":"message","message":"Thanks for contacting us! We will get in touch with you shortly.","url":"","pageId":"","queryString":""}],"notifications":[{"id":"5bd8668e50471","to":"{admin_email}","name":"Admin Notification","event":"form_submission","toType":"email","subject":"New submission from {form_title}","message":"{all_fields}"}],"feeds":{"gravityflow":[{"id":"41","form_id":"16","is_active":"1","feed_order":"0","meta":{"step_name":"Upload Acceptance Document","description":"","step_type":"user_input","step_highlight":"0","step_highlight_type":"color","step_highlight_color":"#dd3333","feed_condition_conditional_logic":"0","feed_condition_conditional_logic_object":[],"scheduled":"0","schedule_type":"delay","schedule_date":"","schedule_delay_offset":"","schedule_delay_unit":"hours","schedule_date_field_offset":"0","schedule_date_field_offset_unit":"hours","schedule_date_field_before_after":"after","schedule_date_field":"6","type":"select","assignees":["role|customer"],"editable_fields":["2"],"routing":"","assignee_policy":"all","conditional_logic_editable_fields_enabled":"1","highlight_editable_fields_enabled":"0","highlight_editable_fields_class":"green-triangle","instructionsEnable":"0","instructionsValue":"","display_fields_mode":"all_fields","default_status":"hidden","note_mode":"not_required","assignee_notification_enabled":"1","assignee_notification_from_name":"","assignee_notification_from_email":"{admin_email}","assignee_notification_reply_to":"","assignee_notification_bcc":"","assignee_notification_subject":"","assignee_notification_message":"A new entry requires your input.","assignee_notification_disable_autoformat":"0","resend_assignee_emailEnable":"0","resend_assignee_emailValue":"7","resend_assignee_email_repeatEnable":"0","resend_assignee_email_repeatValue":"3","in_progress_notification_enabled":"0","in_progress_notification_type":"select","in_progress_notification_routing":[{"assignee":"user_id|2","fieldId":"0","operator":"is","value":"","type":""}],"in_progress_notification_from_name":"","in_progress_notification_from_email":"{admin_email}","in_progress_notification_reply_to":"","in_progress_notification_bcc":"","in_progress_notification_subject":"","in_progress_notification_message":"Entry {entry_id} has been updated and remains in progress.","in_progress_notification_disable_autoformat":"0","complete_notification_enabled":"0","complete_notification_type":"select","complete_notification_routing":[{"assignee":"user_id|2","fieldId":"0","operator":"is","value":"","type":""}],"complete_notification_from_name":"","complete_notification_from_email":"{admin_email}","complete_notification_reply_to":"","complete_notification_bcc":"","complete_notification_subject":"","complete_notification_message":"Entry {entry_id} has been updated completing the step.","complete_notification_disable_autoformat":"0","confirmation_messageEnable":"0","confirmation_messageValue":"Thank you.","expiration":"0","expiration_type":"delay","expiration_date":"","expiration_delay_offset":"","expiration_delay_unit":"hours","expiration_date_field_offset":"0","expiration_date_field_offset_unit":"hours","expiration_date_field_before_after":"after","expiration_date_field":"6","status_expiration":"complete","destination_expired":"next","destination_complete":"next"},"addon_slug":"gravityflow","event_type":null},{"id":"43","form_id":"16","is_active":"1","feed_order":"0","meta":{"step_name":"Accept installation","description":"","step_type":"approval","step_highlight":"0","step_highlight_type":"color","step_highlight_color":"#dd3333","feed_condition_conditional_logic":"0","feed_condition_conditional_logic_object":[],"scheduled":"0","schedule_type":"delay","schedule_date":"","schedule_delay_offset":"","schedule_delay_unit":"hours","schedule_date_field_offset":"0","schedule_date_field_offset_unit":"hours","schedule_date_field_before_after":"after","schedule_date_field":"6","type":"select","assignees":["role|customer"],"routing":[{"assignee":"user_id|2","fieldId":"0","operator":"is","value":"","type":""}],"assignee_policy":"all","instructionsEnable":"0","instructionsValue":"Instructions: please review the values in the fields below and click on the Approve or Reject button","display_fields_mode":"all_fields","assignee_notification_enabled":"0","assignee_notification_from_name":"","assignee_notification_from_email":"{admin_email}","assignee_notification_reply_to":"","assignee_notification_bcc":"","assignee_notification_subject":"","assignee_notification_message":"A new entry is pending your approval. Please check your Workflow Inbox.","assignee_notification_disable_autoformat":"0","resend_assignee_emailEnable":"0","resend_assignee_emailValue":"7","resend_assignee_email_repeatEnable":"0","resend_assignee_email_repeatValue":"3","rejection_notification_enabled":"0","rejection_notification_type":"select","rejection_notification_routing":[{"assignee":"user_id|2","fieldId":"0","operator":"is","value":"","type":""}],"rejection_notification_from_name":"","rejection_notification_from_email":"{admin_email}","rejection_notification_reply_to":"","rejection_notification_bcc":"","rejection_notification_subject":"","rejection_notification_message":"Entry {entry_id} has been rejected","rejection_notification_disable_autoformat":"0","approval_notification_enabled":"0","approval_notification_type":"select","approval_notification_routing":[{"assignee":"user_id|2","fieldId":"0","operator":"is","value":"","type":""}],"approval_notification_from_name":"","approval_notification_from_email":"{admin_email}","approval_notification_reply_to":"","approval_notification_bcc":"","approval_notification_subject":"","approval_notification_message":"Entry {entry_id} has been approved","approval_notification_disable_autoformat":"0","revertEnable":"0","revertValue":"41","note_mode":"not_required","expiration":"0","expiration_type":"delay","expiration_date":"","expiration_delay_offset":"","expiration_delay_unit":"hours","expiration_date_field_offset":"0","expiration_date_field_offset_unit":"hours","expiration_date_field_before_after":"after","expiration_date_field":"6","status_expiration":"rejected","destination_expired":"next","destination_rejected":"41","destination_approved":"complete"},"addon_slug":"gravityflow","event_type":null}]}},"version":"2.3.2"} \ No newline at end of file diff --git a/backend/app/plugins/wiaas/includes/db-updates/data/delivery-forms/delivery_process_normal_delivery_form.json b/backend/app/plugins/wiaas/includes/db-updates/data/delivery-forms/delivery-process-normal-delivery-form.json similarity index 56% rename from backend/app/plugins/wiaas/includes/db-updates/data/delivery-forms/delivery_process_normal_delivery_form.json rename to backend/app/plugins/wiaas/includes/db-updates/data/delivery-forms/delivery-process-normal-delivery-form.json index 7258d6f..d1685a1 100644 --- a/backend/app/plugins/wiaas/includes/db-updates/data/delivery-forms/delivery_process_normal_delivery_form.json +++ b/backend/app/plugins/wiaas/includes/db-updates/data/delivery-forms/delivery-process-normal-delivery-form.json @@ -11,19 +11,18 @@ }, "fields": [ { - "type": "number", - "id": 1, - "label": "order-id", - "adminLabel": "order-id", + "type": "wiaas_order", + "id": 3, + "label": "Order", + "adminLabel": "", "isRequired": false, "size": "medium", "errorMessage": "", "visibility": "visible", "inputs": null, - "numberFormat": "decimal_dot", "formId": 5, "description": "", - "allowsPrepopulate": true, + "allowsPrepopulate": false, "inputMask": false, "inputMaskValue": "", "inputType": "", @@ -32,12 +31,13 @@ "subLabelPlacement": "", "placeholder": "", "cssClass": "", - "inputName": "order-id", + "inputName": "", "noDuplicates": false, "defaultValue": "", "choices": "", "conditionalLogic": "", "enableCalculation": false, + "numberFormat": "decimal_dot", "rangeMin": "", "rangeMax": "", "productField": "", @@ -50,58 +50,9 @@ "useRichTextEditor": false, "displayOnly": "", "enablePrice": "" - }, - { - "type": "workflow_user", - "id": 2, - "label": "customer-id", - "adminLabel": "customer-id", - "isRequired": false, - "size": "medium", - "errorMessage": "", - "visibility": "visible", - "inputs": null, - "choices": [ - { - "value": 2, - "text": "Customer Wiaas" - }, - { - "value": 1, - "text": "wpUser" - } - ], - "formId": 5, - "description": "", - "allowsPrepopulate": true, - "inputMask": false, - "inputMaskValue": "", - "inputType": "", - "labelPlacement": "", - "descriptionPlacement": "", - "subLabelPlacement": "", - "placeholder": "", - "cssClass": "", - "inputName": "customer-id", - "noDuplicates": false, - "defaultValue": "", - "conditionalLogic": "", - "failed_validation": "", - "productField": "", - "multipleFiles": false, - "maxFiles": "", - "calculationFormula": "", - "calculationRounding": "", - "enableCalculation": "", - "disableQuantity": false, - "displayAllCategories": false, - "useRichTextEditor": false, - "displayOnly": "", - "enablePrice": "", - "gravityflowUsersRoleFilter": "" } ], - "version": "2.3.2.6", + "version": "2.3.2", "id": 5, "useCurrentUserAsAuthor": true, "postContentTemplateEnabled": false, @@ -112,20 +63,8 @@ "pagination": null, "firstPageCssClass": null, "is_active": "1", - "date_created": "2018-08-09 15:36:00", + "date_created": "2018-10-24 18:12:10", "is_trash": "0", - "confirmations": [ - { - "id": "5b5f7ae4bb79e", - "name": "Default Confirmation", - "isDefault": true, - "type": "message", - "message": "Thanks for contacting us! We will get in touch with you shortly.", - "url": "", - "pageId": "", - "queryString": "" - } - ], "notifications": [ { "id": "5b5f7ae4baced", @@ -138,6 +77,24 @@ "isActive": false } ], + "confirmations": [ + { + "id": "5b5f7ae4bb79e", + "name": "Default Confirmation", + "isDefault": true, + "type": "message", + "message": "Thanks for contacting us! We will get in touch with you shortly.", + "url": "", + "pageId": "", + "queryString": "" + } + ], + "wiaas_delivery_process": { + "delivery_form_type": "process", + "delivery_action_code": "", + "automatic_action_entries_enabled": "0", + "automatic_action_entries_type": "single" + }, "feeds": { "gravityflow": [ { @@ -147,7 +104,7 @@ "feed_order": "0", "meta": { "step_name": "Validate customer configuration information", - "description": "Validate customer configuration information", + "description": "Review configuration documents uploaded by customer during order creation process.\r\nApprove or reject each document.", "step_type": "wiaas_delivery_step", "step_highlight": "0", "step_highlight_type": "color", @@ -162,11 +119,41 @@ "schedule_date_field_offset": "0", "schedule_date_field_offset_unit": "hours", "schedule_date_field_before_after": "after", + "instructionsEnable": "1", + "instructionsValue": "Review configuration documents uploaded by customer during order creation process.\u00a0 Approve or reject each document.", + "is_visible_to_customer": "1", + "target_form_id": "12", + "destination_complete": "next" + }, + "addon_slug": "gravityflow", + "event_type": null + }, + { + "id": "26", + "form_id": "5", + "is_active": "1", + "feed_order": "0", + "meta": { + "step_name": "Procure components", + "description": "", + "step_type": "wiaas_delivery_step", + "step_highlight": "0", + "step_highlight_type": "color", + "step_highlight_color": "#c7e8d6", + "feed_condition_conditional_logic": "0", + "feed_condition_conditional_logic_object": [], + "scheduled": "0", + "schedule_type": "delay", + "schedule_date": "", + "schedule_delay_offset": "", + "schedule_delay_unit": "hours", + "schedule_date_field_offset": "0", + "schedule_date_field_offset_unit": "hours", + "schedule_date_field_before_after": "after", "instructionsEnable": "0", "instructionsValue": "", - "target_form_id": 3, - "store_new_entry_idEnable": "1", - "new_entry_id_field": "6", + "is_visible_to_customer": "0", + "target_form_id": "11", "destination_complete": "next" }, "addon_slug": "gravityflow", @@ -196,9 +183,8 @@ "schedule_date_field_before_after": "after", "instructionsEnable": "0", "instructionsValue": "", - "target_form_id": 4, - "store_new_entry_idEnable": "0", - "new_entry_id_field": "", + "is_visible_to_customer": "1", + "target_form_id": "", "destination_complete": "next" }, "addon_slug": "gravityflow", @@ -228,9 +214,8 @@ "schedule_date_field_before_after": "after", "instructionsEnable": "0", "instructionsValue": "", - "target_form_id": 4, - "store_new_entry_idEnable": "0", - "new_entry_id_field": "", + "is_visible_to_customer": "1", + "target_form_id": "14", "destination_complete": "next" }, "addon_slug": "gravityflow", @@ -258,9 +243,10 @@ "schedule_date_field_offset": "0", "schedule_date_field_offset_unit": "hours", "schedule_date_field_before_after": "after", - "target_form_id": 1, - "store_new_entry_idEnable": "1", - "new_entry_id_field": "7", + "instructionsEnable": "0", + "instructionsValue": "", + "is_visible_to_customer": "1", + "target_form_id": "16", "destination_complete": "next" }, "addon_slug": "gravityflow", @@ -290,11 +276,9 @@ "schedule_date_field_before_after": "after", "instructionsEnable": "0", "instructionsValue": "", - "target_form_id": 4, - "store_new_entry_idEnable": "0", - "new_entry_id_field": "", - "destination_complete": "next", - "feedName": " - Copy 1" + "is_visible_to_customer": "1", + "target_form_id": "", + "destination_complete": "next" }, "addon_slug": "gravityflow", "event_type": null @@ -323,13 +307,116 @@ "schedule_date_field_before_after": "after", "instructionsEnable": "0", "instructionsValue": "", - "target_form_id": 4, - "store_new_entry_idEnable": "0", - "new_entry_id_field": "", + "is_visible_to_customer": "1", + "target_form_id": "", "destination_complete": "next" }, "addon_slug": "gravityflow", "event_type": null + }, + { + "id": "36", + "form_id": "5", + "is_active": "1", + "feed_order": "0", + "meta": { + "step_name": "Complete delivery", + "description": "", + "step_type": "approval", + "step_highlight": "0", + "step_highlight_type": "color", + "step_highlight_color": "#dd3333", + "feed_condition_conditional_logic": "0", + "feed_condition_conditional_logic_object": [], + "scheduled": "0", + "schedule_type": "delay", + "schedule_date": "", + "schedule_delay_offset": "", + "schedule_delay_unit": "hours", + "schedule_date_field_offset": "0", + "schedule_date_field_offset_unit": "hours", + "schedule_date_field_before_after": "after", + "type": "select", + "assignees": [ + "role|administrator" + ], + "routing": [ + { + "assignee": "role|administrator", + "fieldId": "0", + "operator": "is", + "value": "", + "type": "" + } + ], + "assignee_policy": "all", + "instructionsEnable": "0", + "instructionsValue": "Instructions: please review the values in the fields below and click on the Approve or Reject button", + "display_fields_mode": "all_fields", + "assignee_notification_enabled": "0", + "assignee_notification_from_name": "", + "assignee_notification_from_email": "{admin_email}", + "assignee_notification_reply_to": "", + "assignee_notification_bcc": "", + "assignee_notification_subject": "", + "assignee_notification_message": "A new entry is pending your approval. Please check your Workflow Inbox.", + "assignee_notification_disable_autoformat": "0", + "resend_assignee_emailEnable": "0", + "resend_assignee_emailValue": "7", + "resend_assignee_email_repeatEnable": "0", + "resend_assignee_email_repeatValue": "3", + "rejection_notification_enabled": "0", + "rejection_notification_type": "select", + "rejection_notification_routing": [ + { + "assignee": "role|administrator", + "fieldId": "0", + "operator": "is", + "value": "", + "type": "" + } + ], + "rejection_notification_from_name": "", + "rejection_notification_from_email": "{admin_email}", + "rejection_notification_reply_to": "", + "rejection_notification_bcc": "", + "rejection_notification_subject": "", + "rejection_notification_message": "Entry {entry_id} has been rejected", + "rejection_notification_disable_autoformat": "0", + "approval_notification_enabled": "0", + "approval_notification_type": "select", + "approval_notification_routing": [ + { + "assignee": "role|administrator", + "fieldId": "0", + "operator": "is", + "value": "", + "type": "" + } + ], + "approval_notification_from_name": "", + "approval_notification_from_email": "{admin_email}", + "approval_notification_reply_to": "", + "approval_notification_bcc": "", + "approval_notification_subject": "", + "approval_notification_message": "Entry {entry_id} has been approved", + "approval_notification_disable_autoformat": "0", + "note_mode": "not_required", + "expiration": "0", + "expiration_type": "delay", + "expiration_date": "", + "expiration_delay_offset": "", + "expiration_delay_unit": "hours", + "expiration_date_field_offset": "0", + "expiration_date_field_offset_unit": "hours", + "expiration_date_field_before_after": "after", + "status_expiration": "rejected", + "destination_expired": "next", + "destination_rejected": "complete", + "destination_approved": "next" + }, + "addon_slug": "gravityflow", + "event_type": null } ] } diff --git a/backend/app/plugins/wiaas/includes/db-updates/data/delivery-forms/delivery_action_customer_acceptance_form.json b/backend/app/plugins/wiaas/includes/db-updates/data/delivery-forms/delivery_action_customer_acceptance_form.json deleted file mode 100644 index 659e050..0000000 --- a/backend/app/plugins/wiaas/includes/db-updates/data/delivery-forms/delivery_action_customer_acceptance_form.json +++ /dev/null @@ -1,524 +0,0 @@ -{ - "0": { - "title": "DELIVERY ACTION TYPE: Customer acceptance", - "description": "The customer must accept the implementation before further actions can be taken. If the customer isn't satisfied, the problems or discrepancies must be fixed in order to gen an acceptance.", - "labelPlacement": "top_label", - "descriptionPlacement": "below", - "button": { - "type": "text", - "text": "Submit", - "imageUrl": "" - }, - "fields": [ - { - "type": "workflow_user", - "id": 2, - "label": "customer-id", - "adminLabel": "customer-id", - "isRequired": false, - "size": "medium", - "errorMessage": "", - "visibility": "administrative", - "inputs": null, - "choices": [ - ], - "formId": 1, - "description": "", - "allowsPrepopulate": true, - "inputMask": false, - "inputMaskValue": "", - "inputType": "", - "labelPlacement": "", - "descriptionPlacement": "", - "subLabelPlacement": "", - "placeholder": "", - "cssClass": "", - "inputName": "customer-id", - "noDuplicates": false, - "defaultValue": "", - "conditionalLogic": "", - "failed_validation": "", - "productField": "", - "multipleFiles": false, - "maxFiles": "", - "calculationFormula": "", - "calculationRounding": "", - "enableCalculation": "", - "disableQuantity": false, - "displayAllCategories": false, - "useRichTextEditor": false, - "displayOnly": "", - "enablePrice": "", - "gravityflowUsersRoleFilter": "" - }, - { - "type": "date", - "id": 6, - "label": "Actual date", - "adminLabel": "", - "isRequired": false, - "size": "medium", - "errorMessage": "", - "visibility": "visible", - "inputs": null, - "dateType": "datepicker", - "calendarIconType": "none", - "formId": 1, - "description": "", - "allowsPrepopulate": false, - "inputMask": false, - "inputMaskValue": "", - "inputType": "", - "labelPlacement": "", - "descriptionPlacement": "", - "subLabelPlacement": "", - "placeholder": "", - "cssClass": "", - "inputName": "", - "noDuplicates": false, - "defaultValue": "", - "choices": "", - "conditionalLogic": "", - "calendarIconUrl": "", - "dateFormat": "ymd_dash", - "productField": "", - "multipleFiles": false, - "maxFiles": "", - "calculationFormula": "", - "calculationRounding": "", - "enableCalculation": "", - "disableQuantity": false, - "displayAllCategories": false, - "useRichTextEditor": false, - "displayOnly": "" - }, - { - "type": "radio", - "id": 8, - "label": "acceptance", - "adminLabel": "", - "isRequired": false, - "size": "medium", - "errorMessage": "", - "visibility": "visible", - "inputs": null, - "choices": [ - { - "text": "not-accepted", - "value": "not-accepted", - "isSelected": true, - "price": "" - }, - { - "text": "accept", - "value": "accept", - "isSelected": false, - "price": "" - }, - { - "text": "decline", - "value": "decline", - "isSelected": false, - "price": "" - } - ], - "formId": 1, - "description": "", - "allowsPrepopulate": false, - "inputMask": false, - "inputMaskValue": "", - "inputType": "", - "labelPlacement": "", - "descriptionPlacement": "", - "subLabelPlacement": "", - "placeholder": "", - "cssClass": "", - "inputName": "", - "noDuplicates": false, - "defaultValue": "", - "conditionalLogic": "", - "productField": "", - "enableOtherChoice": "", - "enablePrice": "", - "multipleFiles": false, - "maxFiles": "", - "calculationFormula": "", - "calculationRounding": "", - "enableCalculation": "", - "disableQuantity": false, - "displayAllCategories": false, - "useRichTextEditor": false, - "displayOnly": "" - }, - { - "type": "date", - "id": 9, - "label": "Expiration date", - "adminLabel": "", - "isRequired": false, - "size": "medium", - "errorMessage": "", - "visibility": "visible", - "inputs": null, - "dateType": "datepicker", - "calendarIconType": "none", - "formId": 1, - "description": "", - "allowsPrepopulate": false, - "inputMask": false, - "inputMaskValue": "", - "inputType": "", - "labelPlacement": "", - "descriptionPlacement": "", - "subLabelPlacement": "", - "placeholder": "", - "cssClass": "", - "inputName": "", - "noDuplicates": false, - "defaultValue": "", - "choices": "", - "conditionalLogic": "", - "calendarIconUrl": "", - "dateFormat": "ymd_dash", - "productField": "", - "multipleFiles": false, - "maxFiles": "", - "calculationFormula": "", - "calculationRounding": "", - "enableCalculation": "", - "disableQuantity": false, - "displayAllCategories": false, - "useRichTextEditor": false, - "displayOnly": "" - }, - { - "type": "text", - "id": 10, - "label": "Reason", - "adminLabel": "", - "isRequired": false, - "size": "medium", - "errorMessage": "", - "visibility": "visible", - "inputs": null, - "formId": 1, - "description": "", - "allowsPrepopulate": false, - "inputMask": false, - "inputMaskValue": "", - "inputType": "", - "labelPlacement": "", - "descriptionPlacement": "", - "subLabelPlacement": "", - "placeholder": "", - "cssClass": "", - "inputName": "", - "noDuplicates": false, - "defaultValue": "", - "choices": "", - "conditionalLogic": "", - "productField": "", - "enablePasswordInput": "", - "maxLength": "", - "multipleFiles": false, - "maxFiles": "", - "calculationFormula": "", - "calculationRounding": "", - "enableCalculation": "", - "disableQuantity": false, - "displayAllCategories": false, - "useRichTextEditor": false, - "displayOnly": "", - "enablePrice": "" - }, - { - "type": "fileupload", - "id": 12, - "label": "File", - "adminLabel": "", - "isRequired": false, - "size": "medium", - "errorMessage": "", - "visibility": "visible", - "inputs": null, - "formId": 1, - "description": "Upload customer acceptance file", - "allowsPrepopulate": false, - "inputMask": false, - "inputMaskValue": "", - "inputType": "", - "labelPlacement": "", - "descriptionPlacement": "", - "subLabelPlacement": "", - "placeholder": "", - "cssClass": "", - "inputName": "", - "noDuplicates": false, - "defaultValue": "", - "choices": "", - "conditionalLogic": "", - "maxFileSize": "", - "maxFiles": "", - "multipleFiles": true, - "allowedExtensions": "pdf,docx,doc,xlsx,xls,odt,ods,jpg,png,jpeg", - "productField": "", - "calculationFormula": "", - "calculationRounding": "", - "enableCalculation": "", - "disableQuantity": false, - "displayAllCategories": false, - "useRichTextEditor": false - } - ], - "version": "2.3.2", - "id": 1, - "useCurrentUserAsAuthor": true, - "postContentTemplateEnabled": false, - "postTitleTemplateEnabled": false, - "postTitleTemplate": "", - "postContentTemplate": "", - "lastPageButton": null, - "pagination": null, - "firstPageCssClass": null, - "is_active": "1", - "date_created": "2018-08-15 20:30:18", - "is_trash": "0", - "confirmations": [ - { - "id": "5b5f75f7494b7", - "name": "Default Confirmation", - "isDefault": true, - "type": "message", - "message": "Thanks for contacting us! We will get in touch with you shortly.", - "url": "", - "pageId": "", - "queryString": "" - } - ], - "notifications": [ - { - "id": "5b5f75f748cee", - "to": "{admin_email}", - "name": "Admin Notification", - "event": "form_submission", - "toType": "email", - "subject": "New submission from {form_title}", - "message": "{all_fields}" - } - ], - "feeds": { - "gravityflow": [ - { - "id": "1", - "form_id": "1", - "is_active": "1", - "feed_order": "0", - "meta": { - "step_name": "Upload acceptance file", - "description": "", - "step_type": "user_input", - "step_highlight": "0", - "step_highlight_type": "color", - "step_highlight_color": "#dd3333", - "feed_condition_conditional_logic": "0", - "feed_condition_conditional_logic_object": [], - "scheduled": "0", - "schedule_type": "delay", - "schedule_date": "", - "schedule_delay_offset": "", - "schedule_delay_unit": "hours", - "schedule_date_field_offset": "0", - "schedule_date_field_offset_unit": "hours", - "schedule_date_field_before_after": "after", - "schedule_date_field": "6", - "type": "select", - "assignees": [ - "role|administrator", - "assignee_user_field|2" - ], - "routing": "", - "assignee_policy": "any", - "highlight_editable_fields_enabled": "0", - "highlight_editable_fields_class": "green-triangle", - "instructionsEnable": "0", - "instructionsValue": "", - "display_fields_mode": "selected_fields", - "default_status": "hidden", - "note_mode": "not_required", - "assignee_notification_enabled": "0", - "assignee_notification_from_name": "", - "assignee_notification_from_email": "{admin_email}", - "assignee_notification_reply_to": "", - "assignee_notification_bcc": "", - "assignee_notification_subject": "Upload order acceptance file", - "assignee_notification_message": "A new entry requires your input.", - "assignee_notification_disable_autoformat": "0", - "resend_assignee_emailEnable": "0", - "resend_assignee_emailValue": "7", - "resend_assignee_email_repeatEnable": "0", - "resend_assignee_email_repeatValue": "3", - "in_progress_notification_enabled": "0", - "in_progress_notification_type": "select", - "in_progress_notification_routing": [ - { - "assignee": "user_id|2", - "fieldId": "0", - "operator": "is", - "value": "", - "type": "" - } - ], - "in_progress_notification_from_name": "", - "in_progress_notification_from_email": "{admin_email}", - "in_progress_notification_reply_to": "", - "in_progress_notification_bcc": "", - "in_progress_notification_subject": "", - "in_progress_notification_message": "Entry {entry_id} has been updated and remains in progress.", - "in_progress_notification_disable_autoformat": "0", - "complete_notification_enabled": "0", - "complete_notification_type": "select", - "complete_notification_routing": [ - { - "assignee": "user_id|2", - "fieldId": "0", - "operator": "is", - "value": "", - "type": "" - } - ], - "complete_notification_from_name": "", - "complete_notification_from_email": "{admin_email}", - "complete_notification_reply_to": "", - "complete_notification_bcc": "", - "complete_notification_subject": "", - "complete_notification_message": "Entry {entry_id} has been updated completing the step.", - "complete_notification_disable_autoformat": "0", - "confirmation_messageEnable": "0", - "confirmation_messageValue": "Thank you.", - "expiration": "0", - "expiration_type": "date_field", - "expiration_date": "", - "expiration_delay_offset": "7", - "expiration_delay_unit": "days", - "expiration_date_field_offset": "0", - "expiration_date_field_offset_unit": "hours", - "expiration_date_field_before_after": "after", - "expiration_date_field": "9", - "status_expiration": "expired", - "destination_expired": "2", - "destination_complete": "next" - }, - "addon_slug": "gravityflow", - "event_type": null - }, - { - "id": "2", - "form_id": "1", - "is_active": "1", - "feed_order": "0", - "meta": { - "step_name": "Approve customer acceptance", - "description": "", - "step_type": "approval", - "step_highlight": "0", - "step_highlight_type": "color", - "step_highlight_color": "#dd3333", - "feed_condition_conditional_logic": "0", - "feed_condition_conditional_logic_object": [], - "scheduled": "0", - "schedule_type": "delay", - "schedule_date": "", - "schedule_delay_offset": "", - "schedule_delay_unit": "hours", - "schedule_date_field_offset": "0", - "schedule_date_field_offset_unit": "hours", - "schedule_date_field_before_after": "after", - "type": "select", - "assignees": [ - "role|administrator" - ], - "routing": [ - { - "assignee": "user_id|2", - "fieldId": "0", - "operator": "is", - "value": "", - "type": "" - } - ], - "assignee_policy": "any", - "instructionsEnable": "0", - "instructionsValue": "Instructions: please review the values in the fields below and click on the Approve or Reject button", - "display_fields_mode": "all_fields", - "assignee_notification_enabled": "0", - "assignee_notification_from_name": "", - "assignee_notification_from_email": "{admin_email}", - "assignee_notification_reply_to": "", - "assignee_notification_bcc": "", - "assignee_notification_subject": "", - "assignee_notification_message": "A new entry is pending your approval. Please check your Workflow Inbox.", - "assignee_notification_disable_autoformat": "0", - "resend_assignee_emailEnable": "0", - "resend_assignee_emailValue": "7", - "resend_assignee_email_repeatEnable": "0", - "resend_assignee_email_repeatValue": "3", - "rejection_notification_enabled": "0", - "rejection_notification_type": "select", - "rejection_notification_routing": [ - { - "assignee": "user_id|2", - "fieldId": "0", - "operator": "is", - "value": "", - "type": "" - } - ], - "rejection_notification_from_name": "", - "rejection_notification_from_email": "{admin_email}", - "rejection_notification_reply_to": "", - "rejection_notification_bcc": "", - "rejection_notification_subject": "", - "rejection_notification_message": "Entry {entry_id} has been rejected", - "rejection_notification_disable_autoformat": "0", - "approval_notification_enabled": "0", - "approval_notification_type": "select", - "approval_notification_routing": [ - { - "assignee": "user_id|2", - "fieldId": "0", - "operator": "is", - "value": "", - "type": "" - } - ], - "approval_notification_from_name": "", - "approval_notification_from_email": "{admin_email}", - "approval_notification_reply_to": "", - "approval_notification_bcc": "", - "approval_notification_subject": "", - "approval_notification_message": "Entry {entry_id} has been approved", - "approval_notification_disable_autoformat": "0", - "revertEnable": "0", - "revertValue": 1, - "note_mode": "not_required", - "expiration": "0", - "expiration_type": "delay", - "expiration_date": "", - "expiration_delay_offset": "", - "expiration_delay_unit": "hours", - "expiration_date_field_offset": "0", - "expiration_date_field_offset_unit": "hours", - "expiration_date_field_before_after": "after", - "status_expiration": "rejected", - "destination_expired": "next", - "destination_rejected": 1, - "destination_approved": "next" - }, - "addon_slug": "gravityflow", - "event_type": null - } - ] - } - }, - "version": "2.3.2" -} \ No newline at end of file diff --git a/backend/app/plugins/wiaas/includes/db-updates/data/delivery-forms/delivery_action_manual_form.json b/backend/app/plugins/wiaas/includes/db-updates/data/delivery-forms/delivery_action_manual_form.json deleted file mode 100644 index cbca857..0000000 --- a/backend/app/plugins/wiaas/includes/db-updates/data/delivery-forms/delivery_action_manual_form.json +++ /dev/null @@ -1,252 +0,0 @@ -{ - "0": { - "title": "DELIVERY ACTION TYPE: Manual", - "description": "Manual process step action type", - "labelPlacement": "top_label", - "descriptionPlacement": "below", - "button": { - "type": "text", - "text": "Submit", - "imageUrl": "" - }, - "fields": [ - { - "type": "workflow_user", - "id": 2, - "label": "customer-id", - "adminLabel": "customer-id", - "isRequired": false, - "size": "medium", - "errorMessage": "", - "visibility": "administrative", - "inputs": null, - "choices": [ - { - "value": 2, - "text": "Customer Wiaas" - }, - { - "value": 1, - "text": "wpUser" - } - ], - "formId": 4, - "description": "", - "allowsPrepopulate": true, - "inputMask": false, - "inputMaskValue": "", - "inputType": "", - "labelPlacement": "", - "descriptionPlacement": "", - "subLabelPlacement": "", - "placeholder": "", - "cssClass": "", - "inputName": "customer-id", - "noDuplicates": false, - "defaultValue": "", - "conditionalLogic": "", - "failed_validation": "", - "productField": "", - "multipleFiles": false, - "maxFiles": "", - "calculationFormula": "", - "calculationRounding": "", - "enableCalculation": "", - "disableQuantity": false, - "displayAllCategories": false, - "useRichTextEditor": false, - "displayOnly": "", - "enablePrice": "", - "gravityflowUsersRoleFilter": "" - }, - { - "type": "date", - "id": 3, - "label": "Actual Date", - "adminLabel": "", - "isRequired": false, - "size": "medium", - "errorMessage": "", - "visibility": "visible", - "inputs": null, - "dateType": "datepicker", - "calendarIconType": "calendar", - "formId": 4, - "description": "", - "allowsPrepopulate": false, - "inputMask": false, - "inputMaskValue": "", - "inputType": "", - "labelPlacement": "", - "descriptionPlacement": "", - "subLabelPlacement": "", - "placeholder": "", - "cssClass": "", - "inputName": "", - "noDuplicates": false, - "defaultValue": "", - "choices": "", - "conditionalLogic": "", - "calendarIconUrl": "", - "dateFormat": "ymd_dash", - "productField": "", - "multipleFiles": false, - "maxFiles": "", - "calculationFormula": "", - "calculationRounding": "", - "enableCalculation": "", - "disableQuantity": false, - "displayAllCategories": false, - "useRichTextEditor": false, - "displayOnly": "" - } - ], - "version": "2.3.2", - "id": 4, - "useCurrentUserAsAuthor": true, - "postContentTemplateEnabled": false, - "postTitleTemplateEnabled": false, - "postTitleTemplate": "", - "postContentTemplate": "", - "lastPageButton": null, - "pagination": null, - "firstPageCssClass": null, - "is_active": "1", - "date_created": "2018-08-09 15:36:00", - "is_trash": "0", - "confirmations": [ - { - "id": "5b5f9ebc52a80", - "name": "Default Confirmation", - "isDefault": true, - "type": "message", - "message": "Thanks for contacting us! We will get in touch with you shortly.", - "url": "", - "pageId": "", - "queryString": "" - } - ], - "notifications": [ - { - "id": "5b5f9ebc520f3", - "to": "{admin_email}", - "name": "Admin Notification", - "event": "form_submission", - "toType": "email", - "subject": "New submission from {form_title}", - "message": "{all_fields}" - } - ], - "feeds": { - "gravityflow": [ - { - "id": "6", - "form_id": "4", - "is_active": "1", - "feed_order": "0", - "meta": { - "step_name": "Complete step", - "description": "", - "step_type": "approval", - "step_highlight": "0", - "step_highlight_type": "color", - "step_highlight_color": "#dd3333", - "feed_condition_conditional_logic": "0", - "feed_condition_conditional_logic_object": [], - "scheduled": "0", - "schedule_type": "delay", - "schedule_date": "", - "schedule_delay_offset": "", - "schedule_delay_unit": "hours", - "schedule_date_field_offset": "0", - "schedule_date_field_offset_unit": "hours", - "schedule_date_field_before_after": "after", - "schedule_date_field": "3", - "type": "select", - "assignees": [ - "role|administrator" - ], - "routing": [ - { - "assignee": "user_id|2", - "fieldId": "0", - "operator": "is", - "value": "", - "type": "" - } - ], - "assignee_policy": "any", - "instructionsEnable": "0", - "instructionsValue": "Instructions: please review the values in the fields below and click on the Approve or Reject button", - "display_fields_mode": "all_fields", - "assignee_notification_enabled": "0", - "assignee_notification_from_name": "", - "assignee_notification_from_email": "{admin_email}", - "assignee_notification_reply_to": "", - "assignee_notification_bcc": "", - "assignee_notification_subject": "", - "assignee_notification_message": "A new entry is pending your approval. Please check your Workflow Inbox.", - "assignee_notification_disable_autoformat": "0", - "resend_assignee_emailEnable": "0", - "resend_assignee_emailValue": "7", - "resend_assignee_email_repeatEnable": "0", - "resend_assignee_email_repeatValue": "3", - "rejection_notification_enabled": "0", - "rejection_notification_type": "select", - "rejection_notification_routing": [ - { - "assignee": "user_id|2", - "fieldId": "0", - "operator": "is", - "value": "", - "type": "" - } - ], - "rejection_notification_from_name": "", - "rejection_notification_from_email": "{admin_email}", - "rejection_notification_reply_to": "", - "rejection_notification_bcc": "", - "rejection_notification_subject": "", - "rejection_notification_message": "Entry {entry_id} has been rejected", - "rejection_notification_disable_autoformat": "0", - "approval_notification_enabled": "0", - "approval_notification_type": "select", - "approval_notification_routing": [ - { - "assignee": "user_id|2", - "fieldId": "0", - "operator": "is", - "value": "", - "type": "" - } - ], - "approval_notification_from_name": "", - "approval_notification_from_email": "{admin_email}", - "approval_notification_reply_to": "", - "approval_notification_bcc": "", - "approval_notification_subject": "", - "approval_notification_message": "Entry {entry_id} has been approved", - "approval_notification_disable_autoformat": "0", - "note_mode": "not_required", - "expiration": "0", - "expiration_type": "delay", - "expiration_date": "", - "expiration_delay_offset": "", - "expiration_delay_unit": "hours", - "expiration_date_field_offset": "0", - "expiration_date_field_offset_unit": "hours", - "expiration_date_field_before_after": "after", - "expiration_date_field": "3", - "status_expiration": "rejected", - "destination_expired": "next", - "destination_rejected": "complete", - "destination_approved": "next" - }, - "addon_slug": "gravityflow", - "event_type": null - } - ] - } - }, - "version": "2.3.2" -} \ No newline at end of file diff --git a/backend/app/plugins/wiaas/includes/db-updates/data/delivery-forms/delivery_action_schedule_meeting.json b/backend/app/plugins/wiaas/includes/db-updates/data/delivery-forms/delivery_action_schedule_meeting.json deleted file mode 100644 index be4ebb0..0000000 --- a/backend/app/plugins/wiaas/includes/db-updates/data/delivery-forms/delivery_action_schedule_meeting.json +++ /dev/null @@ -1,406 +0,0 @@ -{ - "0": { - "title": "DELIVERY ACTION TYPE: Schedule meeting", - "description": "Schedule meeting with customer", - "labelPlacement": "top_label", - "descriptionPlacement": "below", - "button": { - "type": "text", - "text": "Submit", - "imageUrl": "" - }, - "fields": [ - { - "type": "workflow_user", - "id": 3, - "label": "customer-id", - "adminLabel": "customer-id", - "isRequired": false, - "size": "medium", - "errorMessage": "", - "visibility": "administrative", - "inputs": null, - "choices": [ - { - "value": 2, - "text": "Customer Wiaas" - }, - { - "value": 1, - "text": "wpUser" - } - ], - "formId": 2, - "description": "", - "allowsPrepopulate": true, - "inputMask": false, - "inputMaskValue": "", - "inputType": "", - "labelPlacement": "", - "descriptionPlacement": "", - "subLabelPlacement": "", - "placeholder": "", - "cssClass": "", - "inputName": "customer-id", - "noDuplicates": false, - "defaultValue": "", - "conditionalLogic": "", - "failed_validation": "", - "productField": "", - "multipleFiles": false, - "maxFiles": "", - "calculationFormula": "", - "calculationRounding": "", - "enableCalculation": "", - "disableQuantity": false, - "displayAllCategories": false, - "useRichTextEditor": false, - "displayOnly": "", - "gravityflowUsersRoleFilter": "" - }, - { - "type": "date", - "id": 4, - "label": "Actual Date", - "adminLabel": "", - "isRequired": false, - "size": "medium", - "errorMessage": "", - "visibility": "visible", - "inputs": null, - "dateType": "datepicker", - "calendarIconType": "calendar", - "formId": 2, - "description": "", - "allowsPrepopulate": false, - "inputMask": false, - "inputMaskValue": "", - "inputType": "", - "labelPlacement": "", - "descriptionPlacement": "", - "subLabelPlacement": "", - "placeholder": "", - "cssClass": "", - "inputName": "", - "noDuplicates": false, - "defaultValue": "", - "choices": "", - "conditionalLogic": "", - "calendarIconUrl": "", - "dateFormat": "ymd_dash", - "productField": "", - "multipleFiles": false, - "maxFiles": "", - "calculationFormula": "", - "calculationRounding": "", - "enableCalculation": "", - "disableQuantity": false, - "displayAllCategories": false, - "useRichTextEditor": false, - "displayOnly": "" - }, - { - "type": "date", - "id": 5, - "label": "Schedule date", - "adminLabel": "", - "isRequired": false, - "size": "medium", - "errorMessage": "", - "visibility": "visible", - "inputs": null, - "dateType": "datepicker", - "calendarIconType": "calendar", - "formId": 2, - "description": "", - "allowsPrepopulate": false, - "inputMask": false, - "inputMaskValue": "", - "inputType": "", - "labelPlacement": "", - "descriptionPlacement": "", - "subLabelPlacement": "", - "placeholder": "", - "cssClass": "", - "inputName": "", - "noDuplicates": false, - "defaultValue": "", - "choices": "", - "conditionalLogic": "", - "calendarIconUrl": "", - "dateFormat": "ymd_dash", - "productField": "", - "multipleFiles": false, - "maxFiles": "", - "calculationFormula": "", - "calculationRounding": "", - "enableCalculation": "", - "disableQuantity": false, - "displayAllCategories": false, - "useRichTextEditor": false - } - ], - "version": "2.3.2", - "id": 2, - "useCurrentUserAsAuthor": true, - "postContentTemplateEnabled": false, - "postTitleTemplateEnabled": false, - "postTitleTemplate": "", - "postContentTemplate": "", - "lastPageButton": null, - "pagination": null, - "firstPageCssClass": null, - "is_active": "1", - "date_created": "2018-08-09 15:35:59", - "is_trash": "0", - "confirmations": [ - { - "id": "5b60b12baa00e", - "name": "Default Confirmation", - "isDefault": true, - "type": "message", - "message": "Thanks for contacting us! We will get in touch with you shortly.", - "url": "", - "pageId": "", - "queryString": "" - } - ], - "notifications": [ - { - "id": "5b60b12ba9850", - "to": "{admin_email}", - "name": "Admin Notification", - "event": "form_submission", - "toType": "email", - "subject": "New submission from {form_title}", - "message": "{all_fields}" - } - ], - "feeds": { - "gravityflow": [ - { - "id": "3", - "form_id": "2", - "is_active": "1", - "feed_order": "0", - "meta": { - "step_name": "Broker proposes meeting date", - "description": "", - "step_type": "user_input", - "step_highlight": "0", - "step_highlight_type": "color", - "step_highlight_color": "#dd3333", - "feed_condition_conditional_logic": "0", - "feed_condition_conditional_logic_object": [], - "scheduled": "0", - "schedule_type": "delay", - "schedule_date": "", - "schedule_delay_offset": "", - "schedule_delay_unit": "hours", - "schedule_date_field_offset": "0", - "schedule_date_field_offset_unit": "hours", - "schedule_date_field_before_after": "after", - "schedule_date_field": "4", - "type": "select", - "assignees": [ - "role|administrator" - ], - "editable_fields": [ - "4", - "5" - ], - "routing": "", - "assignee_policy": "all", - "highlight_editable_fields_enabled": "0", - "highlight_editable_fields_class": "green-triangle", - "instructionsEnable": "0", - "instructionsValue": "", - "display_fields_mode": "selected_fields", - "display_fields_selected": [ - "4", - "5" - ], - "default_status": "submit_buttons", - "note_mode": "not_required", - "assignee_notification_enabled": "0", - "assignee_notification_from_name": "", - "assignee_notification_from_email": "{admin_email}", - "assignee_notification_reply_to": "", - "assignee_notification_bcc": "", - "assignee_notification_subject": "", - "assignee_notification_message": "A new entry requires your input.", - "assignee_notification_disable_autoformat": "0", - "resend_assignee_emailEnable": "0", - "resend_assignee_emailValue": "7", - "resend_assignee_email_repeatEnable": "0", - "resend_assignee_email_repeatValue": "3", - "in_progress_notification_enabled": "0", - "in_progress_notification_type": "select", - "in_progress_notification_routing": [ - { - "assignee": "user_id|2", - "fieldId": "0", - "operator": "is", - "value": "", - "type": "" - } - ], - "in_progress_notification_from_name": "", - "in_progress_notification_from_email": "{admin_email}", - "in_progress_notification_reply_to": "", - "in_progress_notification_bcc": "", - "in_progress_notification_subject": "", - "in_progress_notification_message": "Entry {entry_id} has been updated and remains in progress.", - "in_progress_notification_disable_autoformat": "0", - "complete_notification_enabled": "0", - "complete_notification_type": "select", - "complete_notification_routing": [ - { - "assignee": "user_id|2", - "fieldId": "0", - "operator": "is", - "value": "", - "type": "" - } - ], - "complete_notification_from_name": "", - "complete_notification_from_email": "{admin_email}", - "complete_notification_reply_to": "", - "complete_notification_bcc": "", - "complete_notification_subject": "", - "complete_notification_message": "Entry {entry_id} has been updated completing the step.", - "complete_notification_disable_autoformat": "0", - "confirmation_messageEnable": "0", - "confirmation_messageValue": "Thank you.", - "expiration": "0", - "expiration_type": "delay", - "expiration_date": "", - "expiration_delay_offset": "", - "expiration_delay_unit": "hours", - "expiration_date_field_offset": "0", - "expiration_date_field_offset_unit": "hours", - "expiration_date_field_before_after": "after", - "expiration_date_field": "4", - "status_expiration": "complete", - "destination_expired": "next", - "destination_complete": "next" - }, - "addon_slug": "gravityflow", - "event_type": null - }, - { - "id": "4", - "form_id": "2", - "is_active": "1", - "feed_order": "0", - "meta": { - "step_name": "Customer approval for scheduled date", - "description": "", - "step_type": "approval", - "step_highlight": "0", - "step_highlight_type": "color", - "step_highlight_color": "#dd3333", - "feed_condition_conditional_logic": "0", - "feed_condition_conditional_logic_object": [], - "scheduled": "0", - "schedule_type": "delay", - "schedule_date": "", - "schedule_delay_offset": "", - "schedule_delay_unit": "hours", - "schedule_date_field_offset": "0", - "schedule_date_field_offset_unit": "hours", - "schedule_date_field_before_after": "after", - "schedule_date_field": "4", - "type": "select", - "assignees": [ - "assignee_user_field|3" - ], - "routing": [ - { - "assignee": "user_id|2", - "fieldId": "0", - "operator": "is", - "value": "", - "type": "" - } - ], - "assignee_policy": "all", - "instructionsEnable": "0", - "instructionsValue": "Instructions: please review the values in the fields below and click on the Approve or Reject button", - "display_fields_mode": "selected_fields", - "display_fields_selected": [ - "5" - ], - "assignee_notification_enabled": "0", - "assignee_notification_from_name": "", - "assignee_notification_from_email": "{admin_email}", - "assignee_notification_reply_to": "", - "assignee_notification_bcc": "", - "assignee_notification_subject": "", - "assignee_notification_message": "A new entry is pending your approval. Please check your Workflow Inbox.", - "assignee_notification_disable_autoformat": "0", - "resend_assignee_emailEnable": "0", - "resend_assignee_emailValue": "7", - "resend_assignee_email_repeatEnable": "0", - "resend_assignee_email_repeatValue": "3", - "rejection_notification_enabled": "0", - "rejection_notification_type": "select", - "rejection_notification_routing": [ - { - "assignee": "user_id|2", - "fieldId": "0", - "operator": "is", - "value": "", - "type": "" - } - ], - "rejection_notification_from_name": "", - "rejection_notification_from_email": "{admin_email}", - "rejection_notification_reply_to": "", - "rejection_notification_bcc": "", - "rejection_notification_subject": "", - "rejection_notification_message": "Entry {entry_id} has been rejected", - "rejection_notification_disable_autoformat": "0", - "approval_notification_enabled": "0", - "approval_notification_type": "select", - "approval_notification_routing": [ - { - "assignee": "user_id|2", - "fieldId": "0", - "operator": "is", - "value": "", - "type": "" - } - ], - "approval_notification_from_name": "", - "approval_notification_from_email": "{admin_email}", - "approval_notification_reply_to": "", - "approval_notification_bcc": "", - "approval_notification_subject": "", - "approval_notification_message": "Entry {entry_id} has been approved", - "approval_notification_disable_autoformat": "0", - "revertEnable": "0", - "revertValue": 3, - "note_mode": "not_required", - "expiration": "0", - "expiration_type": "delay", - "expiration_date": "", - "expiration_delay_offset": "", - "expiration_delay_unit": "hours", - "expiration_date_field_offset": "0", - "expiration_date_field_offset_unit": "hours", - "expiration_date_field_before_after": "after", - "expiration_date_field": "4", - "status_expiration": "rejected", - "destination_expired": "next", - "destination_rejected": 3, - "destination_approved": "complete" - }, - "addon_slug": "gravityflow", - "event_type": null - } - ] - } - }, - "version": "2.3.2" -} \ No newline at end of file diff --git a/backend/app/plugins/wiaas/includes/db-updates/data/delivery-forms/delivery_action_validate_questionnaire_form.json b/backend/app/plugins/wiaas/includes/db-updates/data/delivery-forms/delivery_action_validate_questionnaire_form.json deleted file mode 100644 index e5e55f1..0000000 --- a/backend/app/plugins/wiaas/includes/db-updates/data/delivery-forms/delivery_action_validate_questionnaire_form.json +++ /dev/null @@ -1,264 +0,0 @@ -{ - "0": { - "title": "DELIVERY ACTION TYPE: Validate Questionnaire", - "description": "The configuration details submitted at ordering must be validated and any missing or incomplete information must be added.", - "labelPlacement": "top_label", - "descriptionPlacement": "below", - "button": { - "type": "text", - "text": "Submit", - "imageUrl": "" - }, - "fields": [ - { - "type": "workflow_user", - "id": 4, - "label": "customer-id", - "adminLabel": "customer-id", - "isRequired": false, - "size": "medium", - "errorMessage": "", - "visibility": "administrative", - "inputs": null, - "choices": [ - { - "value": 2, - "text": "Customer Wiaas" - }, - { - "value": 1, - "text": "wpUser" - } - ], - "formId": 3, - "description": "", - "allowsPrepopulate": true, - "inputMask": false, - "inputMaskValue": "", - "inputType": "", - "labelPlacement": "", - "descriptionPlacement": "", - "subLabelPlacement": "", - "placeholder": "", - "cssClass": "", - "inputName": "customer-id", - "noDuplicates": false, - "defaultValue": "", - "conditionalLogic": "", - "failed_validation": "", - "productField": "", - "multipleFiles": false, - "maxFiles": "", - "calculationFormula": "", - "calculationRounding": "", - "enableCalculation": "", - "disableQuantity": false, - "displayAllCategories": false, - "useRichTextEditor": false, - "displayOnly": "", - "enablePrice": "", - "gravityflowUsersRoleFilter": "" - }, - { - "type": "date", - "id": 5, - "label": "Actual date", - "adminLabel": "", - "isRequired": false, - "size": "medium", - "errorMessage": "", - "visibility": "visible", - "inputs": null, - "dateType": "datepicker", - "calendarIconType": "none", - "formId": 3, - "description": "", - "allowsPrepopulate": false, - "inputMask": false, - "inputMaskValue": "", - "inputType": "", - "labelPlacement": "", - "descriptionPlacement": "", - "subLabelPlacement": "", - "placeholder": "", - "cssClass": "", - "inputName": "", - "noDuplicates": false, - "defaultValue": "", - "choices": "", - "conditionalLogic": "", - "calendarIconUrl": "", - "dateFormat": "", - "productField": "", - "multipleFiles": false, - "maxFiles": "", - "calculationFormula": "", - "calculationRounding": "", - "enableCalculation": "", - "disableQuantity": false, - "displayAllCategories": false, - "useRichTextEditor": false - } - ], - "version": "2.3.2", - "id": 3, - "useCurrentUserAsAuthor": true, - "postContentTemplateEnabled": false, - "postTitleTemplateEnabled": false, - "postTitleTemplate": "", - "postContentTemplate": "", - "lastPageButton": null, - "pagination": null, - "firstPageCssClass": null, - "is_active": "1", - "date_created": "2018-08-09 15:36:00", - "is_trash": "0", - "confirmations": [ - { - "id": "5b5f688188e90", - "name": "Default Confirmation", - "isDefault": true, - "type": "message", - "message": "Thanks for contacting us! We will get in touch with you shortly.", - "url": "", - "pageId": "", - "queryString": "" - } - ], - "notifications": [ - { - "id": "5b5f68818822e", - "to": "{admin_email}", - "name": "Admin Notification", - "event": "form_submission", - "toType": "email", - "subject": "New submission from {form_title}", - "message": "{all_fields}" - } - ], - "feeds": { - "gravityflow": [ - { - "id": "5", - "form_id": "3", - "is_active": "1", - "feed_order": "0", - "meta": { - "step_name": "Approve customer configuration", - "description": "", - "step_type": "approval", - "step_highlight": "0", - "step_highlight_type": "color", - "step_highlight_color": "#dd3333", - "feed_condition_conditional_logic": "0", - "feed_condition_conditional_logic_object": { - "conditionalLogic": { - "actionType": "show", - "logicType": "all", - "rules": [ - { - "fieldId": "2", - "operator": "is", - "value": "administrator" - } - ] - } - }, - "scheduled": "0", - "schedule_type": "delay", - "schedule_date": "", - "schedule_delay_offset": "", - "schedule_delay_unit": "hours", - "schedule_date_field_offset": "0", - "schedule_date_field_offset_unit": "hours", - "schedule_date_field_before_after": "after", - "schedule_date_field": "5", - "type": "select", - "assignees": [ - "role|administrator" - ], - "routing": [ - { - "target": false, - "fieldId": "0", - "operator": "is", - "value": "", - "type": false, - "assignee": "user_id|2" - } - ], - "assignee_policy": "any", - "instructionsEnable": "1", - "instructionsValue": "Instructions: please review the values in the fields below and click on the Approve or Reject button", - "display_fields_mode": "selected_fields", - "assignee_notification_enabled": "0", - "assignee_notification_from_name": "", - "assignee_notification_from_email": "{admin_email}", - "assignee_notification_reply_to": "", - "assignee_notification_bcc": "", - "assignee_notification_subject": "", - "assignee_notification_message": "A new entry is pending your approval. Please check your Workflow Inbox.", - "assignee_notification_disable_autoformat": "0", - "resend_assignee_emailEnable": "0", - "resend_assignee_emailValue": "7", - "resend_assignee_email_repeatEnable": "0", - "resend_assignee_email_repeatValue": "3", - "rejection_notification_enabled": "0", - "rejection_notification_type": "select", - "rejection_notification_routing": [ - { - "assignee": "user_id|2", - "fieldId": "0", - "operator": "is", - "value": "", - "type": "" - } - ], - "rejection_notification_from_name": "", - "rejection_notification_from_email": "{admin_email}", - "rejection_notification_reply_to": "", - "rejection_notification_bcc": "", - "rejection_notification_subject": "", - "rejection_notification_message": "Entry {entry_id} has been rejected", - "rejection_notification_disable_autoformat": "0", - "approval_notification_enabled": "0", - "approval_notification_type": "select", - "approval_notification_routing": [ - { - "assignee": "user_id|2", - "fieldId": "0", - "operator": "is", - "value": "", - "type": "" - } - ], - "approval_notification_from_name": "", - "approval_notification_from_email": "{admin_email}", - "approval_notification_reply_to": "", - "approval_notification_bcc": "", - "approval_notification_subject": "", - "approval_notification_message": "Entry {entry_id} has been approved", - "approval_notification_disable_autoformat": "0", - "note_mode": "not_required", - "expiration": "0", - "expiration_type": "delay", - "expiration_date": "", - "expiration_delay_offset": "", - "expiration_delay_unit": "hours", - "expiration_date_field_offset": "0", - "expiration_date_field_offset_unit": "hours", - "expiration_date_field_before_after": "after", - "expiration_date_field": "5", - "status_expiration": "rejected", - "destination_expired": "next", - "destination_rejected": "complete", - "destination_approved": "next" - }, - "addon_slug": "gravityflow", - "event_type": null - } - ] - } - }, - "version": "2.3.2" -} \ No newline at end of file diff --git a/backend/app/plugins/wiaas/includes/db-updates/wiaas-db-update-general.php b/backend/app/plugins/wiaas/includes/db-updates/wiaas-db-update-general.php index a5af42b..97cc1f1 100644 --- a/backend/app/plugins/wiaas/includes/db-updates/wiaas-db-update-general.php +++ b/backend/app/plugins/wiaas/includes/db-updates/wiaas-db-update-general.php @@ -17,59 +17,6 @@ function wiaas_db_update_setup_gravity() { update_option('gravityflow_pending_installation', false); } -function wiaas_db_update_add_delivery_process_forms() { - $action_type_forms_files = array( - 'delivery_action_customer_acceptance_form', - 'delivery_action_schedule_meeting', - 'delivery_action_validate_questionnaire_form', - 'delivery_action_manual_form', - ); - - // Since import action will generate form with new id, we need to remember this mapping - // so we can update process delivery steps to point to correct form ids - $action_type_forms_ids_mappings = array(); - - $process_forms_files = array( - 'delivery_process_normal_delivery_form' - ); - - $created_forms = array(); - - // import forms for delivery action types - foreach ($action_type_forms_files as $action_type_form_file) { - $form_json = file_get_contents( dirname( __FILE__ ) . "/data/delivery-forms/" . $action_type_form_file . '.json' ); - - $form_meta = json_decode( $form_json, true ); - $form_meta = $form_meta[0]; - - $form_id = GFAPI::add_form($form_meta); - - $created_forms[] = GFAPI::get_form($form_id); - - $action_type_forms_ids_mappings[$form_meta['id']] = $form_id; - } - - // import forms for delivery process - foreach ($process_forms_files as $process_form_file) { - $form_json = file_get_contents( dirname( __FILE__ ) . "/data/delivery-forms/" . $process_form_file . '.json' ); - - $form_meta = json_decode( $form_json, true ); - $form_meta = $form_meta[0]; - - // update delivery steps forms ids with correct values - foreach ($form_meta['feeds']['gravityflow'] as $key => $process_step_meta) { - $process_step_target_form_id = $form_meta['feeds']['gravityflow'][$key]['meta']['target_form_id']; - $form_meta['feeds']['gravityflow'][$key]['meta']['target_form_id'] = $action_type_forms_ids_mappings[$process_step_target_form_id]; - } - - $form_id = GFAPI::add_form($form_meta); - - $created_forms[] = GFAPI::get_form($form_id); - } - - do_action('gform_forms_post_import', $created_forms); -} - function wiaas_db_update_enable_orders_access_management() { $post_types_option = Groups_Options::get_option( Groups_Post_Access::POST_TYPES, array() ); @@ -129,4 +76,18 @@ function wiaas_create_organization_roles_capabilities() { foreach ($roles as $role) { Groups_Capability::create( array( 'capability' => 'wiaas_' . $role )); } +} + + +function import_delivery_action_forms() { + + $forms = GFAPI::get_forms(); + + foreach ($forms as $form) { + GFAPI::delete_form($form['id']); + } + + GFExport::import_file(dirname( __FILE__ ) . "/data/delivery-forms/delivery-action-forms.json"); + + //GFExport::import_file(dirname( __FILE__ ) . "/data/delivery-forms/delivery-process-normal-delivery-form.json"); } \ No newline at end of file diff --git a/backend/app/plugins/wiaas/includes/delivery-process/class-wiaas-date-list-field.php b/backend/app/plugins/wiaas/includes/delivery-process/class-wiaas-date-list-field.php deleted file mode 100644 index 767c08d..0000000 --- a/backend/app/plugins/wiaas/includes/delivery-process/class-wiaas-date-list-field.php +++ /dev/null @@ -1,38 +0,0 @@ -inputType = 'date'; - } - - public function get_list_input($has_columns, $column, $value, $form_id) { - - $tabindex = $this->get_tabindex(); - $disabled = $this->is_form_editor() ? 'disabled' : ''; - - return ""; - } - - public function get_value_entry_list( $value, $entry, $field_id, $columns, $form ) { - - return $this->get_value_entry_detail($value, '', false, 'html', 'screen' ); - } -} - -GF_Fields::register( new Wiaas_Dates_List_Field() ); \ No newline at end of file diff --git a/backend/app/plugins/wiaas/includes/delivery-process/class-wiaas-delivery-process-addon.php b/backend/app/plugins/wiaas/includes/delivery-process/class-wiaas-delivery-process-addon.php index 53f5579..c412498 100644 --- a/backend/app/plugins/wiaas/includes/delivery-process/class-wiaas-delivery-process-addon.php +++ b/backend/app/plugins/wiaas/includes/delivery-process/class-wiaas-delivery-process-addon.php @@ -27,16 +27,112 @@ class Wiaas_Delivery_Process_Addon extends Gravity_Flow_Extension { public function init() { parent::init(); + + add_filter('gravityflow_get_users_args', array ($this, 'allow_only_administrator_to_be_assigned_to_step')); + + add_filter('gravityflow_assignee_choices', array ($this, 'add_orders_assignee_choices')); + + add_filter('gravityflow_admin_actions_workflow_detail', array ($this, 'filter_process_send_to_step_options'), 10, 5); + + add_filter('gravityflow_step_assignees', array ($this, 'maybe_assign_organization_to_step'), 10, 2); } public function init_ajax() { parent::init_ajax(); - add_action( 'wp_ajax_wiaas_get_action_entry', array( $this, 'ajax_get_action_entry' ) ); // this AJAX action is here and not in /admin folder because of Gravity Forms extension logic add_action( 'wp_ajax_wiaas_delivery_get_form', array( $this, 'ajax_get_form' ) ); } + public function maybe_assign_organization_to_step($assignees, Gravity_Flow_Step $step) { + + $mapped_assignees = array(); + + foreach ($assignees as $assignee) { + + if (strpos($assignee->get_type(), 'wiaas_organization_order_') !== false) { + + $organization_id = $assignee->get_id(); + + $user_ids = wiaas_get_organization_user_ids($organization_id); + + if (empty($user_ids)) { + + continue; + } + + $user_id = $user_ids[0]; + + $mapped_assignees[] = $step->get_assignee( array( + 'id' => $user_id, + 'type' => 'user_id', + 'editable_fields' => $assignee->get_editable_fields() + ) ); + + continue; + } + + $mapped_assignees[] = $assignee; + } + + return $mapped_assignees; + } + + public function filter_process_send_to_step_options($admin_actions, $current_step, $steps, $form, $entry) { + + $delivery_process_actions = array(); + + if ( $current_step ) { + + $previous_step_id = null; + // get previous step id for current step + foreach ($steps as $index => $step) { + + $next_step = gravity_flow()->get_next_step($step, $entry, $form); + + if ($next_step && $next_step->get_id() === $current_step->get_id()) { + + $previous_step_id = $step->get_id(); + } + } + + if (! empty($previous_step_id)) { + + $delivery_process_actions[] = array( + 'label' => esc_html__( 'Previous step', 'wiaas' ), + 'value' => 'send_to_step|' . $previous_step_id + ); + } + + // get next step id for current step + $next_step = gravity_flow()->get_next_step($current_step, $entry, $form); + if ($next_step) { + + $delivery_process_actions[] = array( + 'label' => esc_html__( 'Next step', 'wiaas' ), + 'value' => 'send_to_step|' . $next_step->get_id() + ); + } + } + + return $delivery_process_actions; + } + + + public function allow_only_administrator_to_be_assigned_to_step($args) { + + $args['role'] = 'administrator'; + + //$args['exclude'] = array( 1 ); // exclude super admin user + + return $args; + } + + public static function add_orders_assignee_choices($choices) { + + return $choices; + } + public function ajax_get_form() { $form_id = isset( $_GET['form_id'] ) ? absint( $_GET['form_id'] ) : 0; @@ -65,14 +161,6 @@ class Wiaas_Delivery_Process_Addon extends Gravity_Flow_Extension { die(); } - - public function ajax_get_action_entry() { - - $form_id = isset( $_GET['form_id'] ) ? absint( $_GET['form_id'] ) : 0; - - $entry_id = absint( rgget( 'entry_id' ) ); - } - /** * Extends Gravity Form entry metadata with 'wiaas_delivery_process_id' * @@ -223,7 +311,7 @@ class Wiaas_Delivery_Process_Addon extends Gravity_Flow_Extension { array( 'value' => '', 'label' => 'Select action code ...' ), array( 'value' => 'customer-acceptance', 'label' => 'Customer acceptance' ), array( 'value' => 'validate-questionnaire', 'label' => 'Validate Questionnaire' ), - array( 'value' => 'schedule-meeting', 'label' => 'Schedule meeting' ) + array( 'value' => 'schedule-meeting', 'label' => 'Schedule meeting' ), ), 'after_select' => '

Choose action code for action form.

' )); diff --git a/backend/app/plugins/wiaas/includes/delivery-process/class-wiaas-delivery-process-step.php b/backend/app/plugins/wiaas/includes/delivery-process/class-wiaas-delivery-process-step.php index 5655d09..a1c3b80 100644 --- a/backend/app/plugins/wiaas/includes/delivery-process/class-wiaas-delivery-process-step.php +++ b/backend/app/plugins/wiaas/includes/delivery-process/class-wiaas-delivery-process-step.php @@ -7,24 +7,6 @@ class Wiaas_Delivery_Process_Step extends Gravity_Flow_Step { * @var string */ public $_step_type = 'wiaas_delivery_step'; - - private static $delivery_action_form_title_prefix = 'DELIVERY ACTION TYPE:'; - - private static $delivery_action_types = array( - 'DELIVERY ACTION TYPE: Customer acceptance' => 'customer-acceptance', - 'DELIVERY ACTION TYPE: Validate Questionnaire' => 'validate-questionnaire', - 'DELIVERY ACTION TYPE: Manual' => 'manual', - 'DELIVERY ACTION TYPE: Schedule meeting' => 'schedule-meeting' - ); - - public static function get_delivery_action_types() { - return array_keys(self::$delivery_action_types); - } - - public static function get_delivery_action_type_prefix() { - return self::$delivery_action_form_title_prefix; - } - /** * Returns label for Wiass Delivery Process Step * @return string @@ -44,7 +26,17 @@ class Wiaas_Delivery_Process_Step extends Gravity_Flow_Step { $forms = $this->get_action_forms_choices(); $form_choices[] = array( 'label' => esc_html__( 'Select a Form', 'wiaas' ), 'value' => '' ); foreach ( $forms as $form ) { - $form_choices[] = array( 'label' => $form['title'], 'value' => $form['id'] ); + + $delivery_settings = rgar($form, 'wiaas_delivery_process'); + + $code = $form['id']; + + if (! empty($delivery_settings['delivery_action_code'])) { + + $code = $delivery_settings['delivery_action_code']; + } + + $form_choices[] = array( 'label' => $form['title'], 'value' => $code ); } $settings = array( @@ -77,15 +69,47 @@ class Wiaas_Delivery_Process_Step extends Gravity_Flow_Step { return $settings; } + public function start() { + + $complete = parent::start(); + + if ($complete) { + + $this->update_step_status('complete'); + } else { + + $this->update_step_status('pending'); + } + + return $complete; + } + + public function evaluate_status() { + + return 'pending'; + } + + public function get_status_label($status) { + + $label = parent::get_status_label($status); + + if (empty($label)) { + + $label = __('Not started', 'wiaas'); + } + + return $label; + } + public function update_step_status($status = false) { - if (isset( $_POST['_gravityflow_admin_action'] ) ) { + if ($status === 'cancelled' && $admin_action = rgpost( 'gravityflow_admin_action' )) { - $admin_action = rgpost( 'gravityflow_admin_action' ); + list( $base_admin_action, $step_id ) = rgexplode( '|', $admin_action, 2 ); - list( $base_admin_action, $action_id ) = rgexplode( '|', $admin_action, 2 ); - - if ($base_admin_action === 'send_to_step' && $this->get_status() === 'pending') { + $next_step = gravity_flow()->get_next_step($this, $this->get_entry(), $this->get_form()); + // going to next step + if ($base_admin_action === 'send_to_step' && $next_step && $next_step->get_id() == $step_id) { $status = 'complete'; } @@ -157,18 +181,6 @@ class Wiaas_Delivery_Process_Step extends Gravity_Flow_Step { return false; } - /** - * Evaluates current step status based on target form entry status - * - * If target form entry has associated workflow current step will complete its status - * only when target form entry workflow is completed - * @return string - */ - public function status_evaluation() { - - // return 'pending'; - } - public function workflow_detail_box($form, $args) { parent::workflow_detail_box($form, $args); @@ -225,27 +237,6 @@ class Wiaas_Delivery_Process_Step extends Gravity_Flow_Step { return $action_forms; } - /** - * Retrieves delivery action type that is executed with this step - * @return string - */ - public function get_delivery_action_type() { - $target_form = GFAPI::get_form( $this->target_form_id ); - return self::$delivery_action_types[$target_form['title']]; - } - - /** - * Retrieves target form entry created when step was started - * @return array|null - */ - public function get_target_form_entry() { - $entry = GFAPI::get_entry($this->get_target_form_entry_id()); - if(is_wp_error($entry)) { - return null; - } - return $entry; - } - /** * Retrieves target form entry id created when step was started diff --git a/backend/app/plugins/wiaas/includes/delivery-process/class-wiaas-field-order-bundle-document.php b/backend/app/plugins/wiaas/includes/delivery-process/class-wiaas-field-order-bundle-document.php index 08d191e..ffe5f3f 100644 --- a/backend/app/plugins/wiaas/includes/delivery-process/class-wiaas-field-order-bundle-document.php +++ b/backend/app/plugins/wiaas/includes/delivery-process/class-wiaas-field-order-bundle-document.php @@ -27,6 +27,10 @@ class Wiaas_Field_Order_Bundle_Document extends GF_Field_FileUpload { ); } + public function get_input_type() { + return 'fileupload'; + } + public function get_form_editor_field_title() { return esc_attr__( 'Bundle Document', 'wiaas' ); } diff --git a/backend/app/plugins/wiaas/includes/delivery-process/class-wiaas-field-order-supplier-select.php b/backend/app/plugins/wiaas/includes/delivery-process/class-wiaas-field-order-supplier-select.php index 1df783d..35ed4bd 100644 --- a/backend/app/plugins/wiaas/includes/delivery-process/class-wiaas-field-order-supplier-select.php +++ b/backend/app/plugins/wiaas/includes/delivery-process/class-wiaas-field-order-supplier-select.php @@ -8,6 +8,11 @@ class Wiaas_Field_Order_Supplier_Select extends GF_Field_Select { public $type = 'wiaas_order_supplier'; + public function get_input_type() { + // set this input type so delivery workflow step can be assigned to supplier in this field + return 'workflow_assignee_select'; + } + public function get_form_editor_field_title() { return esc_attr__( 'Supplier Select', 'wiaas' ); } @@ -41,9 +46,9 @@ class Wiaas_Field_Order_Supplier_Select extends GF_Field_Select { private function _get_selected_supplier_display_name($value) { - list ($order_id, $supplier_id) = explode('|', $value); + list ($order_key, $supplier_id) = explode('|', $value); - if (! empty($order_id) && ! empty($supplier_id) && $order = wc_get_order($order_id)) { + if (! empty($supplier_id)) { return wiaas_get_organization_name($supplier_id); } @@ -65,7 +70,7 @@ class Wiaas_Field_Order_Supplier_Select extends GF_Field_Select { foreach ($suppliers as $supplier_id => $supplier_name) { $choices[] = array( - 'value' => $order_id . '|' . $supplier_id, + 'value' => 'wiaas_organization_order_' . $order_id . '|' . $supplier_id, 'text' => $supplier_name ); } diff --git a/backend/app/plugins/wiaas/includes/delivery-process/class-wiaas-order-fields.php b/backend/app/plugins/wiaas/includes/delivery-process/class-wiaas-order-fields.php index 170e576..f104f11 100644 --- a/backend/app/plugins/wiaas/includes/delivery-process/class-wiaas-order-fields.php +++ b/backend/app/plugins/wiaas/includes/delivery-process/class-wiaas-order-fields.php @@ -71,8 +71,6 @@ class Wiaas_Order_Fields { return false; } - error_log(json_encode('here')); - $order = wc_get_order($order_id); $bundle_item = $order->get_item($bundle_item_id); @@ -129,6 +127,15 @@ class Wiaas_Order_Fields { break; + case 'wiaas_order_supplier': + $suppliers = wiaas_get_order_suppliers($order); + + $supplier_ids = array_keys($suppliers); + + $supplier_id = $supplier_ids[0]; + + $entry[(string) $field->id] = 'wiaas_organization_order_' . $order_id . '|' . $supplier_id; + } } diff --git a/backend/app/plugins/wiaas/includes/document/class-wiaas-document-upload.php b/backend/app/plugins/wiaas/includes/document/class-wiaas-document-upload.php index 87211ab..37c01ee 100644 --- a/backend/app/plugins/wiaas/includes/document/class-wiaas-document-upload.php +++ b/backend/app/plugins/wiaas/includes/document/class-wiaas-document-upload.php @@ -7,7 +7,7 @@ class Wiaas_Document_Upload { ); public static function init() { - add_filter( 'upload_dir', array( __CLASS__, 'upload_dir' ) ); + //add_filter( 'upload_dir', array( __CLASS__, 'upload_dir' ) ); } diff --git a/backend/app/plugins/wiaas/includes/order/wiaas-order-functions.php b/backend/app/plugins/wiaas/includes/order/wiaas-order-functions.php index 4132ee4..a25c61d 100644 --- a/backend/app/plugins/wiaas/includes/order/wiaas-order-functions.php +++ b/backend/app/plugins/wiaas/includes/order/wiaas-order-functions.php @@ -16,11 +16,7 @@ function wiaas_get_order_suppliers($order) { $items = $order->get_items(); - $suppliers = get_terms(array( - 'taxonomy' => 'supplier', - 'fields' => 'id=>name', - 'hide_empty' => false - )); + $suppliers = wiaas_get_suppliers(); return $suppliers; } diff --git a/backend/app/plugins/wiaas/includes/user/wiaas-organization-functions.php b/backend/app/plugins/wiaas/includes/user/wiaas-organization-functions.php index b011408..4b9eeda 100644 --- a/backend/app/plugins/wiaas/includes/user/wiaas-organization-functions.php +++ b/backend/app/plugins/wiaas/includes/user/wiaas-organization-functions.php @@ -103,4 +103,11 @@ function wiaas_get_user_organization_id($user_id) { */ function wiaas_get_current_user_organization_id() { return wiaas_get_user_organization_id(get_current_user_id()); +} + +function wiaas_get_organization_user_ids($organization_id) { + + $user_ids = get_objects_in_term($organization_id, Wiaas_User_Organization::TAXONOMY_NAME); + + return is_wp_error($user_ids) ? array() : $user_ids; } \ No newline at end of file