Commit 6f23fe82 authored by Evren Kutar's avatar Evren Kutar

clear_wf fix for list and show ctrl

parent ea6a647a
...@@ -26,11 +26,7 @@ staff.controller('StaffAddEditCtrl', function ($scope, $rootScope, $http, $log, ...@@ -26,11 +26,7 @@ staff.controller('StaffAddEditCtrl', function ($scope, $rootScope, $http, $log,
else { else {
form_params['cmd'] = 'add_object'; form_params['cmd'] = 'add_object';
} }
if ($rootScope.staffwfclear){ form_params['clear_wf'] = 1;
form_params['clear_wf'] = 1;
} else{
$rootScope.staffwfclear = 1
}
Generator.get_form($scope.url, form_params).then(function (object) { Generator.get_form($scope.url, form_params).then(function (object) {
var d = object.data.forms; var d = object.data.forms;
...@@ -61,12 +57,7 @@ staff.controller('StaffAddEditCtrl', function ($scope, $rootScope, $http, $log, ...@@ -61,12 +57,7 @@ staff.controller('StaffAddEditCtrl', function ($scope, $rootScope, $http, $log,
*/ */
staff.controller('StaffListCtrl', function ($scope, $rootScope, Generator) { staff.controller('StaffListCtrl', function ($scope, $rootScope, Generator) {
var form_params = {}; var form_params = {"clear_wf": 1};
if ($rootScope.staffwfclear){
form_params['clear_wf'] = 1;
} else{
$rootScope.staffwfclear = 1
}
Generator.get_form('personel_duzenle_basitlestirilmis', form_params) Generator.get_form('personel_duzenle_basitlestirilmis', form_params)
.then(function (res) { .then(function (res) {
console.log(res); console.log(res);
...@@ -78,12 +69,7 @@ staff.controller('StaffListCtrl', function ($scope, $rootScope, Generator) { ...@@ -78,12 +69,7 @@ staff.controller('StaffListCtrl', function ($scope, $rootScope, Generator) {
* Staff Show Controller * Staff Show Controller
*/ */
staff.controller('StaffShowCtrl', function ($scope, $rootScope, Generator, $routeParams) { staff.controller('StaffShowCtrl', function ($scope, $rootScope, Generator, $routeParams) {
var form_params = {"object_id": $routeParams.id}; var form_params = {"object_id": $routeParams.id, "clear_wf": 1};
if ($rootScope.staffwfclear){
form_params['clear_wf'] = 1;
} else{
$rootScope.staffwfclear = 1
}
Generator.get_form('personel_duzenle_basitlestirilmis', form_params).then(function (res) { Generator.get_form('personel_duzenle_basitlestirilmis', form_params).then(function (res) {
debugger; debugger;
// todo: get this line below more clear way // todo: get this line below more clear way
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment