<?php
defined('_WPBOOKINGPRO_EXEC') or die;
if(!class_exists("WpBookingPro_Order_packageController")) {
    /**
     * Class WpBookingPro_Order_packageController
     */
    class WpBookingPro_Order_packageController extends woobooking_controller
    {
        /**
         * @var string
         */
        public $view = "order_package";
        /**
         * @var string
         */
        public $table_name = "order";

        /**
         * @return mixed
         * @throws Exception
         */
        public function get_employee_by_id()
        {
            return self::view("order_package.list");
        }

        /**
         * @return mixed
         * @throws Exception
         */
        public function ajax_edit_order_detail()
        {
            return self::view("order_package.order_detail");
        }

        /**
         * @return mixed
         * @throws Exception
         */
        public function ajax_change_order_status()
        {
            $input = Factory::getInput();
            $order_id = $input->getInt('order_id', 0);
            $order_status_id = $input->getInt('order_status_id', 0);
            $modelOrder = WoobookingModel::getInstance('order');
            $order = $modelOrder->change_order_status($order_id, $order_status_id);
            return $order;
        }
    }
}
?>