PageSourceSearch

https://eccbeefclub.com/js/App/Abp/controllers/parent/problematique/BesoinPrimaireParentController.js

js eccbeefclub.com collected 2026-10-08 20:29:47 UTC 4,191 bytes, 118 lines download raw bytes

1'use strict';
2
3angular.module('myApp.AppControllers')
4
5/**
6 *
7 */
8.controller('BesoinPrimaireParentController',['$rootScope', '$scope', '$filter', '$log', 'usSpinnerService', 'growl', 'PartenaireService', 'ProblematiqueParentsService',
9    function ($rootScope, $scope, $filter, $log, usSpinnerService, growl, PartenaireService, ProblematiqueParentsService)
10
11    {
12        $scope.partenaires = PartenaireService.list;
13
14        $scope.etats = ProblematiqueParentsService.etats_general;
15
16        // Pb Besoin Primaire
17        $scope.pb_besoin_primaire = {
18            Date : new Date(),
19            Type:'',
20            Proposition:'',
21            Niveau:'',
22            Commentaire:'',
23            partenaires:[]
24        };
25
26        $scope.save_besoin_primaire = function()
27        {
28            $log.log('save_besoin_primaire');
29            ProblematiqueParentsService.save_problematique('besoin_primaire', $scope.parent.Id, $scope.pb_besoin_primaire)
30                .then( function(answer)
31                {
32                    // $log.log(answer.data);
33                    growl.success("PROBLEMATIQUE CRÉE");
34                    
35                    // Reset form
36                    $scope.reset_pb_besoin_primaire();
37                    $scope.NewPbBesoinPrimaire.$setPristine(true);
38                })
39                .catch(function(answer)
40                {
41                    growl.error("PROBLEMATIQUE NON CRÉE : " + answer.data);
42                });
43        };
44
45        $scope.delete_besoin_primaire = function(id)
46        {
47            $log.log('delete_besoin_primaire', id);
48            if(confirm('Êtes vous sûr de vouloir supprimer cette problématique ?'))
49            {
50                ProblematiqueParentsService.delete_problematique('besoin_primaire', $scope.parent.Id, id)
51                    .then( function(answer)
52                    {
53                        // $log.log(answer.data);
54                        growl.success("PROBLEMATIQUE SUPPRIMÉE");
55                        
56                        // Reset form
57                        $scope.reset_pb_besoin_primaire();
58                        $scope.NewPbBesoinPrimaire.$setPristine(true);
59                    })
60                    .catch(function(answer)
61                    {
62                        growl.error("PROBLEMATIQUE NON SUPPRIMÉE : " + answer.data);
63                    });
64            }
65        };
66
67        $scope.reset_pb_besoin_primaire = function()
68        {
69            $scope.pb_besoin_primaire = {
70                Date : new Date(),
71                Type:'',
72                Proposition:'',
73                Niveau:'',
74                Commentaire:'',
75                partenaires:[]
76            };
77
78            $scope.vm_pb_bp = {};
79            
80            $scope.vm_pb_bp.leftValue = angular.copy($scope.partenaires);
81            $scope.vm_pb_bp.rightValue = $scope.pb_besoin_primaire.partenaires;
82            
83            $scope.vm_pb_bp.addValue = [];
84            $scope.vm_pb_bp.removeValue = [];
85        };
86
87        // Pb Besoin Primaire Dual Box
88        $scope.vm_pb_bp = {};
89        
90        $scope.vm_pb_bp.leftValue = angular.copy($scope.partenaires);
91        $scope.vm_pb_bp.rightValue = $scope.pb_besoin_primaire.partenaires;
92        
93        $scope.vm_pb_bp.addValue = [];
94        $scope.vm_pb_bp.removeValue = [];
95
96        $scope.vm_pb_bp.options = {
97            leftContainerScrollEnd: function () {},
98            rightContainerScrollEnd: function () {},
99            leftContainerSearch: function (text) {
100                $scope.vm_pb_bp.leftValue = $filter('filter')(leftValue, {
101                    'Partenairenom': text
102                })
103            },
104            rightContainerSearch: function (text) {
105                $scope.vm_pb_bp.rightValue = $filter('filter')(rightV
105alue, {
106                    'Partenairenom': text
107                })
108            },
109            leftContainerLabel: '',
110            rightContainerLabel: '',
111            onMoveRight: function () {},
112            onMoveLeft: function () {}
113        };
114        
115        var leftValue = angular.copy($scope.vm_pb_bp.leftValue);
116        var rightValue = angular.copy($scope.vm_pb_bp.rightValue);
117	}
118])

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.