"use strict";
appCore.controller("RequisitionListCtrl", ["$state", "$scope", "$http", "$timeout", "vServices", function ($state, $scope, $http, $timeout, vServices) {
    $scope.params = $state.params;
    $scope.$root.page.title = "Template";
    $scope.params = $state.params;
    // $scope.$root.page.title = "Manage " + $state.params.type;

    $scope.page = {
            allow: false,
            name: "Requisition",
            type: "List ",
            icon: "fa-users", 
            color: "purple"
        };

    $scope.requisitionList = [];

    const init = function () {
            /* Get requisition list*/
            vServices.callApi("requi/all", "GET", {}).then(res => {
                if (res) {
                    $scope.requisitionList = res;
                    $scope.$root.callDataTable(".requisitionList", 1000);

                    // console.log($scope.requisitionList);
                }
            });
    };
    init();

}
]);



