<commit_before>﻿/// <reference path="../Venders/angular.js" />
(function () {
    'use strict';
    angular.module('DakHanMaRi')
           .controller('EmployeeController', EmployeeController)
    EmployeeController.$inject = ["$scope", "$http", "ngDialog"];
           function EmployeeController($scope, $http, ngDialog) {
               $http({
                   method: 'GET',
                   url: '/Employee/GetEmployeesByDelflag',
               }).then(function (response) {
                   $scope.employees = response.data;
               });
               $scope.openDialog = function () {
                   ngDialog.openConfirm({
                       template:
                           "<form align='center'> " +
                            "<table class='table'>" +
                                "<h2>Add Employee</h2>" +
                                "<tr>" +
                                    "<td><label for='name'> Name: </label>" + "</td>" +
                                    "<td><input type='text' placeholder='Name'/> </td>" +
                                "</tr>" +
                                "<tr>" +
                                    "<td><label for='name'> Phone: </label></td>" +
                                    "<td><input type='text' placeholder='Phone'/></td>" +
                                "</tr>" +
                                "<tr>" +
                                    "<td><label for='name'> BirthDay: </label></td>" +
                                    "<td><input type='text' placeholder='BirthDay'/></td>" +
                                "</tr>" +
                                "<tr>" +
                                    "<td><label for='name'> JoinTime: </label></td>" +
                                    "<td><input type='text' placeholder='JoinTime'/></td>" +
                                "</tr>" +
                                "<tr>" +
                                    "<td><label for='name'> SalaryPerHour: </label></td>" +
                                    "<td><input type='text' placeholder='SalaryPerHour'/></td>" +
                                "</tr>" +
                                "<tr>" +
                                 "<td colspan='2'><input type='submit' value='Add' class='btn btn-primary'/> " +
                                    "<input type='reset' value='reset' class='btn btn-info'/> </td>" +
                                "</tr>"+
                            "</table>" +
                           "</form>",
                       plain: true,
                       scope: $scope
                   }).then(function (value) {
                       console.log(value);
                   }, function (reject) {
                       console.log(reject);
                   });
               };
           };
})();
<commit_msg>Completed Employee Form validation<commit_after>﻿/// <reference path="../Venders/angular.js" />
(function () {
    'use strict';
    angular.module('DakHanMaRi')
           .controller('EmployeeController', EmployeeController)
    EmployeeController.$inject = ["$scope", "$http", "ngDialog"];
           function EmployeeController($scope, $http, ngDialog) {
               $http({
                   method: 'GET',
                   url: '/Employee/GetEmployeesByDelflag',
               }).then(function (response) {
                   $scope.employees = response.data;
               });
               $scope.openDialog = function () {
                   ngDialog.openConfirm({
                       template:
                           "<form align='center' novalidate name='employeeForm' ng-submit='addEmployee(employee)'>" +
                            "<table class='table'>" +
                                "<h2>Add Employee</h2>" +
                                "<tr>" +
                                    "<td><label for='name'> Name: </label>" + "</td>" +
                                    "<td><input type='text' name='name' placeholder='Name' ng-model='employee.Name' required/> </td>" +
                                    "<td style='color:red;' ng-show='employeeForm.name.$error.required && employeeForm.name.$touched'>required</td>" +
                                "</tr>" +
                                "<tr>" +
                                    "<td><label for='name'> Phone: </label></td>" +
                                    "<td><input type='text' name='phone' placeholder='Phone' ng-model='employee.Phone' required/></td>" +
                                    "<td style='color:red;' ng-show='employeeForm.phone.$error.required && employeeForm.phone.$touched'>required</td>" +
                                "</tr>" +
                                "<tr>" +
                                    "<td><label for='name'> BirthDay: </label></td>" +
                                    "<td><input type='text' placeholder='BirthDay' ng-model='employee.BirthDay'/></td>" +
                                "</tr>" +
                                "<tr>" +
                                    "<td><label for='name'> JoinTime: </label></td>" +
                                    "<td><input type='text' placeholder='JoinTime' ng-model='employee.JoinTime'/></td>" +
                                "</tr>" +
                                "<tr>" +
                                    "<td><label for='name'> SalaryPerHour: </label></td>" +
                                    "<td><input type='text' placeholder='SalaryPerHour' ng-model='employee.SalaryPerHour'/></td>" +
                                "</tr>" +
                                "<tr>" +
                                 "<td colspan='2'><button type='submit' class='btn btn-primary' ng-disabled='employeeForm.$invalid'> Add </button> " +
                                    "<input type='reset' value='reset' class='btn btn-info'/> </td>" +
                                "</tr>" +
                            "</table>" +
                           "</form>",
                       plain: true,
                       scope: $scope
                   });

                   $scope.addEmployee = function (employee) {
                       console.log(employee);
                   };
               };
           };
})();

{'fraction_non_alphanumeric': 0.15639885677993012, 'fraction_numerical': 0.000952683391552874, 'mean_word_length': 0.9833123425692695, 'pattern_counts': {'":': 0, '<': 124, '<?xml version=': 0, '>': 124, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 28, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3863398', 'n_tokens_mistral': 1506, 'n_tokens_neox': 1430, 'n_words': 241}