Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function activateTab(e, a) {
- "use strict";
- for (var t = 0; t < e.length; t++) e[t] = !1;
- return e[a] = !0, e
- }
- var calcu_slope = function(x, y, avg_x, avg_y) {
- var a = 0,
- b = 0;
- for (var i = 0; i < x.length; i++) {
- a += (x[i] - avg_x) * (x[i] - avg_x);
- b += (x[i] - avg_x) * (y[i] - avg_y);
- }
- return b / a;
- };
- var calcu_steyx = function(x, y, avg_x, avg_y) {
- var a = 0,
- b = 0,
- c = 0;
- for (var i = 0; i < x.length; i++) {
- a += (x[i] - avg_x) * (x[i] - avg_x);
- b += (y[i] - avg_y) * (y[i] - avg_y);
- c += (x[i] - avg_x) * (y[i] - avg_y);
- }
- return Math.sqrt((b - c * c / a) / (x.length - 2));
- };
- var calcu_rsq = function(x, y, avg_x, avg_y) {
- var a = 0,
- b = 0,
- c = 0;
- for (var i = 0; i < x.length; i++) {
- a += (x[i] - avg_x) * (x[i] - avg_x);
- b += (y[i] - avg_y) * (y[i] - avg_y);
- c += (x[i] - avg_x) * (y[i] - avg_y);
- }
- return c / Math.sqrt(a * b);
- };
- var add_calcu_record = function() {
- var x = [],
- y = [],
- input_x, input_y;
- for (var i = 0;; i++) {
- input_x = document.getElementById("input_x_" + i);
- input_y = document.getElementById("input_y_" + i);
- if (input_x == null || input_y == null || input_x == undefined || input_y == undefined || input_x.value == "" || input_y.value == "")
- break;
- x.push(parseInt(input_x.value));
- y.push(parseInt(input_y.value));
- }
- var new_id = x.length;
- var new_row = "<tr>\n" +
- "<td>" + (new_id + 1) + "</td>\n" +
- "<td><input type=\"number\" id=\"input_x_" + new_id + "\" value=\"1\" onchange=\"calcu_regression()\"></td>\n" +
- "<td><input type=\"number\" id=\"input_y_" + new_id + "\" value=\"1\" onchange=\"calcu_regression()\"></td>\n" +
- "</tr>";
- var org_html = document.getElementById("regression_inputs").innerHTML;
- document.getElementById("regression_inputs").innerHTML = org_html + new_row;
- calcu_regression();
- };
- var del_calcu_record = function() {
- var x = [],
- y = [],
- input_x, input_y;
- for (var i = 0;; i++) {
- input_x = document.getElementById("input_x_" + i);
- input_y = document.getElementById("input_y_" + i);
- if (input_x == null || input_y == null || input_x == undefined || input_y == undefined || input_x.value == "" || input_y.value == "")
- break;
- x.push(parseInt(input_x.value));
- y.push(parseInt(input_y.value));
- }
- var new_id = x.length;
- var new_row = "";
- for (var i = 0; i < x.length - 1; i++) {
- new_row += "<tr>\n" +
- "<td>5</td>\n" +
- "<td><input type=\"number\" id=\"input_x_" + i + "\" value=\"" + x[i] + "\" onchange=\"calcu_regression()\"></td>\n" +
- "<td><input type=\"number\" id=\"input_y_" + i + "\" value=\"" + y[i] + "\" onchange=\"calcu_regression()\"></td>\n" +
- "</tr>";
- }
- document.getElementById("regression_inputs").innerHTML = new_row;
- calcu_regression();
- };
- var calcu_regression = function() {
- var x = [],
- y = [],
- sum_x = 0,
- sum_y = 0,
- input_x, input_y;
- for (var i = 0;; i++) {
- input_x = document.getElementById("input_x_" + i);
- input_y = document.getElementById("input_y_" + i);
- if (input_x == null || input_y == null || input_x == undefined || input_y == undefined || input_x.value == "" || input_y.value == "")
- break;
- x.push(parseInt(input_x.value));
- y.push(parseInt(input_y.value));
- sum_x += parseInt(input_x.value);
- sum_y += parseInt(input_y.value);
- }
- if (x.length < 3) return;
- var avg_x = sum_x / x.length;
- var avg_y = sum_y / y.length;
- var c = [],
- d = [],
- sum_c = 0;
- var hh_coeff = calcu_slope(x, y, avg_x, avg_y);
- var intercept_coeff = avg_y - hh_coeff * avg_x;
- var std_error = calcu_steyx(x, y, avg_x, avg_y);
- var multiple_r = calcu_rsq(x, y, avg_x, avg_y);
- var r_square = multiple_r * multiple_r;
- for (var i = 0; i < x.length; i++) {
- c.push((x[i] - avg_x) * (x[i] - avg_x));
- d.push(intercept_coeff + hh_coeff * x[i]);
- sum_c += (x[i] - avg_x) * (x[i] - avg_x);
- }
- var intercept_stderr = Math.sqrt(avg_x * avg_x / sum_c + 1 / x.length) * std_error;
- var hh_stderr = Math.sqrt(std_error * std_error / sum_c);
- var intercept_tstat = intercept_coeff / intercept_stderr;
- var hh_tstat = hh_coeff / hh_stderr;
- var regression_df = 1;
- var residual_df = x.length - 2;
- var total_df = x.length - 1;
- var regression_ss = 0;
- var residual_ss = 0;
- var total_ss = 0;
- for (var i = 0; i < d.length; i++) {
- regression_ss += (d[i] - avg_y) * (d[i] - avg_y);
- residual_ss += (y[i] - d[i]) * (y[i] - d[i]);
- total_ss += (y[i] - avg_y) * (y[i] - avg_y);
- }
- var regression_ms = regression_ss / regression_df;
- var residual_ms = residual_ss / residual_df;
- var regression_f = regression_ms / residual_ms;
- var ad_r_square = 1 - residual_ms / (total_ss / total_df);
- var intercept_lower = intercept_coeff - 3.18244631 * intercept_stderr;
- var intercept_upper = intercept_coeff + 3.18244631 * intercept_stderr;
- var hh_lower = hh_coeff - 3.18244631 * hh_stderr;
- var hh_upper = hh_coeff + 3.18244631 * hh_stderr;
- document.getElementById("r_square").innerHTML = r_square;
- document.getElementById("multiple_r").innerHTML = multiple_r;
- document.getElementById("ad_r_square").innerHTML = ad_r_square;
- document.getElementById("observations").innerHTML = x.length;
- document.getElementById("hh_coeff").innerHTML = hh_coeff;
- document.getElementById("intercept_coeff").innerHTML = intercept_coeff;
- document.getElementById("std_error").innerHTML = std_error;
- document.getElementById("intercept_stderr").innerHTML = intercept_stderr;
- document.getElementById("hh_stderr").innerHTML = hh_stderr;
- document.getElementById("intercept_tstat").innerHTML = intercept_tstat;
- document.getElementById("hh_tstat").innerHTML = hh_tstat;
- document.getElementById("regression_df").innerHTML = regression_df;
- document.getElementById("residual_df").innerHTML = residual_df;
- document.getElementById("total_df").innerHTML = total_df;
- document.getElementById("regression_ss").innerHTML = regression_ss;
- document.getElementById("residual_ss").innerHTML = residual_ss;
- document.getElementById("total_ss").innerHTML = total_ss;
- document.getElementById("regression_ms").innerHTML = regression_ms;
- document.getElementById("residual_ms").innerHTML = residual_ms;
- document.getElementById("regression_f").innerHTML = regression_f;
- document.getElementById("intercept_lower").innerHTML = intercept_lower;
- document.getElementById("intercept_upper").innerHTML = intercept_upper;
- document.getElementById("hh_lower").innerHTML = hh_lower;
- document.getElementById("hh_upper").innerHTML = hh_upper;
- };
- function loadCharter(e) {
- "use strict";
- var a = {};
- return e && (a = e.currentProject), {
- Id: a.Id,
- Name: a.Name,
- DateTimeCreated: new Date(a.DateTimeCreated),
- BusinessUnit: a.BusinessUnit,
- Sponsor: [],
- Location: a.Location,
- Lead: [],
- Type: a.Type,
- BusinessImpact: a.BusinessImpact,
- BusinessImpactValue: a.BusinessImpactValue,
- ProblemStatement: a.ProblemStatement,
- Goals: a.Goals,
- Scope: a.Scope,
- stakeholders: [],
- CoreTeam: [],
- gateReviewDefine: {
- status: {
- opened: !1
- },
- val: a.DefineReviewDate ? new Date(a.DefineReviewDate) : ""
- },
- gateReviewMeasure: {
- status: {
- opened: !1
- },
- val: a.MeasureReviewDate ? new Date(a.MeasureReviewDate) : ""
- },
- gateReviewImprove: {
- status: {
- opened: !1
- },
- val: a.ImproveReviewDate ? new Date(a.ImproveReviewDate) : ""
- },
- gateReviewControl: {
- status: {
- opened: !1
- },
- val: a.ControlReviewDate ? new Date(a.ControlReviewDate) : ""
- },
- gateReviewAnalyze: {
- status: {
- opened: !1
- },
- val: a.AnalyzeReviewDate ? new Date(a.AnalyzeReviewDate) : ""
- }
- }
- }
- function populateMdContactVariable(e, a) {
- "use strict";
- var t = [];
- e instanceof Array || (e = [e]);
- for (var o = 0; e && o < e.length; o++) e[o] = parseInt(e[o]);
- for (var o = 0; a && o < a.length; o++) - 1 !== e.indexOf(parseInt(a[o].id)) && t.push(a[o]);
- return t
- }
- function loadWalkthrough() {
- "use strict";
- var e = {},
- a = "",
- t = 0;
- return angular.forEach(document.querySelectorAll(".l6_step"), function(o, r) {
- a !== $(o).parent().attr("data-phase-component") && (a = $(o).parent().attr("data-phase-component"), t = 0), e[a] || (e[a] = {
- steps: [],
- currentStep: 0
- }), $(o).hasClass("l6_spacer") || (e[a].steps.push(o), $(o).attr("data-step", t), t > 0 && $(o).hide(), t++)
- }), e
- }
- function validateField(e, a) {
- "use strict";
- var t = $(e).closest(".l6_step").attr("data-step"),
- o = $(e).closest(".l6_step").attr("data-step-required"),
- r = !0;
- if (o) {
- o = o.split(",");
- for (var n = 0; o && n < o.length; n++)
- if (o[n].indexOf(".")) {
- for (var i = o[n].split("."), s = a, l = 0; i && l < i.length; l++) s = s[i[l]];
- s || (r = !1)
- } else a[o[n]] || (r = !1)
- }
- return {
- currentStep: parseInt(t),
- isVerified: r
- }
- }
- function moveNextStep(e) {
- "use strict";
- if (e.steps[e.currentStep + 1]) {
- e.currentStep += 1;
- var a = $(e.steps[e.currentStep]);
- a.parent();
- $(a).show(), setTimeout(function() {
- $("body").animate({
- scrollTop: a.offset().top - 260
- }, "slow")
- }, 100)
- }
- return console.log("MOVING NEXT STEP"), console.log(e), e
- }
- function resetWalkthrough(e) {
- "use strict";
- for (var a = 1; a < e.steps.length; a++) $(e.steps[a]).hide();
- return e.currentStep = 0, e
- }
- function completePhaseComponent(e, a, t, o, r) {
- "use strict";
- var n = o.getPhaseComponentDetail(e, a),
- i = {};
- i.Status = "working" === n.Status ? "complete" : "working";
- var s = [o.buildFilter("Id", null, "is", n.Id)];
- o.sync(o.buildRequest("update", ["phasecomponents"], null, [s], [i]), function(e) {
- e.success ? o.updatePhaseComponentDetail(n.ProjectId, function(e) {
- r(e)
- }) : r(e)
- })
- }
- function saveCharter(e, a, t, o, r) {
- "use strict";
- var n = angular.copy(e),
- i = n.stakeholders;
- delete n.stakeholders, n.Sponsor = n.Sponsor[0] ? n.Sponsor[0].id : null, n.Lead = n.Lead[0] ? n.Lead[0].id : null;
- for (var s = [], l = 0; n.CoreTeam && l < n.CoreTeam.length; l++) s.push(n.CoreTeam[l].id);
- n.CoreTeam = JSON.stringify(s), n.DefineReviewDate = n.gateReviewDefine.val, n.MeasureReviewDate = n.gateReviewMeasure.val, n.AnalyzeReviewDate = n.gateReviewAnalyze.val, n.ImproveReviewDate = n.gateReviewImprove.val, n.ControlReviewDate = n.gateReviewControl.val, n.BusinessImpactValue = n.BusinessImpactValue || 0;
- n.Id;
- delete n.Id, delete n.PhaseData, delete n.DateTimeCreated, delete n.LastUpdated, delete n.CreatedBy, delete n.CompletionPercentage, delete n.gateReviewDefine, delete n.gateReviewMeasure, delete n.gateReviewAnalyze, delete n.gateReviewImprove, delete n.gateReviewControl;
- var c = null;
- "add" !== a && (c = [t.buildFilter("Id", null, "is", e.Id)]), t.sync(t.buildRequest(a, ["projects"], null, c, [n]), function(e) {
- e.success ? "add" == a ? t.loadProject(e.data.Id, function(a) {
- for (var n = [], s = [], l = [], c = t.getPhaseComponentDetail("Define", "Charter"), u = 0; i && u < i.length; u++) s.push("definestakeholders"), n.push(i[u].id), l.push({
- ProjectId: e.data.Id,
- PhaseId: c.PhaseId,
- PhaseComponentId: c.Id,
- UserId: i[u].id
- });
- t.sync(t.buildRequest("add", s, null, null, l), function(a) {
- o.logSuccess("Charter Successfully Saved!"), r && r(e.data)
- })
- }) : (o.logSuccess("Charter Successfully Saved!"), r && r(e.data)) : o.logError(e.data[0])
- })
- }! function() {
- "use strict";
- angular.module("app", ["app.core", "app.chart", "app.ui", "app.ui.form", "app.ui.form.validation", "app.ui.map", "app.page", "app.table", "app.project", "app.dashboard", "easypiechart", "ui.tree", "ngMap", "textAngular", "ngCookies"])
- }(),
- function() {
- "use strict";
- angular.module("app.chart", ["chart.js", "gantt", "gantt.table", "gantt.tooltips", "gantt.tree", "gantt.resizeSensor", "gantt.groups"])
- }(),
- function() {
- "use strict";
- angular.module("app.core", ["ngAnimate", "ngAria", "ngMessages", "ngWizard", "ngFileUpload", "app.layout", "app.i18n", "ngMaterial", "ui.router", "ui.bootstrap", "duScroll", "ui.mask"])
- }(),
- function() {
- "use strict";
- angular.module("app.dashboard", ["angular-scroll-animate"])
- }(),
- function() {
- "use strict";
- angular.module("app.ui.form", [])
- }(),
- function() {
- "use strict";
- angular.module("app.ui.form.validation", ["validation.match"])
- }(),
- function() {
- "use strict";
- angular.module("app.layout", [])
- }(),
- function() {
- "use strict";
- angular.module("app.ui.map", [])
- }(),
- function() {
- "use strict";
- angular.module("app.page", ["ngFileUpload"])
- }(),
- function() {
- "use strict";
- angular.module("app.project", [])
- }(),
- function() {
- "use strict";
- angular.module("app.table", [])
- }(),
- function() {
- "use strict";
- angular.module("app.ui", ["ngMaterial"])
- }(),
- function() {
- "use strict";
- function e(e) {
- e.easypiechartsm1 = {}, e.easypiechartsm2 = {}, e.easypiechartsm3 = {}, e.easypiechartsm4 = {}, e.easypiechart = {}, e.easypiechart2 = {}, e.easypiechart3 = {}, e.easypiechartsm1 = {
- percent: 36,
- options: {
- animate: {
- duration: 1500,
- enabled: !1
- },
- barColor: e.color.primary,
- lineCap: "round",
- size: 120,
- lineWidth: 5
- }
- }, e.easypiechartsm2 = {
- percent: 45,
- options: {
- animate: {
- duration: 1500,
- enabled: !1
- },
- barColor: e.color.warning,
- lineCap: "round",
- size: 120,
- lineWidth: 5
- }
- }, e.easypiechartsm3 = {
- percent: 75,
- options: {
- animate: {
- duration: 1500,
- enabled: !1
- },
- barColor: e.color.danger,
- lineCap: "round",
- size: 120,
- lineWidth: 5
- }
- }, e.easypiechartsm4 = {
- percent: 66,
- options: {
- animate: {
- duration: 1500,
- enabled: !1
- },
- barColor: e.color.primary,
- lineCap: "round",
- size: 120,
- lineWidth: 5
- }
- }, e.easypiechart = {
- percent: 65,
- options: {
- animate: {
- duration: 1e3,
- enabled: !0
- },
- barColor: e.color.primary,
- lineCap: "round",
- size: 180,
- lineWidth: 5
- }
- }, e.easypiechart2 = {
- percent: 35,
- options: {
- animate: {
- duration: 1e3,
- enabled: !0
- },
- barColor: e.color.success,
- lineCap: "round",
- size: 180,
- lineWidth: 10
- }
- }, e.easypiechart3 = {
- percent: 68,
- options: {
- animate: {
- duration: 1e3,
- enabled: !0
- },
- barColor: e.color.info,
- lineCap: "square",
- size: 180,
- lineWidth: 20,
- scaleLength: 0
- }
- }
- }
- function a(e) {
- e.demoData1 = {}, e.simpleChart1 = {}, e.simpleChart2 = {}, e.simpleChart3 = {}, e.tristateChart1 = {}, e.largeChart1 = {}, e.largeChart2 = {}, e.largeChart3 = {}, e.demoData1 = {
- data: [3, 1, 2, 2, 4, 6, 4, 5, 2, 4, 5, 3, 4, 6, 4, 7],
- options: {
- type: "line",
- lineColor: "#fff",
- highlightLineColor: "#fff",
- fillColor: e.color.success,
- spotColor: !1,
- minSpotColor: !1,
- maxSpotColor: !1,
- width: "100%",
- height: "150px"
- }
- }, e.simpleChart1 = {
- data: [3, 1, 2, 3, 5, 3, 4, 2],
- options: {
- type: "line",
- lineColor: e.color.primary,
- fillColor: "#fafafa",
- spotColor: !1,
- minSpotColor: !1,
- maxSpotColor: !1
- }
- }, e.simpleChart2 = {
- data: [3, 1, 2, 3, 5, 3, 4, 2],
- options: {
- type: "bar",
- barColor: e.color.primary
- }
- }, e.simpleChart3 = {
- data: [3, 1, 2, 3, 5, 3, 4, 2],
- options: {
- type: "pie",
- sliceColors: [e.color.primary, e.color.success, e.color.info, e.color.infoAlt, e.color.warning, e.color.danger]
- }
- }, e.tristateChart1 = {
- data: [1, 2, -3, -5, 3, 1, -4, 2],
- options: {
- type: "tristate",
- posBarColor: e.color.success,
- negBarColor: e.color.danger
- }
- }, e.largeChart1 = {
- data: [3, 1, 2, 3, 5, 3, 4, 2],
- options: {
- type: "line",
- lineColor: e.color.info,
- highlightLineColor: "#fff",
- fillColor: e.color.info,
- spotColor: !1,
- minSpotColor: !1,
- maxSpotColor: !1,
- width: "100%",
- height: "150px"
- }
- }, e.largeChart2 = {
- data: [3, 1, 2, 3, 5, 3, 4, 2],
- options: {
- type: "bar",
- barColor: e.color.success,
- barWidth: 10,
- width: "100%",
- height: "150px"
- }
- }, e.largeChart3 = {
- data: [3, 1, 2, 3, 5],
- options: {
- type: "pie",
- sliceColors: [e.color.primary, e.color.success, e.color.info, e.color.infoAlt, e.color.warning, e.color.danger],
- width: "150px",
- height: "150px"
- }
- }, e.infoChart1 = {
- data: [10, 11, 13, 12, 11, 10, 11, 12, 13, 14, 15, 13, 14, 12, 13, 15, 11, 13, 11, 15, 6],
- options: {
- type: "bar",
- barColor: e.color.primary,
- barWidth: 3,
- width: "100%",
- height: "26px"
- }
- }, e.infoChart2 = {
- data: [10, 11, 12, 13, 14, 15, 14, 13, 12, 11, 15, 14, 13, 14, 12, 13, 15, 13, 11, 11, 12, 6],
- options: {
- type: "bar",
- barColor: e.color.success,
- barWidth: 3,
- width: "100%",
- height: "26px"
- }
- }, e.infoChart3 = {
- data: [13, 14, 15, 14, 12, 10, 11, 12, 13, 14, 15, 13, 14, 12, 13, 15, 11, 13, 11, 15, 6],
- options: {
- type: "bar",
- barColor: e.color.danger,
- barWidth: 3,
- width: "100%",
- height: "26px"
- }
- }, e.infoChart4 = {
- data: [12, 11, 13, 12, 11, 10, 11, 12, 11, 12, 15, 13, 14, 12, 13, 15, 11, 13, 11, 15, 6],
- options: {
- type: "bar",
- barColor: e.color.warning,
- barWidth: 3,
- width: "100%",
- height: "26px"
- }
- }
- }
- angular.module("app.chart").controller("EasyPieChartCtrl", ["$scope", e]).controller("SparklineCtrl", ["$scope", a])
- }(),
- function() {
- "use strict";
- function e() {
- function e(e, a, t) {
- var o, r, n;
- o = e.data, r = e.options, n = $.plot(a[0], o, r)
- }
- var a = {
- restrict: "A",
- scope: {
- data: "=",
- options: "="
- },
- link: e
- };
- return a
- }
- function a() {
- function e(e, a, t) {
- var o, r, n, i, s, l, c, u, d;
- o = [], r = [], c = 200, d = 200, s = function(e, a, t) {
- function o() {
- var o, r, n, i;
- for (e.length > 0 && (e = e.slice(1)); e.length < c;) r = e.length > 0 ? e[e.length - 1] : (a + t) / 2, i = r + 4 * Math.random() - 2, a > i ? i = a : i > t && (i = t), e.push(i);
- for (n = [], o = 0; o < e.length;) n.push([o, e[o]]), ++o;
- return n
- }
- return o
- }, n = s(o, 28, 42), i = s(r, 56, 72), u = function() {
- l.setData([n(), i()]), l.draw(), setTimeout(u, d)
- }, l = $.plot(a[0], [n(), i()], {
- series: {
- lines: {
- show: !0,
- fill: !0
- },
- shadowSize: 0
- },
- yaxis: {
- min: 0,
- max: 100
- },
- xaxis: {
- show: !1
- },
- grid: {
- hoverable: !0,
- borderWidth: 1,
- borderColor: "#eeeeee"
- },
- colors: ["#3F51B5", "#C5CAE9"]
- }), u()
- }
- var a = {
- restrict: "A",
- link: e
- };
- return a
- }
- function t() {
- function e(e, a, t) {
- var o, r, n, i;
- o = e.data, r = e.options, n = void 0, i = function() {
- a.sparkline(o, r)
- }, $(window).resize(function(e) {
- clearTimeout(n), n = setTimeout(i, 200)
- }), i()
- }
- var a = {
- restrict: "A",
- scope: {
- data: "=",
- options: "="
- },
- link: e
- };
- return a
- }
- angular.module("app.chart").directive("flotChart", e).directive("flotChartRealtime", a).directive("sparkline", t)
- }(),
- function() {
- "use strict";
- function e(e, a) {
- e.bar = {}, e.line = {}, e.radar = {}, e.polarArea = {}, e.doughnut = {}, e.pie = {}, Chart.defaults.global.tooltipCornerRadius = 2, Chart.defaults.global.colours = [{
- fillColor: "rgba(63,81,181,0.3)",
- strokeColor: "rgba(63,81,181,1)",
- pointColor: "rgba(63,81,181,1)",
- pointStrokeColor: "#fff",
- pointHighlightFill: "#fff",
- pointHighlightStroke: "rgba(63,81,181,0.8)"
- }, {
- fillColor: "rgba(187,187,187,0.3)",
- strokeColor: "rgba(187,187,187,1)",
- pointColor: "rgba(187,187,187,1)",
- pointStrokeColor: "#fff",
- pointHighlightFill: "#fff",
- pointHighlightStroke: "rgba(187,187,187,0.8)"
- }, {
- fillColor: "rgba(76,175,80,0.3)",
- strokeColor: "rgba(76,175,80,1)",
- pointColor: "rgba(76,175,80,1)",
- pointStrokeColor: "#fff",
- pointHighlightFill: "#fff",
- pointHighlightStroke: "rgba(76,175,80,0.8)"
- }, {
- fillColor: "rgba(244,67,54,0.3)",
- strokeColor: "rgba(244,67,54,1)",
- pointColor: "rgba(244,67,54,1)",
- pointStrokeColor: "#fff",
- pointHighlightFill: "#fff",
- pointHighlightStroke: "rgba(244,67,54,0.8)"
- }, {
- fillColor: "rgba(255,193,7,0.3)",
- strokeColor: "rgba(255,193,7,1)",
- pointColor: "rgba(255,193,7,1)",
- pointStrokeColor: "#fff",
- pointHighlightFill: "#fff",
- pointHighlightStroke: "rgba(255,193,7,0.8)"
- }, {
- fillColor: "rgba(77,83,96,0.3)",
- strokeColor: "rgba(77,83,96,1)",
- pointColor: "rgba(77,83,96,1)",
- pointStrokeColor: "#fff",
- pointHighlightFill: "#fff",
- pointHighlightStroke: "rgba(77,83,96,1)"
- }], e.bar = {
- labels: ["2009", "2010", "2011", "2012", "2013", "2014"],
- series: ["A", "B"],
- data: [
- [59, 40, 61, 26, 55, 40],
- [38, 80, 19, 66, 27, 90]
- ],
- options: {
- barValueSpacing: 15
- }
- }, e.line = {
- labels: ["January", "February", "March", "April", "May", "June", "July"],
- series: ["A", "B"],
- data: [
- [28, 48, 40, 19, 86, 27, 90],
- [65, 55, 75, 55, 65, 50, 55]
- ],
- options: {}
- }, e.radar = {
- labels: ["Eating", "Drinking", "Sleeping", "Designing", "Coding", "Cycling", "Running"],
- data: [
- [65, 59, 90, 81, 56, 55, 40],
- [28, 48, 40, 19, 96, 27, 100]
- ]
- }, e.polarArea = {
- labels: ["Download Sales", "In-Store Sales", "Mail-Order Sales", "Tele Sales", "Corporate Sales"],
- data: [300, 500, 100, 40, 120]
- }, e.doughnut = {
- labels: ["Download Sales", "In-Store Sales", "Mail-Order Sales"],
- data: [300, 500, 100]
- }, e.pie = {
- labels: ["Download Sales", "In-Store Sales", "Mail-Order Sales"],
- data: [300, 500, 100]
- }
- }
- angular.module("app.chart").controller("ChartjsCtrl", ["$scope", "$rootScope", e])
- }(),
- function() {
- "use strict";
- function e(e) {
- var a, t, o, r, n, i, s, l;
- e.line1 = {}, e.line2 = {}, e.area = {}, e.barChartCleanH = {}, e.barChartCleanV = {}, e.combo1 = {}, e.combo2 = {}, e.barChartStacked = {}, e.barChartVertical = {}, e.barChartHorizontal = {}, e.pieChart = {}, e.donutChart = {}, e.donutChartHarmony = {}, e.donutNationality = {}, e.combo3 = {}, e.line3 = {}, e.tmp = {}, e.line3.data = [{
- label: "Too",
- data: [
- [0, 19],
- [1, 29],
- [2, 38],
- [3, 45],
- [4, 51],
- [5, 63],
- [6, 71],
- [7, 75],
- [8, 78],
- [9, 76],
- [10, 78]
- ],
- lines: {
- show: !0,
- fill: !0,
- lineWidth: 2,
- fillColor: {
- colors: ["rgba(255,255,255,.1)", "rgba(79,195,247,.8)"]
- }
- }
- }], e.line3.options = {
- grid: {
- borderWidth: 0,
- borderColor: "#f0f0f0",
- margin: 0,
- minBorderMargin: 0,
- labelMargin: 20,
- hoverable: !0,
- clickable: !0
- },
- tooltip: !0,
- tooltipOpts: {
- content: "%s X: %x Y: %y",
- shifts: {
- y: 25
- },
- defaultTheme: !1
- },
- legend: {
- labelBoxBorderColor: "#ccc",
- show: !1,
- noColumns: 0
- },
- series: {
- stack: !0,
- shadowSize: 0,
- highlightColor: "rgba(30,120,120,.5)"
- },
- xaxis: {
- tickLength: 0,
- tickDecimals: 0,
- show: !0,
- min: 2,
- font: {
- style: "normal",
- color: "#666666"
- }
- },
- yaxis: {
- ticks: 3,
- tickDecimals: 0,
- show: !0,
- tickColor: "#f0f0f0",
- font: {
- style: "normal",
- color: "#666666"
- }
- },
- points: {
- show: !0,
- radius: 2,
- symbol: "circle"
- },
- colors: [e.color.info]
- }, e.donutNationality.data = [{
- label: "United States",
- data: 40
- }, {
- label: "United Kingdom",
- data: 10
- }, {
- label: "Canada",
- data: 20
- }, {
- label: "Germany",
- data: 12
- }, {
- label: "Japan",
- data: 18
- }], e.donutNationality.options = {
- series: {
- pie: {
- show: !0,
- innerRadius: .75,
- stroke: {
- width: 0
- }
- }
- },
- colors: [e.color.success, e.color.primary, e.color.infoAlt, e.color.info, e.color.warning],
- grid: {
- hoverable: !0,
- clickable: !0,
- borderWidth: 0,
- color: "#ccc"
- },
- legend: {
- show: !0
- },
- tooltip: !0,
- tooltipOpts: {
- content: "%s: %p.0%",
- defaultTheme: !0
- }
- }, n = {}, n.data1 = [
- [1, 15],
- [2, 20],
- [3, 14],
- [4, 10],
- [5, 10],
- [6, 20]
- ], e.line1.data = [{
- data: n.data1,
- label: "Trend"
- }], e.line1.options = {
- series: {
- lines: {
- show: !0,
- fill: !0,
- fillColor: {
- colors: [{
- opacity: 0
- }, {
- opacity: .3
- }]
- }
- },
- points: {
- show: !0,
- lineWidth: 2,
- fill: !0,
- fillColor: "#ffffff",
- symbol: "circle",
- radius: 5
- }
- },
- colors: [e.color.primary, e.color.infoAlt],
- tooltip: !0,
- tooltipOpts: {
- defaultTheme: !1
- },
- grid: {
- hoverable: !0,
- clickable: !0,
- tickColor: "#f9f9f9",
- borderWidth: 1,
- borderColor: "#eeeeee"
- },
- xaxis: {
- ticks: [
- [1, "Jan."],
- [2, "Feb."],
- [3, "Mar."],
- [4, "Apr."],
- [5, "May"],
- [6, "June"],
- [7, "July"],
- [8, "Aug."],
- [9, "Sept."],
- [10, "Oct."],
- [11, "Nov."],
- [12, "Dec."]
- ]
- }
- }, i = {}, i.data1 = [
- [1, 20],
- [2, 14],
- [3, 16],
- [4, 22],
- [5, 28],
- [6, 38]
- ], i.data2 = [
- [1, 26],
- [2, 24],
- [3, 22],
- [4, 22],
- [5, 20],
- [6, 16]
- ], e.line2.data = [{
- data: i.data1,
- label: "Profit"
- }, {
- data: i.data2,
- label: "Cost",
- yaxis: 2
- }], e.line2.options = {
- series: {
- lines: {
- show: !0,
- fill: !1
- },
- points: {
- show: !0,
- lineWidth: 2,
- fill: !0,
- fillColor: "#fff",
- symbol: "circle",
- radius: 5
- },
- shadowSize: 0
- },
- grid: {
- hoverable: !0,
- clickable: !0,
- tickColor: "#f9f9f9",
- borderWidth: 1,
- borderColor: "#eeeeee"
- },
- colors: [e.color.primary, e.color.success],
- tooltip: !0,
- tooltipOpts: {
- defaultTheme: !1
- },
- xaxis: {
- ticks: [
- [1, "Jan."],
- [2, "Feb."],
- [3, "Mar."],
- [4, "Apr."],
- [5, "May"],
- [6, "June"],
- [7, "July"],
- [8, "Aug."],
- [9, "Sept."],
- [10, "Oct."],
- [11, "Nov."],
- [12, "Dec."]
- ]
- },
- yaxes: [{
- min: 0,
- max: 50
- }, {
- min: 0,
- max: 50,
- position: "right"
- }]
- }, a = {}, a.data1 = [
- [2017, 15],
- [2018, 20],
- [2019, 10],
- [2020, 5],
- [2021, 9]
- ], a.data2 = [
- [2017, 15],
- [2018, 16],
- [2019, 22],
- [2020, 14],
- [2021, 12]
- ], e.area.data = [{
- data: a.data1,
- label: "Value A",
- lines: {
- fill: !0
- }
- }, {
- data: a.data2,
- label: "Value B",
- points: {
- show: !0
- },
- yaxis: 2
- }], e.area.options = {
- series: {
- lines: {
- show: !0,
- fill: !1
- },
- points: {
- show: !0,
- lineWidth: 2,
- fill: !0,
- fillColor: "#ffffff",
- symbol: "circle",
- radius: 5
- },
- shadowSize: 0
- },
- grid: {
- hoverable: !0,
- clickable: !0,
- tickColor: "#f9f9f9",
- borderWidth: 1,
- borderColor: "#eeeeee"
- },
- colors: [e.color.success, e.color.danger],
- tooltip: !0,
- tooltipOpts: {
- defaultTheme: !1
- },
- xaxis: {
- mode: "time"
- },
- yaxes: [{}, {
- position: "right"
- }]
- }, o = {}, o.dataH1 = [
- [40, 1],
- [59, 2],
- [50, 3],
- [81, 4],
- [56, 5]
- ], o.dataH2 = [
- [28, 1],
- [48, 2],
- [90, 3],
- [19, 4],
- [45, 5]
- ], o.dataV1 = [
- [1, 28],
- [2, 48],
- [3, 90],
- [4, 19],
- [5, 45],
- [6, 58]
- ], o.dataV2 = [
- [1, 40],
- [2, 59],
- [3, 50],
- [4, 81],
- [5, 56],
- [6, 49]
- ], e.barChartCleanH.data = [{
- label: " A",
- data: o.dataH1,
- bars: {
- order: 0,
- fillColor: {
- colors: [{
- opacity: .3
- }, {
- opacity: .3
- }]
- }
- }
- }, {
- label: " B",
- data: o.dataH2,
- bars: {
- order: 1,
- fillColor: {
- colors: [{
- opacity: .3
- }, {
- opacity: .3
- }]
- }
- }
- }], e.barChartCleanH.options = {
- series: {
- stack: !0,
- bars: {
- show: !0,
- fill: 1,
- barWidth: .35,
- align: "center",
- horizontal: !0
- }
- },
- grid: {
- show: !0,
- aboveData: !1,
- color: "#eaeaea",
- hoverable: !0,
- borderWidth: 1,
- borderColor: "#eaeaea"
- },
- tooltip: !0,
- tooltipOpts: {
- defaultTheme: !1
- },
- colors: [e.color.gray, e.color.primary, e.color.info, e.color.danger]
- }, e.barChartCleanV.data = [{
- label: " A",
- data: o.dataV1,
- bars: {
- order: 0,
- fillColor: {
- colors: [{
- opacity: .3
- }, {
- opacity: .3
- }]
- }
- }
- }, {
- label: " B",
- data: o.dataV2,
- bars: {
- order: 1,
- fillColor: {
- colors: [{
- opacity: .3
- }, {
- opacity: .3
- }]
- }
- }
- }], e.barChartCleanV.options = {
- series: {
- stack: !0,
- bars: {
- show: !0,
- fill: 1,
- barWidth: .25,
- align: "center",
- horizontal: !1
- }
- },
- grid: {
- show: !0,
- aboveData: !1,
- color: "#eaeaea",
- hoverable: !0,
- borderWidth: 1,
- borderColor: "#eaeaea"
- },
- tooltip: !0,
- tooltipOpts: {
- defaultTheme: !1
- },
- colors: [e.color.gray, e.color.primary, e.color.info, e.color.danger]
- }, e.combo3.data = [{
- label: "WOM channels",
- bars: {
- show: !0,
- fill: !0,
- barWidth: .5,
- align: "center",
- order: 1,
- fillColor: {
- colors: [{
- opacity: 1
- }, {
- opacity: 1
- }]
- }
- },
- data: [
- [0, 75],
- [1, 62],
- [2, 45],
- [3, 60],
- [4, 73],
- [5, 50],
- [6, 31],
- [7, 56],
- [8, 70],
- [9, 63],
- [10, 49],
- [11, 72],
- [12, 76],
- [13, 67],
- [14, 46],
- [15, 51],
- [16, 69],
- [17, 59],
- [18, 85],
- [19, 67],
- [20, 56]
- ]
- }, {
- label: "Viral channels",
- curvedLines: {
- apply: !0
- },
- lines: {
- show: !0,
- fill: !0,
- fillColor: {
- colors: [{
- opacity: .7
- }, {
- opacity: 1
- }]
- }
- },
- data: [
- [2, 0],
- [3, 5],
- [4, 20],
- [5, 15],
- [6, 30],
- [7, 28],
- [8, 25],
- [9, 40],
- [10, 60],
- [11, 40],
- [12, 43],
- [13, 32],
- [14, 36],
- [15, 23],
- [16, 12],
- [17, 15],
- [18, 0]
- ]
- }, {
- label: "Paid channels",
- curvedLines: {
- apply: !0
- },
- lines: {
- show: !0,
- fill: !0,
- fillColor: {
- colors: [{
- opacity: .7
- }, {
- opacity: 1
- }]
- }
- },
- data: [
- [4, 1],
- [5, 6],
- [6, 15],
- [7, 8],
- [8, 16],
- [9, 9],
- [10, 25],
- [11, 12],
- [12, 50],
- [13, 20],
- [14, 25],
- [15, 12],
- [16, 0]
- ]
- }], e.combo3.options = {
- colors: [e.color.gray, e.color.success, e.color.info, e.color.info],
- series: {
- shadowSize: 1,
- curvedLines: {
- active: !0
- }
- },
- xaxis: {
- font: {
- color: "#607685"
- }
- },
- yaxis: {
- font: {
- color: "#607685"
- }
- },
- grid: {
- hoverable: !0,
- clickable: !0,
- borderWidth: 0,
- color: "#ccc"
- },
- tooltip: !0
- }, s = [
- [1, 70],
- [2, 55],
- [3, 68],
- [4, 81],
- [5, 56],
- [6, 55],
- [7, 68],
- [8, 45],
- [9, 35]
- ], l = [
- [1, 28],
- [2, 48],
- [3, 30],
- [4, 60],
- [5, 100],
- [6, 50],
- [7, 10],
- [8, 25],
- [9, 50]
- ], e.combo1.data = [{
- label: " A",
- data: s,
- bars: {
- order: 0,
- fillColor: {
- colors: [{
- opacity: .3
- }, {
- opacity: .3
- }]
- },
- show: !0,
- fill: 1,
- barWidth: .3,
- align: "center",
- horizontal: !1
- }
- }, {
- data: l,
- curvedLines: {
- apply: !0
- },
- lines: {
- show: !0,
- fill: !0,
- fillColor: {
- colors: [{
- opacity: .2
- }, {
- opacity: .2
- }]
- }
- }
- }, {
- data: l,
- label: "D",
- points: {
- show: !0
- }
- }], e.combo1.options = {
- series: {
- curvedLines: {
- active: !0
- },
- points: {
- lineWidth: 2,
- fill: !0,
- fillColor: "#ffffff",
- symbol: "circle",
- radius: 4
- }
- },
- grid: {
- hoverable: !0,
- clickable: !0,
- tickColor: "#f9f9f9",
- borderWidth: 1,
- borderColor: "#eeeeee"
- },
- tooltip: !0,
- tooltipOpts: {
- defaultTheme: !1
- },
- colors: [e.color.gray, e.color.primary, e.color.primary]
- }, e.combo2.data = [{
- data: s,
- curvedLines: {
- apply: !0
- },
- lines: {
- show: !0,
- fill: !0,
- fillColor: {
- colors: [{
- opacity: .2
- }, {
- opacity: .2
- }]
- }
- }
- }, {
- data: s,
- label: "C",
- points: {
- show: !0
- }
- }, {
- data: l,
- curvedLines: {
- apply: !0
- },
- lines: {
- show: !0,
- fill: !0,
- fillColor: {
- colors: [{
- opacity: .2
- }, {
- opacity: .2
- }]
- }
- }
- }, {
- data: l,
- label: "D",
- points: {
- show: !0
- }
- }], e.combo2.options = {
- series: {
- curvedLines: {
- active: !0
- },
- points: {
- lineWidth: 2,
- fill: !0,
- fillColor: "#ffffff",
- symbol: "circle",
- radius: 4
- }
- },
- grid: {
- hoverable: !0,
- clickable: !0,
- tickColor: "#f9f9f9",
- borderWidth: 1,
- borderColor: "#eeeeee"
- },
- tooltip: !0,
- tooltipOpts: {
- defaultTheme: !1
- },
- colors: [e.color.gray, e.color.gray, e.color.primary, e.color.primary]
- }, t = {}, t.data1 = [
- [2009, 10],
- [2010, 5],
- [2011, 5],
- [2012, 20],
- [2013, 28]
- ], t.data2 = [
- [2009, 22],
- [2010, 14],
- [2011, 12],
- [2012, 19],
- [2013, 22]
- ], t.data3 = [
- [2009, 30],
- [2010, 20],
- [2011, 19],
- [2012, 13],
- [2013, 20]
- ], e.barChartStacked.data = [{
- label: "Value A",
- data: t.data1
- }, {
- label: "Value B",
- data: t.data2
- }, {
- label: "Value C",
- data: t.data3
- }], e.barChartStacked.options = {
- series: {
- stack: !0,
- bars: {
- show: !0,
- fill: 1,
- barWidth: .3,
- align: "center",
- horizontal: !1,
- order: 1
- }
- },
- grid: {
- hoverable: !0,
- borderWidth: 1,
- borderColor: "#eeeeee"
- },
- tooltip: !0,
- tooltipOpts: {
- defaultTheme: !1
- },
- colors: [e.color.success, e.color.info, e.color.warning, e.color.danger]
- }, e.barChartVertical.data = [{
- label: "Value A",
- data: t.data1,
- bars: {
- order: 0
- }
- }, {
- label: "Value B",
- data: t.data2,
- bars: {
- order: 1
- }
- }, {
- label: "Value C",
- data: t.data3,
- bars: {
- order: 2
- }
- }], e.barChartVertical.options = {
- series: {
- stack: !0,
- bars: {
- show: !0,
- fill: 1,
- barWidth: .2,
- align: "center",
- horizontal: !1
- }
- },
- grid: {
- hoverable: !0,
- borderWidth: 1,
- borderColor: "#eeeeee"
- },
- yaxis: {
- max: 40
- },
- tooltip: !0,
- tooltipOpts: {
- defaultTheme: !1
- },
- colors: [e.color.success, e.color.info, e.color.warning, e.color.danger]
- }, r = {}, r.data1 = [
- [85, 10],
- [50, 20],
- [55, 30]
- ], r.data2 = [
- [77, 10],
- [60, 20],
- [70, 30]
- ], r.data3 = [
- [100, 10],
- [70, 20],
- [55, 30]
- ], e.barChartHorizontal.data = [{
- label: "Value A",
- data: r.data1,
- bars: {
- order: 1
- }
- }, {
- label: "Value B",
- data: r.data2,
- bars: {
- order: 2
- }
- }, {
- label: "Value C",
- data: r.data3,
- bars: {
- order: 3
- }
- }], e.barChartHorizontal.options = {
- series: {
- stack: !0,
- bars: {
- show: !0,
- fill: 1,
- barWidth: 1,
- align: "center",
- horizontal: !0
- }
- },
- grid: {
- hoverable: !0,
- borderWidth: 1,
- borderColor: "#eeeeee"
- },
- tooltip: !0,
- tooltipOpts: {
- defaultTheme: !1
- },
- colors: [e.color.success, e.color.info, e.color.warning, e.color.danger]
- }, e.pieChart.data = [{
- label: "New User",
- data: 22
- }, {
- label: "Returning User",
- data: 78
- }], e.pieChart.options = {
- series: {
- pie: {
- show: !0
- }
- },
- legend: {
- show: !0
- },
- grid: {
- hoverable: !0,
- clickable: !0
- },
- colors: [e.color.gray, e.color.info],
- tooltip: !0,
- tooltipOpts: {
- content: "%p.0%, %s",
- defaultTheme: !1
- }
- }, e.donutChart.data = [{
- label: "Download Sales",
- data: 12
- }, {
- label: "In-Store Sales",
- data: 30
- }, {
- label: "Mail-Order Sales",
- data: 20
- }, {
- label: "Online Sales",
- data: 19
- }], e.donutChart.options = {
- series: {
- pie: {
- show: !0,
- innerRadius: .5
- }
- },
- legend: {
- show: !0
- },
- grid: {
- hoverable: !0,
- clickable: !0
- },
- colors: [e.color.primary, e.color.success, e.color.info, e.color.warning, e.color.danger],
- tooltip: !0,
- tooltipOpts: {
- content: "%p.0%, %s",
- defaultTheme: !1
- }
- }, e.donutChartHarmony.data = [{
- label: "Direct Traffic",
- data: 12
- }, {
- label: "Referrals Traffic",
- data: 30
- }, {
- label: "Search Traffic",
- data: 20
- }, {
- label: "Social Traffic",
- data: 19
- }, {
- label: "Mail Traffic",
- data: 15
- }], e.donutChartHarmony.options = {
- series: {
- pie: {
- show: !0,
- innerRadius: .55
- }
- },
- legend: {
- show: !1
- },
- grid: {
- hoverable: !0,
- clickable: !0
- },
- colors: ["#1BB7A0", "#39B5B9", "#52A3BB", "#619CC4", "#6D90C5"],
- tooltip: !0,
- tooltipOpts: {
- content: "%p.0%, %s",
- defaultTheme: !1
- }
- }
- }
- angular.module("app.chart").controller("FlotChartCtrl", ["$scope", e])
- }(),
- function() {
- "use strict";
- function e(e, a, t, o, r) {
- e.projectId = t.pid, e.data = [], e.options = {
- mode: "custom",
- scale: "day",
- sideMode: "TreeTable",
- daily: !1,
- width: 1,
- zoom: 1,
- columns: ["model.name", "from", "to", "duration", "complete", "daysremain", "innerlink"],
- treeTableColumns: ["from", "to", "duration", "complete", "daysremain"],
- rowContent: '<a href="javascript:;" ng-click="scope.handleRowClick(row.model)">{{row.model.name}}</i>',
- columnsHeaders: {
- "model.name": "Phase",
- from: "Start",
- to: "End",
- duration: "Duration (Days)",
- complete: "% Complete",
- daysremain: "Days Remaining"
- },
- headerContents: {
- duration: '<i class="test">{{getHeader()}}</i>'
- },
- classes: {
- from: "gantt-col-rotated",
- to: "gantt-col-rotated",
- duration: "gantt-col-rotated",
- complete: "gantt-col-rotated",
- daysremain: "gantt-col-rotated"
- },
- currentDate: "line",
- currentDateValue: new Date,
- columnsFormatters: {
- from: function(e) {
- return void 0 !== e ? e.format("M/DD/YY") : void 0
- },
- to: function(e) {
- return void 0 !== e ? e.format("M/DD/YY") : void 0
- }
- }
- }, e.scrollEvent = function(e) {
- angular.equals(e.direction, "left") ? console.log("Scroll event: Left") : angular.equals(e.direction, "right") && console.log("Scroll event: Right")
- }, e.handleRowClick = function(e) {
- r.path(e.columnContents.innerlink)
- }, o.loadProject(e.projectId, function(t) {
- if (t.success) {
- e.projectDetail = a.currentProject, e.phaseData = a.phaseData;
- var n = ["Define", "Measure", "Analyze", "Improve", "Control"],
- i = {},
- s = {};
- if (e.projectDetail.ControlReviewDate) {
- var l = moment(e.projectDetail.DateTimeCreated, "YYYYMMDD"),
- c = moment(e.projectDetail.ControlReviewDate, "YYYYMMDD");
- i = {
- name: "Project Timeline",
- columnContents: {
- duration: c.diff(l, "days"),
- complete: Math.round(e.projectDetail.CompletionPercentage) + "%",
- daysremain: c.diff(new Date, "days"),
- innerlink: ""
- },
- tasks: [{
- name: "",
- from: l,
- to: c,
- color: "#bcbcbc"
- }]
- }, e.data.push(i)
- }
- for (var u = 0; u < n.length; u++) {
- var d = [],
- p = 0,
- h = 0,
- g = 0,
- m = o.getPhaseDetail(n[u]);
- i = {
- name: n[u] + " Phase",
- children: []
- };
- var f = 0;
- for (var v in m)
- if (f++, m[v].DateTimeStarted) {
- i.children.push(m[v].Name);
- var D = moment(m[v].DateTimeStarted, "YYYYMMDD"),
- C = moment(m[v].LastUpdated, "YYYYMMDD"),
- y = C.diff(D, "days");
- s = {
- name: m[v].Name,
- tasks: [{
- name: "",
- from: D,
- to: C,
- color: "#bcbcbc"
- }],
- columnContents: {
- duration: y,
- complete: "working" !== m[v].Status ? '<i class="fa fa-check"></i>' : "",
- daysremain: "",
- innerlink: n[u].toLowerCase() + "/" + e.projectId + "/" + f
- }
- }, "working" !== m[v].Status && g++, d.push(s), p += y
- }
- var b = moment(e.projectDetail[n[u] + "ReviewDate"]).diff(moment(), "days");
- h = g / Object.keys(m).length * 100, i.columnContents = {
- duration: p,
- complete: Math.round(h) + "%",
- daysremain: b,
- innerlink: n[u].toLowerCase() + "/" + e.projectId + "/1"
- }, e.data.push(i), e.data.push.apply(e.data, d)
- }
- } else r.path("/dashboard")
- })
- }
- angular.module("app.chart").controller("GanttCtrl", ["$scope", "$rootScope", "$stateParams", "DataSyncService", "$location", e])
- }(),
- function() {
- "use strict";
- function e(e, a, t) {
- -1 === $.inArray(t.path(), ["/page/signin", "/page/signup", "/page/forgot-password"]) ? (e.currentProject = {}, e.contactList = {
- lastUpdate: "",
- contacts: []
- }, a.loadContacts(function(a) {
- e.contactList.contacts = a, e.contactList.lastUpdate = moment()
- }), e.phaseDataModel = {
- Define: {
- completedTasks: 0,
- totalTasks: 0
- },
- Measure: {
- completedTasks: 0,
- totalTasks: 0
- },
- Analyze: {
- completedTasks: 0,
- totalTasks: 0
- },
- Improve: {
- completedTasks: 0,
- totalTasks: 0
- },
- Control: {
- completedTasks: 0,
- totalTasks: 0
- }
- }, e.phaseData = angular.copy(e.phaseDataModel)) : e.globals = {};
- var o = [{
- name: "Fade up",
- "class": "animate-fade-up"
- }, {
- name: "Scale up",
- "class": "ainmate-scale-up"
- }, {
- name: "Slide in from right",
- "class": "ainmate-slide-in-right"
- }, {
- name: "Flip Y",
- "class": "animate-flip-y"
- }],
- r = new Date,
- n = r.getFullYear(),
- i = {
- brand: "L6Σ",
- year: n,
- layout: "wide",
- menu: "vertical",
- fixedHeader: !0,
- fixedSidebar: !0,
- pageTransition: o[0],
- skin: "15"
- },
- s = {
- primary: "#009688",
- success: "#8BC34A",
- info: "#00BCD4",
- infoAlt: "#7E57C2",
- warning: "#EB9C17",
- danger: "#F44336",
- gray: "#EDF0F1"
- };
- return {
- pageTransitionOpts: o,
- main: i,
- color: s
- }
- }
- function a(e) {
- var a = e.extendPalette("cyan", {
- contrastLightColors: "500 600 700 800 900",
- contrastStrongLightColors: "500 600 700 800 900"
- }),
- t = e.extendPalette("light-green", {
- contrastLightColors: "500 600 700 800 900",
- contrastStrongLightColors: "500 600 700 800 900"
- });
- e.definePalette("cyanAlt", a).definePalette("lightGreenAlt", t), e.theme("default").primaryPalette("teal", {
- "default": "500"
- }).accentPalette("cyanAlt", {
- "default": "500"
- }).warnPalette("red", {
- "default": "500"
- }).backgroundPalette("grey")
- }
- angular.module("app.core").factory("appConfig", ["$rootScope", "DataSyncService", "$location", e]).config(["$mdThemingProvider", a])
- }(),
- function() {
- "use strict";
- function e(e, a, t, o, r, n) {
- e.pageTransitionOpts = r.pageTransitionOpts, e.main = r.main, e.color = r.color, e.$watch("main", function(t, o) {
- "horizontal" === t.menu && "vertical" === o.menu && a.$broadcast("nav:reset"), t.fixedHeader === !1 && t.fixedSidebar === !0 && (o.fixedHeader === !1 && o.fixedSidebar === !1 && (e.main.fixedHeader = !0, e.main.fixedSidebar = !0), o.fixedHeader === !0 && o.fixedSidebar === !0 && (e.main.fixedHeader = !1, e.main.fixedSidebar = !1)), t.fixedSidebar === !0 && (e.main.fixedHeader = !0), t.fixedHeader === !1 && (e.main.fixedSidebar = !1)
- }, !0), e.logout = function() {
- n.ClearCredentials()
- }, e.userDetails = a.globals.userDetails, a.$on("$userDetailPopulated", function(t) {
- e.userDetails = a.globals.userDetails
- }), a.$on("$stateChangeSuccess", function(e, a, t) {
- o.scrollTo(0, 0)
- })
- }
- angular.module("app").controller("AppCtrl", ["$scope", "$rootScope", "$state", "$document", "appConfig", "AuthenticationService", e])
- }(),
- function() {
- "use strict";
- function e(e, a, t, o) {
- var r = {};
- return r.Login = function(e, t, o) {
- //a.defaults.headers.common.Authorization = ""
- a.post("https://api.l6elite.com/login", {
- email: e,
- password: t
- }).then(function(e) {
- e.success = !0, o(e)
- }, function(e) {
- e.success = !1, o(e)
- })
- }, r.UpdateCredentials = function(r, n) {
- var i = e.encode(r + ":" + n);
- a.defaults.headers.common.Authorization = "Basic " + i, o.globals.currentUser.authdata = i, t.put("globals", JSON.stringify(o.globals))
- }, r.SetCredentials = function(r, n) {
- var i = e.encode(r + ":" + n);
- o.globals = {
- currentUser: {
- email: r,
- authdata: i
- }
- }, a.defaults.headers.common.Authorization = "Basic " + i, t.put("globals", JSON.stringify(o.globals))
- }, r.ClearCredentials = function() {
- o.globals = {}, t.remove("globals"), a.defaults.headers.common.Authorization = "Basic "
- }, r
- }
- function a() {
- var e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
- return {
- encode: function(a) {
- var t, o, r, n, i, s = "",
- l = "",
- c = "",
- u = 0;
- do t = a.charCodeAt(u++), o = a.charCodeAt(u++), l = a.charCodeAt(u++), r = t >> 2, n = (3 & t) << 4 | o >> 4, i = (15 & o) << 2 | l >> 6, c = 63 & l, isNaN(o) ? i = c = 64 : isNaN(l) && (c = 64), s = s + e.charAt(r) + e.charAt(n) + e.charAt(i) + e.charAt(c), t = o = l = "", r = n = i = c = ""; while (u < a.length);
- return s
- },
- decode: function(a) {
- var t, o, r, n, i, s = "",
- l = "",
- c = "",
- u = 0,
- d = /[^A-Za-z0-9\+\/\=]/g;
- d.exec(a) && window.alert("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\nExpect errors in decoding."), a = a.replace(/[^A-Za-z0-9\+\/\=]/g, "");
- do r = e.indexOf(a.charAt(u++)), n = e.indexOf(a.charAt(u++)), i = e.indexOf(a.charAt(u++)), c = e.indexOf(a.charAt(u++)), t = r << 2 | n >> 4, o = (15 & n) << 4 | i >> 2, l = (3 & i) << 6 | c, s += String.fromCharCode(t), 64 != i && (s += String.fromCharCode(o)), 64 != c && (s += String.fromCharCode(l)), t = o = l = "", r = n = i = c = ""; while (u < a.length);
- return s
- }
- }
- }
- angular.module("app").factory("AuthenticationService", ["Base64", "$http", "$cookies", "$rootScope", e]).factory("Base64", [a])
- }(),
- function() {
- "use strict";
- function e(e, a, t, o) {
- -1 === $.inArray(a.path(), ["/page/signin", "/page/signup", "/page/forgot-password"]) && (e.globals = t.get("globals") || {}, "object" != typeof e.globals && (e.globals = JSON.parse(e.globals)), e.globals.currentUser && (o.defaults.headers.common.Authorization = "Basic " + e.globals.currentUser.authdata)), e.$on("$locationChangeStart", function(t, o, r) {
- r.indexOf("svg_editor") > -1 && window.location.reload();
- var n = -1 === $.inArray(a.path(), ["/page/signin", "/page/signup", "/page/forgot-password"]),
- i = e.globals.currentUser;
- n && !i && a.path("/page/signin")
- })
- }
- angular.module("app").config(["$stateProvider", "$urlRouterProvider", function(e, a) {
- var t, o, r, n;
- t = ["page/404", "page/500", "page/forgot-password", "page/lock-screen", "page/profile", "page/signin"], o = [{
- url: "project",
- config: {
- url: "/project/:pid",
- templateUrl: "app/project/project.html"
- }
- }, {
- url: "projecthistory",
- config: {
- url: "/projecthistory",
- templateUrl: "app/project/project-history.html"
- }
- }, {
- url: "newproject",
- config: {
- url: "/newproject",
- templateUrl: "app/project/project-new.html"
- }
- }, {
- url: "define",
- config: {
- url: "/define/:pid/:tid",
- templateUrl: "app/project/project-define.html"
- }
- }, {
- url: "measure",
- config: {
- url: "/measure/:pid/:tid",
- templateUrl: "app/project/project-measure.html"
- }
- }, {
- url: "svgeditor",
- config: {
- url: "/svg_editor/:process/:pid",
- templateUrl: "app/project/project-svgeditor.html"
- }
- }, {
- url: "analyze",
- config: {
- url: "/analyze/:pid/:tid",
- templateUrl: "app/project/project-analyze.html"
- }
- }, {
- url: "improve",
- config: {
- url: "/improve/:pid/:tid",
- templateUrl: "app/project/project-improve.html"
- }
- }, {
- url: "control",
- config: {
- url: "/control/:pid/:tid",
- templateUrl: "app/project/project-control.html"
- }
- }, {
- url: "user-settings",
- config: {
- url: "/user-settings",
- templateUrl: "app/page/user-settings.html"
- }
- }], r = function(a) {
- var t, o;
- return o = "/" + a, t = {
- url: o,
- templateUrl: "app/" + a + ".html"
- }, e.state(a, t), e
- }, n = function(a) {
- return e.state(a.url, a.config), e
- }, t.forEach(function(e) {
- return r(e)
- }), o.forEach(function(e) {
- return n(e)
- }), a.when("/", "/dashboard").otherwise("/dashboard"), e.state("dashboard", {
- url: "/dashboard",
- templateUrl: "app/dashboard/dashboard.html"
- })
- }]).run(e), e.$inject = ["$rootScope", "$location", "$cookies", "$http"]
- }(),
- function() {
- "use strict";
- function e(e, a, t, o) {
- var r = {};
- return r.syncPromise = function(t) {
- return e.post("https://api.l6elite.com", t).then(function(e) {
- return a.$broadcast("preloader:hide"), e.data
- }, function(e) {
- return a.$broadcast("preloader:hide"), e.data
- })
- }, r.sync = function(t, o) {
- a.$broadcast("preloader:active"), e.post("https://api.l6elite.com", t).then(function(e) {
- a.$broadcast("preloader:hide"), e.success = !0, o(e)
- }, function(e) {
- a.$broadcast("preloader:hide"), e.success = !1, o(e)
- })
- }, r.post = function(t, o, r) {
- a.$broadcast("preloader:active"), e.post(t, o).then(function(e) {
- a.$broadcast("preloader:hide"), e.success = !0, r(e)
- }, function(e) {
- a.$broadcast("preloader:hide"), e.success = !1, r(e)
- })
- }, r.buildRequest = function(e, a, t, o, r, n) {
- var i = {
- A: e,
- T: a instanceof Array ? a : [a]
- };
- return t && (i.C = t), o && (i.F = o), r && (i.V = r), n ? i.CO = n : i.CO = !1, i
- }, r.buildFilter = function(e, a, t, o, r, n, i, s) {
- var l = {};
- return e && (l.c = e), a && (l.j = a),
- t && (l.op = t), o && (l.v = o), r && (l.ob = r), n && (l.o = n), i && (l.l = i), s && (l.ao = s), l
- }, r.loadProject = function(e, t, r) {
- var n = {};
- if (a.currentProject && a.currentProject.Id == e) n.success = !0, t(n);
- else if (o.get("currentProject")) {
- var i = JSON.parse(o.get("currentProject"));
- i.Id == e ? (a.currentProject = angular.copy(i), a.phaseData = angular.copy(JSON.parse(o.get("phaseData"))), n.success = !0, t(n)) : r = !0
- } else r = !0;
- if (r) {
- var s = this.buildFilter("Id", null, "is", e);
- this.sync(this.buildRequest("get", ["projects"], null, [s]), function(e) {
- if (e.success) {
- a.phaseData = angular.copy(a.phaseDataModel), a.currentProject = e.data[0], a.currentProject.BusinessImpactValue = parseFloat(a.currentProject.BusinessImpactValue), a.currentProject.tasksLeft = 0;
- for (var r = 0; e.data[0] && e.data[0].PhaseData && r < e.data[0].PhaseData.length; r++) {
- var n = e.data[0].PhaseData[r];
- a.phaseData[n.PhaseName].totalTasks += 1, "complete" == n.Status ? a.phaseData[n.PhaseName].completedTasks += 1 : a.currentProject.tasksLeft++
- }
- o.put("currentProject", JSON.stringify(a.currentProject)), o.put("phaseData", JSON.stringify(a.phaseData)), t(e)
- } else t(e)
- })
- }
- }, r.loadContacts = function(e, t) {
- var o = [{
- id: null,
- name: "",
- email: "",
- image: "",
- _lowername: ""
- }, {
- id: 0,
- name: "New Contact",
- email: "",
- image: "",
- _lowername: "newcontact"
- }];
- if (a.contactList.contacts.length < 1 || moment().isAfter(a.contactList.lastUpdate.add(10, "minutes")) || t) {
- var n = r.buildFilter("Status", null, "isnot", "inactive"),
- i = ["Id", "Status", "FirstName", "LastName", "EmailAddress", "Phone", "WorkTitle", "ProfileImageUrl"];
- r.sync(r.buildRequest("get", ["users"], [i], [n]), function(t) {
- if (t.success) {
- for (var r = t.data, n = 0; r && n < r.length; n++) o.push({
- name: r[n].FirstName + " " + r[n].LastName,
- email: r[n].EmailAddress,
- image: r[n].ProfileImageUrl || "images/generic-profile.png",
- _lowername: (r[n].FirstName + r[n].LastName).toLowerCase(),
- id: r[n].Id,
- selected: !1,
- status: r[n].Status,
- worktitle: r[n].WorkTitle
- });
- a.contactList.lastUpdate = moment(), a.contactList.contacts = o, e(o)
- }
- })
- } else o = a.contactList.contacts, e(o)
- }, r.getPhaseComponentDetail = function(e, t) {
- for (var o = a.currentProject.PhaseData, r = {}, n = 0; o && n < o.length; n++) o[n].PhaseName === e && o[n].Name === t && (r = o[n]);
- return r
- }, r.updatePhaseComponentDetail = function(e, t) {
- var o = [r.buildFilter("ProjectId", null, "is", e)];
- r.sync(r.buildRequest("get", ["phasecomponents"], null, o), function(e) {
- e.success && (a.currentProject.PhaseData = e.data, t && t(e))
- })
- }, r.getPhaseDetail = function(e) {
- for (var t = a.currentProject.PhaseData, o = {}, r = 0; t && r < t.length; r++) t[r].PhaseName === e && (o[t[r].Name.replace(/ /g, "_").replace(/&/g, "n").replace(/-/g, "")] = t[r]);
- return o
- }, r.getAllAccessLevels = function(e) {
- this.sync(this.buildRequest("get", ["accesslevels"], null, null), function(a) {
- e(a)
- })
- }, r.syncTableRowData = function(e, a, o, n, i, s) {
- var l = [],
- c = [],
- u = [],
- d = [];
- if (i !== !0 && i !== !1 && (i = !0), n.length > 0 && (console.log("TO DELETE -->"), console.log(n), c = r.buildFilter("Id", null, "anyof", n), r.sync(r.buildRequest("delete", [e], null, [c]), function(e) {
- e.success ? i && t.logSuccess("Row Successfully Deleted!") : i && t.logError("Oops! Row Was Not Deleted! Try Again!")
- })), d = [], console.log("TO UPDATE -->"), console.log(o), o.length > 0) {
- for (var p = 0; o && p < o.length; p++) d.push(e), c = r.buildFilter("Id", null, "is", o[p].Id), l.push(c), delete o[p].Id, u.push(o[p]);
- r.sync(r.buildRequest("update", d, null, l, u), function(e) {
- e.success ? i && t.logSuccess("Successfully Updated!") : i && t.logError("Oops! The Update Failed! Try Again!")
- })
- }
- if (d = [], u = [], console.log("TO ADD -->"), console.log(a), a.length > 0) {
- for (var p = 0; a && p < a.length; p++) d.push(e), u.push(a[p]);
- r.sync(r.buildRequest("add", d, null, null, u), function(e) {
- e.success ? (i && t.logSuccess("New Data Successfully Added!"), s && s(e)) : i && t.logError("Oops! Data Was Not Added! Try Again!")
- })
- }
- }, r.getUserSubordinates = function(e) {
- var t = [];
- t.push(this.buildFilter("ReportsTo", null, "is", a.globals.userDetails.Id)), this.sync(this.buildRequest("get", ["users"], null, [t]), function(a) {
- e(a)
- })
- }, r.getScopeChange = function(e, a) {
- var t = [];
- t.push(this.buildFilter("DateTimeCreated", null, "onorafter", moment().subtract(1, "day").format("M/D/YYYY"))), t.push({
- ao: "and"
- }), t.push(this.buildFilter("FieldLabel", null, "is", "Scope")), t.push({
- andorsplit: "and"
- }), t.push(this.buildFilter("UserId", null, "anyof", e)), this.sync(this.buildRequest("get", ["actiontracking"], null, [t]), function(e) {
- a(e)
- })
- }, r.getActionTimeline = function(e, a, t) {
- var o = [];
- o.push(this.buildFilter("UserId", null, "anyof", e)), o.push({
- ao: "and"
- }), a ? o.push(this.buildFilter("Id", null, "lt", a, "Id", "DESC", 50)) : o.push(this.buildFilter("Id", null, "gte", 1, "Id", "DESC", 50)), this.sync(this.buildRequest("get", ["actiontracking"], null, [o]), function(e) {
- t(e)
- })
- }, r.exportData = function(t, o, r) {
- var n = {
- data_type: t,
- filters: o
- };
- a.$broadcast("preloader:active"), e.post("https://api.l6elite.com/exportdata", n).then(function(e) {
- a.$broadcast("preloader:hide"), e.success = !0, r(e)
- }, function(e) {
- a.$broadcast("preloader:hide"), e.success = !1, r(e)
- })
- }, r
- }
- angular.module("app.core").factory("DataSyncService", ["$http", "$rootScope", "logger", "$cookies", e])
- }(),
- function() {
- "use strict";
- function e(e) {
- return function(a, t, o) {
- var r;
- o.$observe("goTo", function(e) {
- r = e
- }), t.bind("click", function() {
- a.$apply(function() {
- e.path(r)
- })
- })
- }
- }
- function a() {
- return {
- require: "ngModel",
- link: function(e, a, t, o) {
- a.bind("blur", function() {
- e.$apply(function() {
- o.$setViewValue(a.html())
- })
- }), o.$render = function(e) {
- a.html(e)
- }, a.bind("keydown", function(e) {
- var t = 27 == e.which,
- r = e.target;
- t && (o.$setViewValue(a.html()), r.blur(), e.preventDefault())
- })
- }
- }
- }
- function t(e, a) {
- return {
- require: "ngModel",
- controller: ["$scope", function(a) {
- a.addedUser = {}, a.showSoftUserAdd = function(t, o, r, n) {
- var i = e.open({
- templateUrl: "softusereditor.html",
- controller: ["$scope", "$rootScope", "DataSyncService", "logger", "$uibModalInstance", function(e, a, t, o, r) {
- e.dSchema = {
- EmailAddress: "",
- FirstName: "",
- LastName: "",
- WorkTitle: "",
- ProfileImageUrl: "",
- Phone: "",
- City: "",
- State: "",
- Zip: ""
- }, e.userData = angular.copy(e.dSchema), e.addSoftUser = function() {
- var n = [];
- n.push(e.userData), t.sync(t.buildRequest("add", ["users"], null, null, n), function(t) {
- if (t.success) {
- var n = t.data;
- a.contactList.contacts.push({
- name: n.FirstName + " " + n.LastName,
- email: n.EmailAddress,
- image: n.ProfileImageUrl,
- _lowername: (n.FirstName + n.LastName).toLowerCase(),
- id: n.Id
- }), r.close(n), e.userData = angular.copy(e.dSchema)
- } else o.logError(t.data[0])
- })
- }, e.closeModal = function() {
- r.dismiss("cancel")
- }
- }],
- resolve: {
- addedUser: function() {
- return a.addedUser
- }
- }
- });
- i.result.then(function(e) {
- a.$broadcast("setUserSelectValue", e.Id)
- })
- }
- }],
- link: function(e, a, t, o) {
- e.$watch(function() {
- return o.$modelValue
- }, function(a) {
- "0" === a && e.showSoftUserAdd()
- }), e.$on("setUserSelectValue", function(e, a) {
- o.$setViewValue(a)
- })
- }
- }
- }
- angular.module("app.core").directive("goTo", ["$location", e]).directive("contenteditable", [a]).directive("userSelect", ["$uibModal", "DataSyncService", t])
- }(),
- function() {
- function e(e) {
- e.useStaticFilesLoader({
- prefix: "i18n/",
- suffix: ".json"
- }), e.preferredLanguage("en"), e.useSanitizeValueStrategy("sanitize")
- }
- function a(e, a) {
- function t(t) {
- switch (t) {
- case "English":
- a.use("en");
- break;
- case "Español":
- a.use("es");
- break;
- case "中文":
- a.use("zh");
- break;
- case "日本語":
- a.use("ja");
- break;
- case "Portugal":
- a.use("pt");
- break;
- case "Русский язык":
- a.use("ru")
- }
- return e.lang = t
- }
- function o() {
- var a;
- switch (a = e.lang) {
- case "English":
- return "flags-american";
- case "Español":
- return "flags-spain";
- case "中文":
- return "flags-china";
- case "Portugal":
- return "flags-portugal";
- case "日本語":
- return "flags-japan";
- case "Русский язык":
- return "flags-russia"
- }
- }
- e.lang = "English", e.setLang = t, e.getFlag = o
- }
- angular.module("app.i18n", ["pascalprecht.translate"]).config(["$translateProvider", e]).controller("LangCtrl", ["$scope", "$translate", a])
- }(),
- function() {
- "use strict";
- function e(e, a, t, o) {
- console.log("Dashboard Controller Instantiated"), e.activeProjects = [], e.projectTimeline = [], e.scopeChange = "UNCHANGED", e.scopeChanges = [], e.subordinates = [], e.costAvoidance = 0, e.costAvoidanceChar = "", e.timeTracking = "ON TRACK", a.currentProject = {}, a.contactList = {
- lastUpdate: "",
- contacts: []
- }, t.loadContacts(function(e) {
- a.contactList.contacts = e, a.contactList.lastUpdate = moment()
- }), a.phaseDataModel = {
- Define: {
- completedTasks: 0,
- totalTasks: 0
- },
- Measure: {
- completedTasks: 0,
- totalTasks: 0
- },
- Analyze: {
- completedTasks: 0,
- totalTasks: 0
- },
- Improve: {
- completedTasks: 0,
- totalTasks: 0
- },
- Control: {
- completedTasks: 0,
- totalTasks: 0
- }
- }, a.phaseData = angular.copy(a.phaseDataModel), t.getUserSubordinates(function(o) {
- var r = [a.globals.userDetails.Id];
- if (o.success)
- for (var n = 0; o.data && n < o.data.length; n++) o.data[n].Id && r.push(o.data[n].Id);
- e.subordinates = r;
- var i = [t.buildFilter("CreatedBy", null, "anyof", r), {
- andor: "and"
- }, t.buildFilter("Status", null, "is", "active")];
- t.sync(t.buildRequest("get", ["projects"], null, [i]), function(a) {
- a.success ? (e.activeProjects = a.data, "object" != typeof e.activeProjects && (e.activeProjects = []), e.activeProjects instanceof Array || (e.activeProjects = [e.activeProjects])) : e.activeProjects = [], e.getCostAvoidance(), e.getTimeTrack();
- for (var t = 0; e.activeProjects && t < e.activeProjects.length; t++) e.activeProjects[t].chart = {
- percent: Math.round(e.activeProjects[t].CompletionPercentage),
- options: {
- animate: {
- duration: 1500,
- enabled: !1
- },
- barColor: e.color.primary,
- lineCap: "round",
- size: 120,
- lineWidth: 5
- }
- }
- }), e.getScopeChanges(), e.getProjectTimeline(null)
- }), e.getTimeTrack = function() {
- for (var a = "ON TRACK", t = 0; e.activeProjects && t < e.activeProjects.length; t++) {
- for (var o = e.activeProjects[t], r = {
- Define: {
- rd: moment(o.DefineReviewDate),
- incomplete: 0
- },
- Measure: {
- rd: moment(o.MeasureReviewDate),
- incomplete: 0
- },
- Analyze: {
- rd: moment(o.AnalyzeReviewDate),
- incomplete: 0
- },
- Improve: {
- rd: moment(o.ImproveReviewDate),
- incomplete: 0
- },
- Control: {
- rd: moment(o.ControlReviewDate),
- incomplete: 0
- }
- }, n = 0; o.PhaseData && n < o.PhaseData.length; n++) {
- var i = o.PhaseData[n];
- if ("complete" !== i.Status) {
- var s = moment().diff(r[i.PhaseName].rd, "days");
- if (s > 0) {
- a = "OFF TRACK";
- break
- }
- if (Math.abs(s) <= r[i.PhaseName].incomplete) {
- a = "OFF TRACK";
- break
- }
- r[i.PhaseName].incomplete++
- }
- }
- if ("OFF TRACK" == a) break
- }
- e.timeTracking = a
- }, e.getCostAvoidance = function() {
- for (var a = 0, t = 0; e.activeProjects && t < e.activeProjects.length; t++) a += parseInt(e.activeProjects[t].BusinessImpactValue);
- return Math.abs(Number(a)) > 1e12 ? (e.costAvoidance = Math.round(Math.abs(Number(a)) / 1e12 * 10) / 10, void(e.costAvoidanceChar = "tr")) : Math.abs(Number(a)) > 1e9 ? (e.costAvoidance = Math.round(Math.abs(Number(a)) / 1e9 * 10) / 10, void(e.costAvoidanceChar = "b")) : Math.abs(Number(a)) > 1e6 ? (e.costAvoidance = Math.round(Math.abs(Number(a)) / 1e6 * 10) / 10, void(e.costAvoidanceChar = "m")) : Math.abs(Number(a)) > 1e3 ? (e.costAvoidance = Math.round(Math.abs(Number(a)) / 1e3 * 10) / 10, void(e.costAvoidanceChar = "k")) : void(e.costAvoidance = Math.round(10 * Math.abs(Number(a))) / 10)
- }, e.getScopeChanges = function() {
- t.getScopeChange(e.subordinates, function(a) {
- a.success ? (e.scopeChange = "CHANGED", e.scopeChanges = a.data) : e.scopeChange = "UNCHANGED"
- })
- }, e.getProjectTimeline = function(a) {
- t.getActionTimeline(e.subordinates, a, function(a) {
- a.success && e.buildProjectTimeline(a.data)
- })
- }, e.buildProjectTimeline = function(a) {
- function t(e) {
- for (var a = r; a == r;) a = n[Math.floor(4 * Math.random())];
- return e + a
- }
- for (var o = null, r = "btn-success", n = ["success", "primary", "info", "warning", "danger"], i = 0; a && i < a.length; i++) {
- var s = moment(a[i].DateTimeCreated, "YYYYMMDD").diff(moment(), "days");
- 0 === s && s != o ? (e.projectTimeline.push({
- BadgeColor: "btn-success",
- NewDay: "Today"
- }), o = 0) : 1 === s && s != o ? (e.projectTimeline.push({
- BadgeColor: t("btn-"),
- NewDay: "Yesterday"
- }), o = 1) : s != o && (e.projectTimeline.push({
- BadgeColor: t("btn-"),
- NewDay: moment(a[i].DateTimeCreated).format("ll")
- }), o = s), a[i].Caption && e.projectTimeline.push({
- ProjectId: a[i].ProjectId,
- HeaderColor: t("text-"),
- BadgeColor: t("btn-"),
- DateTime: 0 == s ? moment(a[i].DateTimeCreated).fromNow() : moment(a[i].DateTimeCreated).format("LT"),
- Icon: a[i].Icon,
- Caption: a[i].Caption,
- isAlt: i % 2 === 0 ? !1 : !0
- })
- }
- }, e.animateElementIn = function(e) {
- e.removeClass("timeline-hidden"), e.addClass("bounce-in")
- }, e.animateElementOut = function(e) {
- e.addClass("timeline-hidden"), e.removeClass("bounce-in")
- }
- }
- angular.module("app.dashboard").controller("dashboardCtrl", ["$scope", "$rootScope", "DataSyncService", "$timeout", e])
- }(),
- function() {
- "use strict";
- function e(e) {
- e.user = {
- title: "Developer",
- email: "ipsum@lorem.com",
- firstName: "",
- lastName: "",
- company: "Google",
- address: "1600 Amphitheatre Pkwy",
- city: "Mountain View",
- state: "CA",
- biography: "Loves kittens, snowboarding, and can type at 130 WPM.\n\nAnd rumor has it she bouldered up Castle Craig!",
- postalCode: "94043"
- }, e.states = "AL AK AZ AR CA CO CT DE FL GA HI ID IL IN IA KS KY LA ME MD MA MI MN MS MO MT NE NV NH NJ NM NY NC ND OH OK OR PA RI SC SD TN TX UT VT VA WA WV WI WY".split(" ").map(function(e) {
- return {
- abbrev: e
- }
- })
- }
- function a(e) {
- e.checkbox = {}, e.checkbox.cb1 = !0, e.checkbox.cb2 = !1, e.checkbox.cb3 = !1, e.checkbox.cb4 = !1, e.checkbox.cb5 = !1, e.checkbox.cb6 = !0, e.checkbox.cb7 = !0, e.checkbox.cb8 = !0, e.items = [1, 2, 3, 4, 5], e.selected = [], e.toggle = function(e, a) {
- var t = a.indexOf(e);
- t > -1 ? a.splice(t, 1) : a.push(e)
- }, e.exists = function(e, a) {
- return a.indexOf(e) > -1
- }
- }
- function t(e) {
- e.radio = {
- group1: "Banana",
- group2: "2",
- group3: "Primary"
- }, e.radioData = [{
- label: "Radio: disabled",
- value: "1",
- isDisabled: !0
- }, {
- label: "Radio: disabled, Checked",
- value: "2",
- isDisabled: !0
- }], e.contacts = [{
- id: 1,
- fullName: "Maria Guadalupe",
- lastName: "Guadalupe",
- title: "CEO, Found"
- }, {
- id: 2,
- fullName: "Gabriel García Marquéz",
- lastName: "Marquéz",
- title: "VP Sales & Marketing"
- }, {
- id: 3,
- fullName: "Miguel de Cervantes",
- lastName: "Cervantes",
- title: "Manager, Operations"
- }, {
- id: 4,
- fullName: "Pacorro de Castel",
- lastName: "Castel",
- title: "Security"
- }], e.selectedIndex = 2, e.selectedUser = function() {
- var a = e.selectedIndex - 1;
- return e.contacts[a].lastName
- }
- }
- function o(e) {
- e.color = {
- red: 97,
- green: 211,
- blue: 140
- }, e.rating1 = 3, e.rating2 = 2, e.rating3 = 4, e.disabled1 = 0, e.disabled2 = 70, e.user = {
- title: "Developer",
- email: "ipsum@lorem.com",
- firstName: "",
- lastName: "",
- company: "Google",
- address: "1600 Amphitheatre Pkwy",
- city: "Mountain View",
- state: "CA",
- biography: "Loves kittens, snowboarding, and can type at 130 WPM.\n\nAnd rumor has it she bouldered up Castle Craig!",
- postalCode: "94043"
- }, e.select1 = "1", e.toppings = [{
- category: "meat",
- name: "Pepperoni"
- }, {
- category: "meat",
- name: "Sausage"
- }, {
- category: "meat",
- name: "Ground Beef"
- }, {
- category: "meat",
- name: "Bacon"
- }, {
- category: "veg",
- name: "Mushrooms"
- }, {
- category: "veg",
- name: "Onion"
- }, {
- category: "veg",
- name: "Green Pepper"
- }, {
- category: "veg",
- name: "Green Olives"
- }], e.favoriteTopping = e.toppings[0].name, e.switchData = {
- cb1: !0,
- cbs: !1,
- cb4: !0,
- color1: !0,
- color2: !0,
- color3: !0
- }, e.switchOnChange = function(a) {
- e.message = "The switch is now: " + a
- }
- }
- function r(e, a, t, o) {
- function r(e) {
- alert("Sorry! You'll need to create a Constituion for " + e + " first!")
- }
- function n(o) {
- var r, n = o ? e.states.filter(c(o)) : e.states;
- return e.simulateQuery ? (r = t.defer(), a(function() {
- r.resolve(n)
- }, 1e3 * Math.random(), !1), r.promise) : n
- }
- function i(e) {}
- function s(e) {}
- function l() {
- var e = "Alabama, Alaska, Arizona, Arkansas, California, Colorado, Connecticut, Delaware, Florida, Georgia, Hawaii, Idaho, Illinois, Indiana, Iowa, Kansas, Kentucky, Louisiana, Maine, Maryland, Massachusetts, Michigan, Minnesota, Mississippi, Missouri, Montana, Nebraska, Nevada, New Hampshire, New Jersey, New Mexico, New York, North Carolina, North Dakota, Ohio, Oklahoma, Oregon, Pennsylvania, Rhode Island, South Carolina, South Dakota, Tennessee, Texas, Utah, Vermont, Virginia, Washington, West Virginia, Wisconsin, Wyoming";
- return e.split(/, +/g).map(function(e) {
- return {
- value: e.toLowerCase(),
- display: e
- }
- })
- }
- function c(e) {
- var a = angular.lowercase(e);
- return function(e) {
- return 0 === e.value.indexOf(a)
- }
- }
- var e = this;
- e.simulateQuery = !1, e.isDisabled = !1, e.states = l(), e.querySearch = n, e.selectedItemChange = s, e.searchTextChange = i, e.newState = r
- }
- function n(e) {
- e.myDate = new Date, e.minDate = new Date(e.myDate.getFullYear(), e.myDate.getMonth() - 2, e.myDate.getDate()), e.maxDate = new Date(e.myDate.getFullYear(), e.myDate.getMonth() + 2, e.myDate.getDate())
- }
- function i(e) {
- e.today = function() {
- e.dt = new Date
- }, e.today(), e.clear = function() {
- e.dt = null
- }, e.disabled = function(e, a) {
- return "day" === a && (0 === e.getDay() || 6 === e.getDay())
- }, e.toggleMin = function() {
- e.minDate = e.minDate ? null : new Date
- }, e.toggleMin(), e.maxDate = new Date(2020, 5, 22), e.open = function(a) {
- e.status.opened = !0
- }, e.setDate = function(a, t, o) {
- e.dt = new Date(a, t, o)
- }, e.dateOptions = {
- formatYear: "yy",
- startingDay: 1
- }, e.formats = ["dd-MMMM-yyyy", "yyyy/MM/dd", "dd.MM.yyyy", "shortDate"], e.format = e.formats[0], e.status = {
- opened: !1
- };
- var a = new Date;
- a.setDate(a.getDate() + 1);
- var t = new Date;
- t.setDate(a.getDate() + 2), e.events = [{
- date: a,
- status: "full"
- }, {
- date: t,
- status: "partially"
- }], e.getDayClass = function(a, t) {
- if ("day" === t)
- for (var o = new Date(a).setHours(0, 0, 0, 0), r = 0; r < e.events.length; r++) {
- var n = new Date(e.events[r].date).setHours(0, 0, 0, 0);
- if (o === n) return e.events[r].status
- }
- return ""
- }
- }
- function s(e) {
- e.mytime = new Date, e.hstep = 1, e.mstep = 15, e.options = {
- hstep: [1, 2, 3],
- mstep: [1, 5, 10, 15, 25, 30]
- }, e.ismeridian = !0, e.toggleMode = function() {
- return e.ismeridian = !e.ismeridian
- }, e.update = function() {
- var a;
- return a = new Date, a.setHours(14), a.setMinutes(0), e.mytime = a
- }, e.changed = function() {}, e.clear = function() {
- return e.mytime = null
- }
- }
- function l(e) {
- e.selected = void 0, e.states = ["Alabama", "Alaska", "Arizona", "Arkansas", "California", "Colorado", "Connecticut", "Delaware", "Florida", "Georgia", "Hawaii", "Idaho", "Illinois", "Indiana", "Iowa", "Kansas", "Kentucky", "Louisiana", "Maine", "Maryland", "Massachusetts", "Michigan", "Minnesota", "Mississippi", "Missouri", "Montana", "Nebraska", "Nevada", "New Hampshire", "New Jersey", "New Mexico", "New York", "North Dakota", "North Carolina", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Rhode Island", "South Carolina", "South Dakota", "Tennessee", "Texas", "Utah", "Vermont", "Virginia", "Washington", "West Virginia", "Wisconsin", "Wyoming"]
- }
- function c(e) {
- e.rate = 7, e.max = 10, e.isReadonly = !1, e.hoveringOver = function(a) {
- return e.overStar = a, e.percent = 100 * (a / e.max)
- }, e.ratingStates = [{
- stateOn: "glyphicon-ok-sign",
- stateOff: "glyphicon-ok-circle"
- }, {
- stateOn: "glyphicon-star",
- stateOff: "glyphicon-star-empty"
- }, {
- stateOn: "glyphicon-heart",
- stateOff: "glyphicon-ban-circle"
- }, {
- stateOn: "glyphicon-heart"
- }, {
- stateOff: "glyphicon-off"
- }]
- }
- angular.module("app.ui.form").controller("InputCtrl", ["$scope", e]).controller("CheckboxCtrl", ["$scope", a]).controller("RadioCtrl", ["$scope", t]).controller("FormCtrl", ["$scope", o]).controller("MaterialAutocompleteCtrl", ["$scope", "$timeout", "$q", "$log", r]).controller("MaterialDatepickerCtrl", ["$scope", n]).controller("DatepickerDemoCtrl", ["$scope", i]).controller("TimepickerDemoCtrl", ["$scope", s]).controller("TypeaheadCtrl", ["$scope", l]).controller("RatingDemoCtrl", ["$scope", c])
- }(),
- function() {
- "use strict";
- function e() {
- return {
- restrict: "A",
- link: function(e, a) {
- a.slider()
- }
- }
- }
- function a() {
- return {
- restrict: "A",
- compile: function(e, a) {
- return e.addClass("ui-spinner"), {
- post: function() {
- e.spinner()
- }
- }
- }
- }
- }
- function t() {
- return {
- restrict: "A",
- link: function(e, a) {
- a.steps()
- }
- }
- }
- angular.module("app.ui.form").directive("uiRangeSlider", e).directive("uiSpinner", a).directive("uiWizardForm", t)
- }(),
- function() {
- "use strict";
- function e(e) {
- var a;
- e.form = {
- required: "",
- minlength: "",
- maxlength: "",
- length_rage: "",
- type_something: "",
- confirm_type: "",
- foo: "",
- email: "",
- url: "",
- num: "",
- minVal: "",
- maxVal: "",
- valRange: "",
- pattern: ""
- }, a = angular.copy(e.form), e.revert = function() {
- return e.form = angular.copy(a), e.form_constraints.$setPristine()
- }, e.canRevert = function() {
- return !angular.equals(e.form, a) || !e.form_constraints.$pristine
- }, e.canSubmit = function() {
- return e.form_constraints.$valid && !angular.equals(e.form, a)
- }, e.submitForm = function() {
- return e.showInfoOnSubmit = !0, e.revert()
- }
- }
- function a(e) {
- var a;
- e.user = {
- email: "",
- passowrd: ""
- }, a = angular.copy(e.user), e.revert = function() {
- e.user = angular.copy(a), e.materialLoginForm.$setPristine(), e.materialLoginForm.$setUntouched()
- }, e.canRevert = function() {
- return !angular.equals(e.user, a) || !e.materialLoginForm.$pristine
- }, e.canSubmit = function() {
- return e.materialLoginForm.$valid && !angular.equals(e.user, a)
- }, e.submitForm = function() {
- return e.showInfoOnSubmit = !0, e.revert()
- }
- }
- function t(e) {
- var a;
- e.user = {
- name: "",
- email: "",
- passowrd: ""
- }, a = angular.copy(e.user), e.revert = function() {
- e.user = angular.copy(a), e.materialSignUpForm.$setPristine(), e.materialSignUpForm.$setUntouched()
- }, e.canRevert = function() {
- return !angular.equals(e.user, a) || !e.materialSignUpForm.$pristine
- }, e.canSubmit = function() {
- return e.materialSignUpForm.$valid && !angular.equals(e.user, a)
- }, e.submitForm = function() {
- return e.showInfoOnSubmit = !0, e.revert()
- }
- }
- function o(e) {
- var a;
- e.user = {
- email: "",
- password: ""
- }, e.showInfoOnSubmit = !1, a = angular.copy(e.user), e.revert = function() {
- return e.user = angular.copy(a), e.form_signin.$setPristine()
- }, e.canRevert = function() {
- return !angular.equals(e.user, a) || !e.form_signin.$pristine
- }, e.canSubmit = function() {
- return e.form_signin.$valid && !angular.equals(e.user, a)
- }, e.submitForm = function() {
- return e.showInfoOnSubmit = !0, e.revert()
- }
- }
- function r(e) {
- var a;
- e.user = {
- name: "",
- email: "",
- password: "",
- confirmPassword: "",
- age: ""
- }, e.showInfoOnSubmit = !1, a = angular.copy(e.user), e.revert = function() {
- return e.user = angular.copy(a), e.form_signup.$setPristine(), e.form_signup.confirmPassword.$setPristine()
- }, e.canRevert = function() {
- return !angular.equals(e.user, a) || !e.form_signup.$pristine
- }, e.canSubmit = function() {
- return e.form_signup.$valid && !angular.equals(e.user, a)
- }, e.submitForm = function() {
- return e.showInfoOnSubmit = !0, e.revert()
- }
- }
- angular.module("app.ui.form.validation").controller("FormConstraintsCtrl", ["$scope", e]).controller("MaterialLoginCtrl", ["$scope", a]).controller("MaterialSignUpCtrl", ["$scope", t]).controller("SigninCtrl", ["$scope", o]).controller("SignupCtrl", ["$scope", r])
- }(),
- function() {
- "use strict";
- function e(e, a, t, o, r, n) {
- e.isDisabled = !1, e.selectedItem = null, e.searchText = "", e.searchResults = [], e.lastSearchVal = "", e.userDetails = a.globals.userDetails, e.profileImage = e.userDetails ? e.userDetails.ProfileImageUrl : "images/generic-profile.png", e.querySearch = function(o) {
- if (o.length > 2 && o != e.lastSearchVal) {
- var r = [];
- if (0 === o.indexOf("PROJ")) {
- var i = o.slice(4, o.length);
- r.push(t.buildFilter("Id", null, "is", i))
- } else r.push(t.buildFilter("Name", null, "contains", o));
- var s = n.post("https://api.l6elite.com", t.buildRequest("get", ["projects"], null, [r])).then(function(e) {
- return a.$broadcast("preloader:hide"), e.data
- }, function(e) {
- return a.$broadcast("preloader:hide"), []
- });
- return s
- }
- }, a.$on("$userDetailPopulated", function(t) {
- e.userDetails = a.globals.userDetails, e.profileImage = e.userDetails ? e.userDetails.ProfileImageUrl : "images/generic-profile.png"
- }), e.selectedItemChange = function(e) {
- e && o.path("/project/" + e.Id)
- }
- }
- angular.module("app.layout").controller("L6HeaderCtrl", ["$scope", "$rootScope", "DataSyncService", "$location", "$timeout", "$http", e])
- }(),
- function() {
- "use strict";
- function e(e) {
- return {
- restrict: "A",
- template: '<span class="bar"></span>',
- link: function(e, a, t) {
- a.addClass("preloaderbar hide"), e.$on("$stateChangeStart", function(e) {
- a.removeClass("hide").addClass("active")
- }), e.$on("$stateChangeSuccess", function(e, t, o, r) {
- e.targetScope.$watch("$viewContentLoaded", function() {
- a.addClass("hide").removeClass("active")
- })
- }), e.$on("preloader:active", function(e) {
- a.removeClass("hide").addClass("active")
- }), e.$on("preloader:hide", function(e) {
- a.addClass("hide").removeClass("active")
- })
- }
- }
- }
- angular.module("app.layout").directive("uiPreloader", ["$rootScope", e])
- }(),
- function() {
- function e() {
- $("#loader-container").fadeOut("slow")
- }
- $(window).load(function() {
- setTimeout(e, 1e3)
- })
- }(),
- function() {
- "use strict";
- function e(e) {
- function a(a, t, o) {
- var r;
- r = $("#app"), t.on("click", function(a) {
- return r.hasClass("nav-collapsed-min") ? r.removeClass("nav-collapsed-min") : (r.addClass("nav-collapsed-min"), e.$broadcast("nav:reset")), a.preventDefault()
- })
- }
- var t = {
- restrict: "A",
- link: a
- };
- return t
- }
- function a() {
- function e(e, a, t) {
- var o, r, n, i, s, l, c, u, d, p, h;
- p = 250, c = $(window), i = a.find("ul").parent("li"), i.append('<i class="fa fa-angle-down icon-has-ul-h"></i>'), o = i.children("a"), o.append('<i class="fa fa-angle-down icon-has-ul"></i>'), s = a.children("li").not(i), r = s.children("a"), n = $("#app"), l = $("#nav-container"), o.on("click", function(e) {
- var a, t;
- return n.hasClass("nav-collapsed-min") || l.hasClass("nav-horizontal") && c.width() >= 768 ? !1 : (t = $(this), a = t.parent("li"), i.not(a).removeClass("open").find("ul").slideUp(p), a.toggleClass("open").find("ul").stop().slideToggle(p), void e.preventDefault())
- }), r.on("click", function(e) {
- i.removeClass("open").find("ul").slideUp(p)
- }), e.$on("nav:reset", function(e) {
- i.removeClass("open").find("ul").slideUp(p)
- }), u = void 0, d = c.width(), h = function() {
- var e;
- e = c.width(), 768 > e && n.removeClass("nav-collapsed-min"), 768 > d && e >= 768 && l.hasClass("nav-horizontal") && i.removeClass("open").find("ul").slideUp(p), d = e
- }, c.resize(function() {
- var e;
- clearTimeout(e), e = setTimeout(h, 300)
- })
- }
- var a = {
- restrict: "A",
- link: e
- };
- return a
- }
- function t() {
- function e(e, a, t, o) {
- var r, n, i;
- n = a.find("a"), i = function() {
- return o.path()
- }, r = function(e, a) {
- return a = "#" + a, angular.forEach(e, function(e) {
- var t, o, r;
- return o = angular.element(e), t = o.parent("li"), r = o.attr("href"), t.hasClass("active") && t.removeClass("active"), 0 === a.indexOf(r) ? t.addClass("active") : void 0
- })
- }, r(n, o.path()), e.$watch(i, function(e, a) {
- return e !== a ? r(n, o.path()) : void 0
- })
- }
- var a = {
- restrict: "A",
- controller: ["$scope", "$element", "$attrs", "$location", e]
- };
- return a
- }
- function o() {
- function e(e, a, t) {
- a.on("click", function() {
- return $("#app").toggleClass("on-canvas")
- })
- }
- var a = {
- restrict: "A",
- link: e
- };
- return a
- }
- angular.module("app.layout").directive("toggleNavCollapsedMin", ["$rootScope", e]).directive("collapseNav", a).directive("highlightActive", t).directive("toggleOffCanvas", o)
- }(),
- function() {
- "use strict";
- function e(e) {
- var a;
- e.worldMap = {}, a = [{
- latLng: [40.71, -74],
- name: "New York"
- }, {
- latLng: [39.9, 116.4],
- name: "Beijing"
- }, {
- latLng: [31.23, 121.47],
- name: "Shanghai"
- }, {
- latLng: [-33.86, 151.2],
- name: "Sydney"
- }, {
- latLng: [-37.81, 144.96],
- name: "Melboune"
- }, {
- latLng: [37.33, -121.89],
- name: "San Jose"
- }, {
- latLng: [1.3, 103.8],
- name: "Singapore"
- }, {
- latLng: [47.6, -122.33],
- name: "Seattle"
- }, {
- latLng: [41.87, -87.62],
- name: "Chicago"
- }, {
- latLng: [37.77, -122.41],
- name: "San Francisco"
- }, {
- latLng: [32.71, -117.16],
- name: "San Diego"
- }, {
- latLng: [51.5, -.12],
- name: "London"
- }, {
- latLng: [48.85, 2.35],
- name: "Paris"
- }, {
- latLng: [52.52, 13.4],
- name: "Berlin"
- }, {
- latLng: [-26.2, 28.04],
- name: "Johannesburg"
- }, {
- latLng: [35.68, 139.69],
- name: "Tokyo"
- }, {
- latLng: [13.72, 100.52],
- name: "Bangkok"
- }, {
- latLng: [37.56, 126.97],
- name: "Seoul"
- }, {
- latLng: [41.87, 12.48],
- name: "Roma"
- }, {
- latLng: [45.42, -75.69],
- name: "Ottawa"
- }, {
- latLng: [55.75, 37.61],
- name: "Moscow"
- }, {
- latLng: [-22.9, -43.19],
- name: "Rio de Janeiro"
- }], e.worldMap = {
- map: "world_mill_en",
- markers: a,
- normalizeFunction: "polynomial",
- backgroundColor: null,
- zoomOnScroll: !1,
- regionStyle: {
- initial: {
- fill: "#EEEFF3"
- },
- hover: {
- fill: e.color.primary
- }
- },
- markerStyle: {
- initial: {
- fill: "#BF616A",
- stroke: "rgba(191,97,106,.8)",
- "fill-opacity": 1,
- "stroke-width": 9,
- "stroke-opacity": .5
- },
- hover: {
- stroke: "black",
- "stroke-width": 2
- }
- }
- }
- }
- angular.module("app.ui.map").controller("jvectormapCtrl", ["$scope", e])
- }(),
- function() {
- "use strict";
- function e() {
- return {
- restrict: "A",
- scope: {
- options: "="
- },
- link: function(e, a, t) {
- var o;
- o = e.options, a.vectorMap(o)
- }
- }
- }
- angular.module("app.ui.map").directive("uiJvectormap", e)
- }(),
- function() {
- "use strict";
- function e(e, a) {
- var t, o, r;
- e.printInvoice = function() {
- t = document.getElementById("invoice").innerHTML, o = document.body.innerHTML, r = window.open(), r.document.open(), r.document.write('<html><head><link rel="stylesheet" type="text/css" href="styles/main.css" /></head><body onload="window.print()">' + t + "</html>"), r.document.close()
- }
- }
- function a(e, a, t, o, r, n, i, s, l, c) {
- e.loginError = !1, e.email = "", e.password = "", e.showEULA = function(a) {
- var s = c.confirm().title("EULA").content('<p class="lead">By accessing this demo and clicking the "I Agree" button below, you are acknowledging and accepting the terms of the following End User License Agreement:</p><div style="max-height:300px;overflow:auto"><p>L6 Elite is protected by copyright laws and international copyright treaties, as well as other intellectual property laws and treaties. L6 Elite is licensed, not sold.</p> <h4>End User License Agreement</h4> <p>This End User License Agreement ("EULA") is a legal agreement between you (either an individual or a single entity) and Wallace & Associates with regard to the copyrighted Software L6 Elite (herein referred to as "SOFTWARE PRODUCT" or "SOFTWARE") provided with this EULA.</p> <p>The SOFTWARE PRODUCT includes computer software, the associated media, any printed materials, and any "online" or electronic documentation. Use of any software and related documentation ("Software") provided to you by Wallace & Associates in whatever form or media, will constitute your acceptance of these terms, unless separate terms are provided by the software supplier, in which case certain additional or different terms may apply.</p><p>If you do not agree with the terms of this EULA, do not download, install, copy or use the Software. By installing, copying or otherwise using the SOFTWARE PRODUCT, you agree to be bound by the terms of this EULA. If you do not agree to the terms of this EULA, Wallace & Associates is unwilling to license the SOFTWARE PRODUCT to you.</p><p>1. <b>Eligible Licensees</b>. This Software is available for license solely to SOFTWARE owners, with no right of duplication or further distribution, licensing, or sub-licensing. IF YOU DO NOT OWN THE SOFTWARE OR DO NOT HAVE EXPLICIT CONSENT BY WALLACE & ASSOCIATES TO ACCESS THE SOFTWARE, THEN DO NOT DOWNLOAD, INSTALL, COPY OR USE THE SOFTWARE.</p> <p>2. <b>License Grant</b>. Wallace & Associates grants to you a personal, non-transferable and non-exclusive right to use the copy of the Software provided with this EULA. You agree you will not copy the Software except as necessary to use it on a single computer. You agree that you may not copy the written materials accompanying the Software. Modifying, translating, renting, copying, transferring or assigning all or part of the Software, or any rights granted hereunder, to any other persons and removing any proprietary notices, labels or marks from the Software is strictly prohibited. Furthermore, you hereby agree not to create derivative works based on the Software. You may not transfer this Software.</p> <p>3. <b>Copyright</b>. The Software is licensed, not sold. You acknowledge that no title to the intellectual property in the Software is transferred to you. You further acknowledge that title and full ownership rights to the Software will remain the exclusive property of Wallace & Associates and/or its suppliers, and you will not acquire any rights to the Software, except as expressly set forth above. All copies of the Software will contain the same proprietary notices as contained in or on the Software. All title and copyrights in and to the SOFTWARE PRODUCT (including but not limited to any images, photographs, animations, video, audio, music, text and "applets," incorporated into the SOFTWARE PRODUCT), the accompanying printed materials, and any copies of the SOFTWARE PRODUCT, are owned by Wallace & Associates or its suppliers. The SOFTWARE PRODUCT is protected by copyright laws and international treaty provisions. You may not copy the printed materials accompanying the SOFTWARE PRODUCT.</p> <p>4. <b>Reverse Engineering</b>. You agree that you will not attempt, and if you are a corporation, you will use your best efforts to prevent your employees and contractors from attempting to reverse compile, modify, translate or disassemble the Software in whole or in part. Any failure to comply with the above or any other terms and conditions contained herein will result in the automatic termination of this license and the reversion of the rights granted hereunder to Wallace & Associates. </p><p>5. <b>Disclaimer of Warranty</b>. The Software is provided "AS IS" without warranty of any kind. Wallace & Associates and its suppliers disclaim and make no express or implied warranties and specifically disclaim the warranties of merchantability, fitness for a particular purpose and non-infringement of third-party rights. The entire risk as to the quality and performance of the Software is with you. Neither Wallace & Associates nor its suppliers warrant that the functions contained in the Software will meet your requirements or that the operation of the Software will be uninterrupted or error-free. Wallace & Associates IS NOT OBLIGATED TO PROVIDE ANY UPDATES TO THE SOFTWARE.</p> <p>6. <b>Limitation of Liability</b>. Wallace & Associates'
- entire liability and your exclusive remedy under this EULA shall not exceed the price paid
- for the Software,
- if any.In no event shall Wallace & Associates or its suppliers be liable to you
- for any consequential, special, incidental or indirect damages of any kind arising out of the use or inability to use the software, even
- if Wallace & Associates or its supplier has been advised of the possibility of such damages, or any claim by a third party. < /p><p>7. <b>Rental</b > .You may not loan, rent, or lease the SOFTWARE. < /p><p>8. <b>Upgrades</b > .If the SOFTWARE is an upgrade from an earlier release or previously released version, you now may use that upgraded product only in accordance with this EULA.If the SOFTWARE PRODUCT is an upgrade of a software program which you licensed as a single product, the SOFTWARE PRODUCT may be used only as part of that single product package and may not be separated
- for use on more than one computer. < /p> <p>9. <b>OEM Product Support</b > .Product support
- for the SOFTWARE PRODUCT IS provided by Wallace & Associates.For product support, please call Wallace & Associates.Should you have any questions concerning this, please refer to the address and contact information provided in the documentation. < /p> <p>10. <b>No Liability for Consequential Damages</b > .In no event shall Wallace & Associates or its suppliers be liable
- for any damages whatsoever(including, without limitation, incidental, direct, indirect special and consequential damages, damages
- for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use or inability to use this "Your Company"
- product, even
- if Wallace & Associates has been advised of the possibility of such damages.Because some states / countries do not allow the exclusion or limitation of liability
- for
- consequential or incidental damages, the above limitation may not apply to you. < /p> <p>11. <b>Indemnification By You</b > .If you distribute the Software in violation of this Agreement, you agree to indemnify, hold harmless and defend Wallace & Associates and its suppliers from and against any claims or lawsuits, including attorney 's fees that arise or result from the use or distribution of the Software in violation of this Agreement.</p><p style="max-height:300px;overflow:auto">').ariaLabel("EULA").ok("I Agree").cancel("I Disagree");
- c.show(s).then(function() {
- i.SetCredentials(e.email, e.password), n.globals.userDetails = a.data, r.put("globals", JSON.stringify(n.globals)), o(function() {
- t.path("/dashboard")
- }, 800)
- }, function() {
- window.location = "https://api.l6elite.com"
- })
- }, e.clearLoginError = function() {
- e.loginError = !1
- }, e.login = function() {
- return "" == e.email || "" == e.password || -1 == e.email.indexOf("l6elite") ? (e.loginError = "Either the email address or password provided are incorrect!", o(function() {
- e.clearLoginError()
- }, 5e3), !1) : (i.ClearCredentials(), void i.Login(e.email, e.password, function(a) {
- a.success ? e.showEULA(a) : (e.loginError = "Either the email address or password provided are incorrect!", o(function() {
- e.clearLoginError()
- }, 5e3))
- }))
- }, e.resetPassword = function() {
- deb
- return e.email ? void l.post("https://api.l6elite.com/passwordreset", {
- EmailAddress: e.email
- }, function(e) {
- e.success ? s.logSuccess("Password Successfully Reset! An Email Has Been Sent To The User!") : s.logError("An Error Occurred. Please Verify The Email Address Is Correct!")
- }) : (s.logError("Please Provide A Valid Email Address!"), !1)
- }, e.signup = function() {
- t.url("/")
- }, e.reset = function() {
- t.url("/")
- }, e.unlock = function() {
- t.url("/")
- }
- }
- function t(e, a, t, o, r, n, i, s, l) {
- e.loginError = !1, e.email = "", e.password = "", e.clearLoginError = function() {
- e.loginError = !1
- }, e.login = function() {
- return "" == e.email || "" == e.password ? (e.loginError = "Either the email address or password provided are incorrect!", o(function() {
- e.clearLoginError()
- }, 5e3), !1) : (i.ClearCredentials(), void i.Login(e.email, e.password, function(a) {
- a.success ? (i.SetCredentials(e.email, e.password), n.globals.userDetails = a.data, n.$broadcast("$userDetailPopulated", a.data), r.put("globals", JSON.stringify(n.globals)), t.path("/dashboard")) : (e.loginError = "Either the email address or password provided are incorrect!", o(function() {
- e.clearLoginError()
- }, 5e3))
- }))
- }, e.resetPassword = function() {
- return e.email ? void l.post("https://api.l6elite.com/passwordreset", {
- EmailAddress: e.email
- }, function(e) {
- e.success ? s.logSuccess("Password Successfully Reset! An Email Has Been Sent To The User!") : s.logError("An Error Occurred. Please Verify The Email Address Is Correct!")
- }) : (s.logError("Please Provide A Valid Email Address!"), !1)
- }, e.signup = function() {
- t.url("/")
- }, e.reset = function() {
- t.url("/")
- }, e.unlock = function() {
- t.url("/")
- }
- }
- function o(e, a, t, o, r, n, i, s, l) {
- e.currentUser = a.globals.userDetails, e.currentUserOrig = angular.copy(e.currentUser), e.passwordChange = {
- currentPassword: "",
- newPassword: "",
- confirmNewPassword: ""
- };
- var c;
- e.deleteProfileImage = function() {
- e.currentUser.ProfileImageUrl = "images/generic-profile.png"
- }, e.uploadFiles = function(a, t) {
- e.f = a, e.errFile = t && t[0], a && (a.upload = i.upload({
- url: "https://api.l6elite.com/imageupload",
- data: {
- file: a
- }
- }), a.upload.then(function(t) {
- a.result = t.data, e.currentUser.ProfileImageUrl = t.data
- }, function(e) {
- e.status > 0 && r.logError(e.status + ": " + e.data)
- }, function(e) {
- a.progress = Math.min(100, parseInt(100 * e.loaded / e.total))
- }))
- }, e.changePassword = function() {
- c = s.open({
- templateUrl: "passwordeditor.html",
- scope: e,
- size: "md",
- controller: ["$scope", "$uibModalInstance", function(e, a) {
- e.closeModal = function() {
- a.dismiss("cancel")
- }
- }]
- })
- }, e.submitPasswordChange = function() {
- if (!e.passwordChange.newPassword) return r.logError("Please Provide A New Password!"), !1;
- if (!e.passwordChange.confirmNewPassword) return r.logError("Please Confirm Your New Password!"), !1;
- if (e.passwordChange.newPassword !== e.passwordChange.confirmNewPassword) return r.logError("Your New Password and Confirmation Do Not Match!"), !1;
- var a = o.buildFilter("Id", null, "is", e.currentUser.Id),
- t = {
- Password: e.passwordChange.newPassword,
- CurrentPassword: e.passwordChange.currentPassword
- };
- o.sync(o.buildRequest("update", ["users"], null, [a], [t]), function(a) {
- a.success ? (r.logSuccess("Password Successfully Updated!"), l.UpdateCredentials(e.currentUser.EmailAddress, e.passwordChange.newPassword), e.passwordChange = {
- currentPassword: "",
- newPassword: "",
- confirmNewPassword: ""
- }, c.dismiss("cancel")) : r.logError("Unable To Change Password! Check That The Current Password Is Correct!")
- })
- }, e.saveUserProfile = function() {
- if (!angular.equals(e.currentUser, e.currentUserOrig)) {
- if (!e.currentUser.EmailAddress || e.profileForm.EmailAddress.$invalid) return r.logError("Please Provide A Valid Email Address!"), !1;
- var i = angular.copy(e.currentUser),
- s = o.buildFilter("Id", null, "is", e.currentUser.Id);
- delete i.IsLoggedIn, delete i.LastLogin, delete i.LastUpdated, delete i.DateTimeCreated, delete i.CreatedBy, delete i.ClientId, delete i.Status, delete i.AccessLevelId, delete i.TimeZone, delete i.Id, o.sync(o.buildRequest("update", ["users"], null, [s], [i]), function(o) {
- o.success ? (r.logSuccess("User Profile Successfully Saved!"), e.currentUser.EmailAddress != e.currentUserOrig.EmailAddress && (l.ClearCredentials(), t.path("/login")), e.currentUserOrig = angular.copy(e.currentUser), a.globals.userDetails = e.currentUser, n.put("globals", JSON.stringify(a.globals))) : r.logError(o.data[0])
- })
- }
- }
- }
- angular.module("app.page").controller("invoiceCtrl", ["$scope", "$window", e]).controller("authCtrl", ["$scope", "$window", "$location", "$timeout", "$cookies", "$rootScope", "AuthenticationService", "logger", "DataSyncService", t]).controller("demoAuthCtrl", ["$scope", "$window", "$location", "$timeout", "$cookies", "$rootScope", "AuthenticationService", "logger", "DataSyncService", "$mdDialog", a]).controller("ProfileCtrl", ["$scope", "$rootScope", "$location", "DataSyncService", "logger", "$cookies", "Upload", "$uibModal", "AuthenticationService", o])
- }(),
- function() {
- "use strict";
- function e() {
- function e(e, a, t) {
- var o, r;
- r = function() {
- return t.path()
- }, o = function(e) {
- switch (a.removeClass("body-wide body-err body-lock body-auth"), e) {
- case "/404":
- case "/page/404":
- case "/page/500":
- return a.addClass("body-wide body-err");
- case "/page/signin":
- case "/page/signup":
- case "/page/forgot-password":
- return a.addClass("body-wide body-auth");
- case "/page/lock-screen":
- return a.addClass("body-wide body-lock")
- }
- }, o(t.path()), e.$watch(r, function(e, a) {
- return e !== a ? o(t.path()) : void 0
- })
- }
- var a = {
- restrict: "A",
- controller: ["$scope", "$element", "$location", e]
- };
- return a
- }
- angular.module("app.page").directive("customPage", e)
- }(),
- function() {
- "use strict";
- function e(e, a, t, o, r, n, i, s) {
- console.log("Project Controller Instantiated"), a.currentProject = {}, e.projectId = t.pid, e.projectDetail = {
- Name: ""
- }, o.loadProject(e.projectId, function(t) {
- t.success ? (e.projectDetail = a.currentProject, e.phaseData = a.phaseData) : r.path("/dashboard")
- }), e.deleteProject = function() {
- i.show(i.confirm().title("Delete This Project?").content("Are you positive you would like to delete this project? It will be gone forever! You can archive it instead if you still want to have the ability to search for it in the future!").ariaLabel("Confirm Deletion").ok("Get Rid Of It!").cancel("Wait! Keep it!")).then(function() {
- var a = [];
- a.push(o.buildFilter("Id", null, "is", e.projectDetail.Id)), o.sync(o.buildRequest("delete", ["projects"], null, [a]), function(e) {
- e.success ? (n.logSuccess("Project Succesfully Deleted!"), r.path("/dashboard")) : n.logError("An Error Occurred While Deleting The Project")
- })
- })
- }, e.archiveProject = function() {
- i.show(i.confirm().title("Archive This Project?").content("Are you sure you would like to archive this project? You can search for it in the search bar or in your project history later if needed.").ariaLabel("Confirm Archive").ok("Archive It!").cancel("Wait! Keep it!")).then(function() {
- var a = [],
- t = {
- Status: "complete"
- };
- a.push(o.buildFilter("Id", null, "is", e.projectDetail.Id)), o.sync(o.buildRequest("update", ["projects"], null, [a], [t]), function(e) {
- e.success ? (n.logSuccess("Project Succesfully Archived!"), r.path("/dashboard")) : n.logError("An Error Occurred While Archiving The Project")
- })
- })
- }, e.reOpenProject = function() {
- var a = [],
- t = {
- Status: "active"
- };
- a.push(o.buildFilter("Id", null, "is", e.projectDetail.Id)), o.sync(o.buildRequest("update", ["projects"], null, [a], [t]), function(e) {
- e.success ? (n.logSuccess("Project Succesfully Re-Opened!"), s.reload()) : n.logError("An Error Occurred While Attempting To Re-Open The Project")
- })
- }
- }
- function a(e, a, t, o, r, n, i, s) {
- function l(a) {
- e.currentStep = a;
- var t = $(e.steps[a]);
- $(t).show(), $("body").animate({
- scrollTop: t.offset().top - 260
- }, "slow")
- }
- function c(a) {
- return Boolean(e.steps[a])
- }
- e.steps = [], $("#next_link").show(), e.currentStep = 0, e.diagramOpts = ["", "SIPOC", "Value Stream Diagram"], angular.forEach(document.querySelectorAll(".l6_step"), function(a, t) {
- e.steps.push(a), $(a).attr("data-step", t), t > 0 && !$(a).hasClass("l6_spacer") && $(a).hide()
- }), e.nextStep = function() {
- c(e.currentStep + 1) && l(e.currentStep + 1), c(e.currentStep + 2) || $("#next_link").hide()
- }, e.prevStep = function() {
- c(e.currentStep - 1) && l(e.currentStep - 1)
- }, e.validateField = function(a) {
- var t = $(a.currentTarget).closest(".l6_step").attr("data-step"),
- o = $(a.currentTarget).closest(".l6_step").attr("data-step-required"),
- r = !0;
- if (o) {
- o = o.split(",");
- for (var n = 0; o && n < o.length; n++)
- if (o[n].indexOf(".")) {
- for (var i = o[n].split("."), s = e.projectCharter, l = 0; i && l < i.length; l++) s = s[i[l]];
- s || (r = !1)
- } else e.projectCharter[o[n]] || (r = !1)
- }
- return e.currentStep = parseInt(t), "" !== a.currentTarget.value && r ? void e.nextStep() : !1
- }, e.projectCharter = loadCharter(), e.openCalendar = function(a) {
- e.projectCharter[a].status.opened = !0
- }, o.loadContacts(function(a) {
- e.allContacts = a, e.projectCharter.Lead = populateMdContactVariable([e.currentProject.Lead], e.allContacts), e.projectCharter.Sponsor = populateMdContactVariable([e.currentProject.Sponsor], e.allContacts), e.projectCharter.CoreTeam = populateMdContactVariable([e.currentProject.CoreTeam], e.allContacts)
- }), e.querySearch = function(a) {
- var t = a ? e.allContacts.filter(e.createFilterFor(a)) : [];
- return t
- }, e.createFilterFor = function(e) {
- var a = angular.lowercase(e);
- return function(e) {
- return -1 !== e._lowername.indexOf(a)
- }
- }, e.buildProject = function() {
- saveCharter(e.projectCharter, "add", o, i, function(e) {
- n.path("/define/" + e.Id + "/1")
- })
- }, e.skipWalkthrough = function() {
- var a = s.confirm().title("Diagram Type").content("What diagram would you like to use for this project?").ariaLabel("Diagram type").ok("Value Stream Diagram").cancel("SIPOC");
- s.show(a).then(function() {
- e.projectCharter.DiagramType = "Value Stream Diagram", saveCharter(e.projectCharter, "add", o, i, function(e) {
- n.path("/define/" + e.Id + "/1")
- })
- }, function() {
- e.projectCharter.DiagramType = "SIPOC", saveCharter(e.projectCharter, "add", o, i, function(e) {
- n.path("/define/" + e.Id + "/1")
- })
- })
- }, e.filterSelected = !0
- }
- function t(e, a, t, o, r, n, i, s) {
- e.allContacts = [], e.selectedUsers = [], e.accessLevels = [], e.userToastShown = !1, e.selectedUser = {}, e.selectedAccessLevel = {}, e.selectedAccessLevelOptions = [], e.accessleveloptions = [], e.dSchema = {
- EmailAddress: "",
- FirstName: "",
- LastName: "",
- WorkTitle: "",
- ProfileImageUrl: "",
- Phone: "",
- City: "",
- State: "",
- Zip: ""
- }, t.getAllAccessLevels(function(a) {
- a.success && (e.accessLevels = a.data)
- }), t.sync(t.buildRequest("get", ["accessleveloptions"]), function(a) {
- a.success && (e.accessLevelOptions = a.data)
- }), e.resetPassword = function() {
- t.post("https://api.l6elite.com/passwordreset", {
- EmailAddress: e.selectedUser.EmailAddress
- }, function(e) {
- e.success ? r.logSuccess("Password Successfully Reset! User Notified!") : r.logError("An Error Occurred. Please Verify The Email Address Is Correct!")
- })
- }, e.checkSelectedUsers = function(a) {
- -1 != e.selectedUsers.indexOf(a.id) ? e.selectedUsers.splice(e.selectedUsers.indexOf(a.id), 1) : e.selectedUsers.push(a.id), e.selectedUsers.length > 0 && !e.userToastShown ? (n.show({
- controller: "UserManagementCtrl",
- templateUrl: "user-selected-toast.html",
- hideDelay: !1,
- position: "top right"
- }), e.userToastShown = !0) : e.selectedUsers.length < 1 && (e.userToastShown = !1)
- }, e.showUserEditor = function(a) {
- if (a) {
- e.selectedUser.ReportsTo = null;
- var o = [t.buildFilter("Id", null, "is", a)];
- t.sync(t.buildRequest("get", ["users"], null, o), function(a) {
- if (a.success) {
- e.selectedUser = a.data[0], "" == e.selectedUser.ProfileImageUrl && (e.selectedUser.ProfileImageUrl = "images/generic-profile.png");
- i.open({
- templateUrl: "usereditor.html",
- scope: e,
- size: "lg",
- controller: ["$scope", "$uibModalInstance", function(e, a) {
- e.closeModal = function() {
- a.dismiss("cancel")
- }
- }]
- })
- }
- })
- } else {
- i.open({
- templateUrl: "usereditor.html",
- scope: e,
- size: "lg",
- controller: ["$scope", "$uibModalInstance", function(e, a) {
- e.closeModal = function() {
- a.dismiss("cancel")
- }
- }]
- })
- }
- }, e.deleteProfileImage = function() {
- e.selectedUser.ProfileImageUrl = "images/generic-profile.png"
- }, e.uploadFiles = function(a, t) {
- e.f = a, e.errFile = t && t[0], a && (a.upload = s.upload({
- url: "https://api.l6elite.com/imageupload",
- data: {
- file: a
- }
- }), a.upload.then(function(t) {
- a.result = t.data, e.selectedUser.ProfileImageUrl = t.data
- }, function(e) {
- e.status > 0 && r.logError(e.status + ": " + e.data)
- }, function(e) {
- a.progress = Math.min(100, parseInt(100 * e.loaded / e.total))
- }))
- }, e.loadNewUser = function() {
- e.selectedUser = {}, e.selectedUser.ProfileImageUrl = "images/generic-profile.png", e.showUserEditor()
- }, e.submitUser = function() {
- console.log(e.selectedUser)
- }, e.closeToast = function() {
- n.hide()
- }, e.userData = angular.copy(e.dSchema), t.loadContacts(function(a) {
- e.allContacts = a
- }), e.submitUser = function() {
- var a = "add",
- o = null;
- e.selectedUser.Id && (a = "update", o = [t.buildFilter("Id", null, "is", e.selectedUser.Id)]), "" == e.selectedUser.ReportsTo && (e.selectedUser.ReportsTo = null), delete e.selectedUser.DateCreated, delete e.selectedUser.LastUpdated, t.sync(t.buildRequest(a, ["users"], null, o, [e.selectedUser]), function(o) {
- o.success ? (r.logSuccess("add" == a ? "User Successfully Added!" : "User Successfully Updated!"), t.loadContacts(function(a) {
- e.allContacts = a
- }, !0)) : r.logError(o.error || "An error occurred while saving the user! Try again!")
- })
- }, e.addUser = function() {
- var o = [];
- o.push(e.userData), t.sync(t.buildRequest("add", ["users"], null, null, o), function(t) {
- if (t.success) {
- var o = t.data;
- a.contactList.contacts.push({
- name: o.FirstName + " " + o.LastName,
- email: o.EmailAddress,
- image: o.ProfileImageUrl,
- _lowername: (o.FirstName + o.LastName).toLowerCase(),
- id: o.Id
- }), e.userData = angular.copy(e.dSchema)
- } else r.logError(t.data[0])
- })
- }, e.editAccessLevel = function(a) {
- e.selectedAccessLevel = a, e.selectedAccessLevel.selectedOptions = [], console.log(e.accessLevelOptions), console.log(e.selectedAccessLevel);
- for (var t = 0; t < e.accessLevelOptions.length; t++)
- for (var o = 0; a.Details && o < a.Details.length; o++) parseInt(a.Details[o].AccessLevelOptionId) === parseInt(e.accessLevelOptions[t].Id) && e.selectedAccessLevel.selectedOptions.push(e.accessLevelOptions[t]);
- i.open({
- templateUrl: "accessleveleditor.html",
- scope: e,
- size: "md",
- controller: ["$scope", "$uibModalInstance", function(e, a) {
- e.closeModal = function() {
- a.dismiss("cancel")
- }
- }]
- })
- }, e.loadNewAccessLevel = function() {
- e.selectedAccessLevel = {
- ClientId: "",
- selectedOptions: []
- };
- i.open({
- templateUrl: "accessleveleditor.html",
- scope: e,
- size: "md",
- controller: ["$scope", "$uibModalInstance", function(e, a) {
- e.closeModal = function() {
- a.dismiss("cancel")
- }
- }]
- })
- }, e.submitAccessLevel = function() {
- var a = (angular.copy(e.selectedAccessLevel.selectedAccessLevelOptions), angular.copy(e.selectedAccessLevel)),
- o = "add",
- n = null;
- if (e.selectedAccessLevel.Id && (o = "update"), "update" == o) {
- if (e.selectedAccessLevel.Details) {
- for (var i = [], s = 0; s < e.selectedAccessLevel.Details.length; s++) i.push(e.selectedAccessLevel.Details[s].Id);
- n = [t.buildFilter("Id", null, "anyof", i)], t.sync(t.buildRequest("delete", ["accessleveldetails"], null, n), function(e) {
- console.log("DELETE DETAILS RESPONSE"), console.log(e)
- })
- }
- n = [t.buildFilter("Id", null, "is", e.selectedAccessLevel.Id)]
- }
- delete a.selectedOptions, delete a.Details, delete a.DateTimeCreated, delete a.LastUpdated, delete a.ClientId, t.sync(t.buildRequest(o, ["accesslevels"], null, n, [a]), function(n) {
- if (n.success)
- if ("update" == o && (n.data = {
- Id: a.Id
- }), e.selectedAccessLevel.selectedOptions) {
- for (var i = [], s = [], l = 0; l < e.selectedAccessLevel.selectedOptions.length; l++) {
- var c = {
- AccessLevelId: n.data.Id,
- AccessLevelOptionId: e.selectedAccessLevel.selectedOptions[l].Id
- };
- s.push("accessleveldetails"), i.push(c)
- }
- t.sync(t.buildRequest("add", s, null, null, i), function(a) {
- a.success && (t.getAllAccessLevels(function(a) {
- a.success && (e.accessLevels = a.data)
- }), r.logSuccess("Access Level Successfully Saved!"))
- })
- } else n.success && r.logSuccess("Access Level Successfully Saved!")
- })
- }, e.querySearch = function(a) {
- var t = a ? e.allContacts.filter(e.createFilterFor(a)) : [];
- return t
- }, e.createFilterFor = function(e) {
- var a = angular.lowercase(e);
- return function(e) {
- return -1 !== e._lowername.indexOf(a)
- }
- }, e.filterSelected = !0
- }
- function o(e, a, t, o, r, n) {
- function i(a) {
- $(svgEditor.loadFromString(a.Svg)), e.svgData = a, e.svgData.ProjectId = e.projectId, e.svgData.PhaseId = l.PhaseId, e.svgData.PhaseComponentId = l.Id
- }
- e.projectId = a.pid, e.process = a.process, e.processLower = e.process.toLowerCase(), e.tabRef = {
- define: 7,
- measure: 5,
- improve: 1,
- analyze: 3
- }, e.svgData = {}, t.shouldReloadSVGEditor && (t.shouldReloadSVGEditor = !1, window.location.reload());
- var s, l = {};
- o.loadProject(e.projectId, function(a) {
- a.success ? ("Analyze" == e.process ? (l = o.getPhaseComponentDetail(e.process, "Hypothesis Map"), s = [], s.push(o.buildFilter("ProjectId", null, "is", e.projectId)), s.push({
- ao: "and"
- }), s.push(o.buildFilter("PhaseId", null, "is", l.PhaseId)), s.push({
- andorsplit: "and"
- }), s.push(o.buildFilter("PhaseComponentId", null, "is", l.Id)), o.sync(o.buildRequest("get", ["valuestreamdiagram"], null, [s]), function(e) {
- $(svgEditor.init), e.success && i(e.data[0])
- })) : (l = o.getPhaseComponentDetail(e.process, "Value Stream Diagram"), s = [], s.push(o.buildFilter("ProjectId", null, "is", e.projectId)), s.push({
- ao: "and"
- }), s.push(o.buildFilter("PhaseId", null, "is", l.PhaseId)), s.push({
- andorsplit: "and"
- }), s.push(o.buildFilter("PhaseComponentId", null, "is", l.Id)), o.sync(o.buildRequest("get", ["valuestreamdiagram"], null, [s]), function(a) {
- if ($(svgEditor.init), a.success) i(a.data[0]);
- else if ("Define" !== e.process) {
- var t = o.getPhaseComponentDetail("Measure" === e.process ? "Define" : "Improve" === e.process ? "Measure" : "", "Value Stream Diagram");
- s = [], s.push(o.buildFilter("ProjectId", null, "is", e.projectId)), s.push({
- ao: "and"
- }), s.push(o.buildFilter("PhaseId", null, "is", t.PhaseId)), s.push({
- andorsplit: "and"
- }), s.push(o.buildFilter("PhaseComponentId", null, "is", t.Id)), o.sync(o.buildRequest("get", ["valuestreamdiagram"], null, [s]), function(a) {
- a.success ? (delete a.data[0].Id, i(a.data[0])) : "Measure" !== e.process && (t = o.getPhaseComponentDetail("Improve" === e.process ? "Define" : "", "Value Stream Diagram"), s = [], s.push(o.buildFilter("ProjectId", null, "is", e.projectId)), s.push({
- ao: "and"
- }), s.push(o.buildFilter("PhaseId", null, "is", t.PhaseId)), s.push({
- andorsplit: "and"
- }), s.push(o.buildFilter("PhaseComponentId", null, "is", t.Id)), o.sync(o.buildRequest("get", ["valuestreamdiagram"], null, [s]), function(e) {
- e.success && (delete e.data[0].Id, i(e.data[0]))
- }))
- })
- }
- })), t.shouldReloadSVGEditor = !0) : r.path("/dashboard")
- }), e.saveSVG = function() {
- var a = "Analyze" == e.process ? "Hypothesis Map" : "Value Stream Diagram",
- t = "Analyze" == e.process ? "analyzehypothesismap" : "valuestreamdiagram",
- r = $(svgEditor.canvas.getSvgString());
- if (r[0].outerHTML !== e.svgData.Svg) {
- e.svgData.Svg = r[0].outerHTML, l = o.getPhaseComponentDetail(e.process, a);
- var i = [],
- s = [],
- c = [],
- u = angular.copy(e.svgData);
- u.Id ? (delete u.DateTimeCreated, delete u.LastUpdated, i.push(u)) : (u.ProjectId = e.projectId, u.PhaseId = l.PhaseId, u.PhaseComponentId = l.Id, c.push(u)), o.syncTableRowData(t, c, i, s)
- } else n.logSuccess("Data Saved!")
- }
- }
- angular.module("app.project").controller("ProjectCtrl", ["$scope", "$rootScope", "$stateParams", "DataSyncService", "$location", "logger", "$mdDialog", "$state", e]).controller("ProjectNewCtrl", ["$scope", "$rootScope", "$stateParams", "DataSyncService", "$anchorScroll", "$location", "logger", "$mdDialog", a]).controller("SvgEditorCtrl", ["$scope", "$stateParams", "$rootScope", "DataSyncService", "$location", "logger", o]).controller("UserManagementCtrl", ["$scope", "$rootScope", "DataSyncService", "$location", "logger", "$mdToast", "$uibModal", "Upload", t])
- }(),
- function() {
- "use strict";
- function e() {
- var e = {};
- return e.cleanData = function(e) {
- for (var a = [], t = 0; e && t < e.length; t++) "" != e[t] && parseFloat(e[t]) && a.push(e[t]);
- return a
- }, e.calculateMean = function(e) {
- for (var a = 0, t = 0; e && t < e.length; t++) a += e[t];
- return Math.round(a / e.length * 1e5) / 1e5
- }, e.calculateVariance = function(e, a) {
- for (var t = 0, o = 0; e && o < e.length; o++) t += Math.pow(parseFloat(e[o]) - a, 2);
- return Math.round(t / (e.length - 1) * 1e5) / 1e5
- }, e.calculateStandardDeviation = function(e) {
- return Math.round(1e5 * Math.sqrt(e)) / 1e5
- }, e.calculatePopStandardDeviation = function(e, a) {
- return Math.round(1e5 * Math.sqrt(a / e.length)) / 1e5
- }, e.calculatePopVariance = function(e, a) {
- return Math.round(a / e.length * 1e5) / 1e5
- }, e.calculateStandardErrorMean = function(e) {
- var a = this.calculateMean(e),
- t = this.calculateStandardDeviation(this.calculateVariance(e, a));
- return Math.round(t / Math.sqrt(e.length)) / 1e5
- }, e.calculateTDistribution = function(e, a) {
- var t = this.calculateMean(e),
- o = this.calculateStandardDeviation(this.calculateVariance(e, t));
- return Math.round((t - a) / (o / Math.sqrt(e.length)) * 1e5) / 1e5
- }, e.calculateChiSquared = function(e, a) {
- for (var t = 0, o = 0; e && o < e.length; o++) t += Math.pow(a[o] - e[o], 2) / e[o]
- }, e.getChiSquaredDistribution = function() {
- return {
- p_vals: [.995, .99, .975, .95, .9, .75, .5, .25, .1, .05, .01],
- distribution: {
- 1: [0, 0, .001, .004, .016, 2.706, 3.841, 5.024, 6.635, 7.879],
- 2: [.01, .02, .051, .103, .211, 4.605, 5.991, 7.378, 9.21, 10.597],
- 3: [.072, .115, .216, .352, .584, 6.251, 7.815, 9.348, 11.345, 12.838],
- 4: [.207, .297, .484, .711, 1.064, 7.779, 9.488, 11.143, 13.277, 14.86],
- 5: [.412, .554, .831, 1.145, 1.61, 9.236, 11.07, 12.833, 15.086, 16.75],
- 6: [.676, .872, 1.237, 1.635, 2.204, 10.645, 12.592, 14.449, 16.812, 18.548],
- 7: [.989, 1.239, 1.69, 2.167, 2.833, 12.017, 14.067, 16.013, 18.475, 20.278],
- 8: [1.344, 1.646, 2.18, 2.733, 3.49, 13.362, 15.507, 17.535, 20.09, 21.955],
- 9: [1.735, 2.088, 2.7, 3.325, 4.168, 14.684, 16.919, 19.023, 21.666, 23.589],
- 10: [2.156, 2.558, 3.247, 3.94, 4.865, 15.987, 18.307, 20.483, 23.209, 25.188],
- 11: [2.603, 3.053, 3.816, 4.575, 5.578, 17.275, 19.675, 21.92, 24.725, 26.757],
- 12: [3.074, 3.571, 4.404, 5.226, 6.304, 18.549, 21.026, 23.337, 26.217, 28.3],
- 13: [3.565, 4.107, 5.009, 5.892, 7.042, 19.812, 22.362, 24.736, 27.688, 29.819],
- 14: [4.075, 4.66, 5.629, 6.571, 7.79, 21.064, 23.685, 26.119, 29.141, 31.319],
- 15: [4.601, 5.229, 6.262, 7.261, 8.547, 22.307, 24.996, 27.488, 30.578, 32.801],
- 16: [5.142, 5.812, 6.908, 7.962, 9.312, 23.542, 26.296, 28.845, 32, 34.267],
- 17: [5.697, 6.408, 7.564, 8.672, 10.085, 24.769, 27.587, 30.191, 33.409, 35.718],
- 18: [6.265, 7.015, 8.231, 9.39, 10.865, 25.989, 28.869, 31.526, 34.805, 37.156],
- 19: [6.844, 7.633, 8.907, 10.117, 11.651, 27.204, 30.144, 32.852, 36.191, 38.582],
- 20: [7.434, 8.26, 9.591, 10.851, 12.443, 28.412, 31.41, 34.17, 37.566, 39.997],
- 21: [8.034, 8.897, 10.283, 11.591, 13.24, 29.615, 32.671, 35.479, 38.932, 41.401],
- 22: [8.643, 9.542, 10.982, 12.338, 14.041, 30.813, 33.924, 36.781, 40.289, 42.796],
- 23: [9.26, 10.196, 11.689, 13.091, 14.848, 32.007, 35.172, 38.076, 41.638, 44.181],
- 24: [9.886, 10.856, 12.401, 13.848, 15.659, 33.196, 36.415, 39.364, 42.98, 45.559],
- 25: [10.52, 11.524, 13.12, 14.611, 16.473, 34.382, 37.652, 40.646, 44.314, 46.928],
- 26: [11.16, 12.198, 13.844, 15.379, 17.292, 35.563, 38.885, 41.923, 45.642, 48.29],
- 27: [11.808, 12.879, 14.573, 16.151, 18.114, 36.741, 40.113, 43.195, 46.963, 49.645],
- 28: [12.461, 13.565, 15.308, 16.928, 18.939, 37.916, 41.337, 44.461, 48.278, 50.993],
- 29: [13.121, 14.256, 16.047, 17.708, 19.768, 39.087, 42.557, 45.722, 49.588, 52.336],
- 30: [13.787, 14.953, 16.791, 18.493, 20.599, 40.256, 43.773, 46.979, 50.892, 53.672],
- 40: [20.707, 22.164, 24.433, 26.509, 29.051, 51.805, 55.758, 59.342, 63.691, 66.766],
- 50: [27.991, 29.707, 32.357, 34.764, 37.689, 63.167, 67.505, 71.42, 76.154, 79.49],
- 60: [35.534, 37.485, 40.482, 43.188, 46.459, 74.397, 79.082, 83.298, 88.379, 91.952],
- 70: [43.275, 45.442, 48.758, 51.739, 55.329, 85.527, 90.531, 95.023, 100.425, 104.215],
- 80: [51.172, 53.54, 57.153, 60.391, 64.278, 96.578, 101.879, 106.629, 112.329, 116.321],
- 90: [59.196, 61.754, 65.647, 69.126, 73.291, 107.565, 113.145, 118.136, 124.116, 128.299],
- 100: [67.328, 70.065, 74.222, 77.929, 82.358, 118.498, 124.342, 129.561, 135.807, 140.169]
- }
- }
- }, e.getPValue = function(e, a) {}, e
- }
- angular.module("app.core").factory("StatCalc", [e])
- }(),
- function() {
- "use strict";
- function e(e, a) {
- function t(a) {
- var t, o;
- return o = (a - 1) * e.numPerPage, t = o + e.numPerPage, e.currentPageStores = e.filteredStores.slice(o, t)
- }
- function o() {
- return e.select(1), e.currentPage = 1, e.row = ""
- }
- function r() {
- return e.select(1), e.currentPage = 1
- }
- function n() {
- return e.select(1), e.currentPage = 1
- }
- function i() {
- return e.filteredStores = a("filter")(e.stores, e.searchKeywords), e.onFilterChange()
- }
- function s(t) {
- return e.row !== t ? (e.row = t, e.filteredStores = a("orderBy")(e.stores, t), e.onOrderChange()) : void 0
- }
- var l;
- e.stores = [], e.searchKeywords = "", e.filteredStores = [], e.row = "", e.select = t, e.onFilterChange = o, e.onNumPerPageChange = r, e.onOrderChange = n, e.search = i, e.order = s, e.numPerPageOpt = [3, 5, 10, 20], e.numPerPage = e.numPerPageOpt[2], e.currentPage = 1, e.currentPage = [], e.stores = [{
- name: "Nijiya Market",
- price: "$$",
- sales: 292,
- rating: 4
- }, {
- name: "Eat On Monday Truck",
- price: "$",
- sales: 119,
- rating: 4.3
- }, {
- name: "Tea Era",
- price: "$",
- sales: 874,
- rating: 4
- }, {
- name: "Rogers Deli",
- price: "$",
- sales: 347,
- rating: 4.2
- }, {
- name: "MoBowl",
- price: "$$$",
- sales: 24,
- rating: 4.6
- }, {
- name: "The Milk Pail Market",
- price: "$",
- sales: 543,
- rating: 4.5
- }, {
- name: "Nob Hill Foods",
- price: "$$",
- sales: 874,
- rating: 4
- }, {
- name: "Scratch",
- price: "$$$",
- sales: 643,
- rating: 3.6
- }, {
- name: "Gochi Japanese Fusion Tapas",
- price: "$$$",
- sales: 56,
- rating: 4.1
- }, {
- name: "Cost Plus World Market",
- price: "$$",
- sales: 79,
- rating: 4
- }, {
- name: "Bumble Bee Health Foods",
- price: "$$",
- sales: 43,
- rating: 4.3
- }, {
- name: "Costco",
- price: "$$",
- sales: 219,
- rating: 3.6
- }, {
- name: "Red Rock Coffee Co",
- price: "$",
- sales: 765,
- rating: 4.1
- }, {
- name: "99 Ranch Market",
- price: "$",
- sales: 181,
- rating: 3.4
- }, {
- name: "Mi Pueblo Food Center",
- price: "$",
- sales: 78,
- rating: 4
- }, {
- name: "Cucina Venti",
- price: "$$",
- sales: 163,
- rating: 3.3
- }, {
- name: "Sufi Coffee Shop",
- price: "$",
- sales: 113,
- rating: 3.3
- }, {
- name: "Dana Street Roasting",
- price: "$",
- sales: 316,
- rating: 4.1
- }, {
- name: "Pearl Cafe",
- price: "$",
- sales: 173,
- rating: 3.4
- }, {
- name: "Posh Bagel",
- price: "$",
- sales: 140,
- rating: 4
- }, {
- name: "Artisan Wine Depot",
- price: "$$",
- sales: 26,
- rating: 4.1
- }, {
- name: "Hong Kong Chinese Bakery",
- price: "$",
- sales: 182,
- rating: 3.4
- }, {
- name: "Starbucks",
- price: "$$",
- sales: 97,
- rating: 3.7
- }, {
- name: "Tapioca Express",
- price: "$",
- sales: 301,
- rating: 3
- }, {
- name: "House of Bagels",
- price: "$",
- sales: 82,
- rating: 4.4
- }], (l = function() {
- return e.search(), e.select(e.currentPage)
- })()
- }
- angular.module("app.table").controller("TableCtrl", ["$scope", "$filter", e])
- }(),
- function() {
- "use strict";
- function e() {
- var e = this;
- e.readonly = !1, e.fruitNames = ["Apple", "Banana", "Orange"], e.roFruitNames = angular.copy(e.fruitNames), e.tags = [], e.vegObjs = [{
- name: "Broccoli",
- type: "Brassica"
- }, {
- name: "Cabbage",
- type: "Brassica"
- }, {
- name: "Carrot",
- type: "Umbelliferous"
- }], e.newVeg = function(e) {
- return {
- name: e,
- type: "unknown"
- }
- }
- }
- function a(e, a) {
- e.status = " ", e.showAlert = function(e) {
- a.show(a.alert().parent(angular.element(document.querySelector("#popupContainer"))).clickOutsideToClose(!0).title("This is an alert title").content("You can specify some description text in here.").ariaLabel("Alert Dialog Demo").ok("Got it!").targetEvent(e))
- }, e.showConfirm = function(t) {
- var o = a.confirm().title("Would you like to delete your debt?").content('All of the banks have agreed to <span class="debt-be-gone">forgive</span> you your debts.').ariaLabel("Lucky day").targetEvent(t).ok("Please do it!").cancel("Sounds like a scam");
- a.show(o).then(function() {
- e.status = "You decided to get rid of your debt."
- }, function() {
- e.status = "You decided to keep your debt."
- })
- }, e.showAdvanced = function(o) {
- a.show({
- controller: t,
- templateUrl: "dialog1.tmpl.html",
- parent: angular.element(document.body),
- targetEvent: o,
- clickOutsideToClose: !0
- }).then(function(a) {
- e.status = 'You said the information was "' + a + '".'
- }, function() {
- e.status = "You cancelled the dialog."
- })
- }, e.openOffscreen = function() {
- a.show(a.alert().clickOutsideToClose(!0).title("Opening from offscreen").content("Closing to offscreen").ariaLabel("Offscreen Demo").ok("Amazing!").openFrom({
- top: 50,
- width: 30,
- height: 80
- }).closeTo({
- left: 1500
- }))
- }
- }
- function t(e, a) {
- e.hide = function() {
- a.hide()
- }, e.cancel = function() {
- a.cancel()
- }, e.answer = function(e) {
- a.hide(e)
- }
- }
- function o(e, a) {
- var t = [{
- title: "One",
- content: "Tabs will become paginated if there isn't enough room for them."
- }, {
- title: "Two",
- content: "You can swipe left and right on a mobile device to change tabs."
- }, {
- title: "Three",
- content: "You can bind the selected tab via the selected attribute on the md-tabs element."
- }, {
- title: "Four",
- content: "If you set the selected tab binding to -1, it will leave no tab selected."
- }, {
- title: "Five",
- content: "If you remove a tab, it will try to select a new one."
- }, {
- title: "Six",
- content: "There's an ink bar that follows the selected tab, you can turn it off if you want."
- }, {
- title: "Seven",
- content: "If you set ng-disabled on a tab, it becomes unselectable. If the currently selected tab becomes disabled, it will try to select the next tab."
- }, {
- title: "Eight",
- content: "If you look at the source, you're using tabs to look at a demo for tabs. Recursion!"
- }, {
- title: "Nine",
- content: 'If you set md-theme="green" on the md-tabs element, you\'ll get green tabs.'
- }, {
- title: "Ten",
- content: "If you're still reading this, you should just go check out the API docs for tabs!"
- }],
- o = null,
- r = null;
- e.tabs = t, e.selectedIndex = 2, e.$watch("selectedIndex", function(e, a) {
- r = o, o = t[e]
- }), e.addTab = function(e, a) {
- a = a || e + " Content View", t.push({
- title: e,
- content: a,
- disabled: !1
- })
- }, e.removeTab = function(e) {
- var a = t.indexOf(e);
- t.splice(a, 1)
- }
- }
- function r(e, a) {
- var t = this,
- o = 0,
- r = 0;
- t.modes = [], t.activated = !0, t.determinateValue = 30, t.toggleActivation = function() {
- t.activated || (t.modes = []), t.activated && (o = r = 0)
- }, a(function() {
- t.determinateValue += 1, t.determinateValue > 100 && (t.determinateValue = 30), 5 > o && !t.modes[o] && t.activated && (t.modes[o] = "indeterminate"), r++ % 4 == 0 && o++
- }, 100, 0, !0)
- }
- function n(e, a) {
- var t = this,
- o = 0,
- r = 0;
- t.mode = "query", t.activated = !0, t.determinateValue = 30, t.determinateValue2 = 30, t.modes = [], t.toggleActivation = function() {
- t.activated || (t.modes = []), t.activated && (o = r = 0, t.determinateValue = 30, t.determinateValue2 = 30)
- }, a(function() {
- t.determinateValue += 1, t.determinateValue2 += 1.5, t.determinateValue > 100 && (t.determinateValue = 30), t.determinateValue2 > 100 && (t.determinateValue2 = 30), 2 > o && !t.modes[o] && t.activated && (t.modes[o] = 0 == o ? "buffer" : "query"), r++ % 4 == 0 && o++, 2 == o && (t.contained = "indeterminate")
- }, 100, 0, !0), a(function() {
- t.mode = "query" == t.mode ? "determinate" : "query"
- }, 7200, 0, !0)
- }
- function i(e, a, t) {
- function o() {
- var a = e.toastPosition;
- a.bottom && r.top && (a.top = !1), a.top && r.bottom && (a.bottom = !1), a.right && r.left && (a.left = !1), a.left && r.right && (a.right = !1), r = angular.extend({}, a)
- }
- var r = {
- bottom: !1,
- top: !0,
- left: !1,
- right: !0
- };
- e.toastPosition = angular.extend({}, r), e.getToastPosition = function() {
- return o(), Object.keys(e.toastPosition).filter(function(a) {
- return e.toastPosition[a]
- }).join(" ")
- }, e.showCustomToast = function() {
- a.show({
- controller: "ToastCustomDemo",
- templateUrl: "toast-template.html",
- parent: t[0].querySelector("#toastBounds"),
- hideDelay: 6e3,
- position: e.getToastPosition()
- })
- }, e.showSimpleToast = function() {
- a.show(a.simple().content("Simple Toast!").position(e.getToastPosition()).hideDelay(3e3))
- }, e.showActionToast = function() {
- var t = a.simple().content("Action Toast!").action("OK").highlightAction(!1).position(e.getToastPosition());
- a.show(t).then(function(e) {
- "ok" == e && alert("You clicked 'OK'.")
- })
- }
- }
- function s(e, a) {
- e.closeToast = function() {
- a.hide()
- }
- }
- function l(e) {
- e.demo = {
- showTooltip: !1,
- tipDirection: ""
- }, e.$watch("demo.tipDirection", function(a) {
- a && a.length && (e.demo.showTooltip = !0)
- })
- }
- function c(e) {
- var a = "images/g1.jpg";
- e.messages = [{
- face: a,
- what: "Brunch this weekend?",
- who: "Min Li Chan",
- when: "3:08PM",
- notes: " I'll be in your neighborhood doing errands"
- }, {
- face: a,
- what: "Brunch this weekend?",
- who: "Min Li Chan",
- when: "3:08PM",
- notes: " I'll be in your neighborhood doing errands"
- }, {
- face: a,
- what: "Brunch this weekend?",
- who: "Min Li Chan",
- when: "3:08PM",
- notes: " I'll be in your neighborhood doing errands"
- }, {
- face: a,
- what: "Brunch this weekend?",
- who: "Min Li Chan",
- when: "3:08PM",
- notes: " I'll be in your neighborhood doing errands"
- }, {
- face: a,
- what: "Brunch this weekend?",
- who: "Min Li Chan",
- when: "3:08PM",
- notes: " I'll be in your neighborhood doing errands"
- }, {
- face: a,
- what: "Brunch this weekend?",
- who: "Min Li Chan",
- when: "3:08PM",
- notes: " I'll be in your neighborhood doing errands"
- }, {
- face: a,
- what: "Brunch this weekend?",
- who: "Min Li Chan",
- when: "3:08PM",
- notes: " I'll be in your neighborhood doing errands"
- }, {
- face: a,
- what: "Brunch this weekend?",
- who: "Min Li Chan",
- when: "3:08PM",
- notes: " I'll be in your neighborhood doing errands"
- }, {
- face: a,
- what: "Brunch this weekend?",
- who: "Min Li Chan",
- when: "3:08PM",
- notes: " I'll be in your neighborhood doing errands"
- }, {
- face: a,
- what: "Brunch this weekend?",
- who: "Min Li Chan",
- when: "3:08PM",
- notes: " I'll be in your neighborhood doing errands"
- }, {
- face: a,
- what: "Brunch this weekend?",
- who: "Min Li Chan",
- when: "3:08PM",
- notes: " I'll be in your neighborhood doing errands"
- }]
- }
- function u() {
- var e = this;
- e.userState = "",
- e.states = "AL AK AZ AR CA CO CT DE FL GA HI ID IL IN IA KS KY LA ME MD MA MI MN MS MO MT NE NV NH NJ NM NY NC ND OH OK OR PA RI SC SD TN TX UT VT VA WA WV WI WY".split(" ").map(function(e) {
- return {
- abbrev: e
- }
- }), e.sizes = ["small (12-inch)", "medium (14-inch)", "large (16-inch)", "insane (42-inch)"], e.toppings = [{
- category: "meat",
- name: "Pepperoni"
- }, {
- category: "meat",
- name: "Sausage"
- }, {
- category: "meat",
- name: "Ground Beef"
- }, {
- category: "meat",
- name: "Bacon"
- }, {
- category: "veg",
- name: "Mushrooms"
- }, {
- category: "veg",
- name: "Onion"
- }, {
- category: "veg",
- name: "Green Pepper"
- }, {
- category: "veg",
- name: "Green Olives"
- }]
- }
- angular.module("app.ui").controller("ChipsBasicDemoCtrl", e).controller("DialogDemo", ["$scope", "$mdDialog", a]).controller("TabsDemo", ["$scope", "$log", o]).controller("ProgressCircularDemo", ["$scope", "$interval", r]).controller("ProgressLinearDemo", ["$scope", "$interval", n]).controller("ToastDemo", ["$scope", "$mdToast", "$document", i]).controller("ToastCustomDemo", ["$scope", "$mdToast", s]).controller("TooltipDemo", ["$scope", l]).controller("SubheaderDemo", ["$scope", c]).controller("SelectDemo", u)
- }(),
- function() {
- "use strict";
- function e(e, a) {
- e.start = function() {
- a.$broadcast("preloader:active")
- }, e.complete = function() {
- a.$broadcast("preloader:hide")
- }
- }
- function a(e, a) {
- e.toppings = [{
- name: "Pepperoni",
- wanted: !0
- }, {
- name: "Sausage",
- wanted: !1
- }, {
- name: "Black Olives",
- wanted: !0
- }], e.settings = [{
- name: "Wi-Fi",
- extraScreen: "Wi-fi menu",
- icon: "zmdi zmdi-wifi-alt",
- enabled: !0
- }, {
- name: "Bluetooth",
- extraScreen: "Bluetooth menu",
- icon: "zmdi zmdi-bluetooth",
- enabled: !1
- }], e.messages = [{
- id: 1,
- title: "Message A",
- selected: !1
- }, {
- id: 2,
- title: "Message B",
- selected: !0
- }, {
- id: 3,
- title: "Message C",
- selected: !0
- }], e.people = [{
- name: "Janet Perkins",
- img: "img/100-0.jpeg",
- newMessage: !0
- }, {
- name: "Mary Johnson",
- img: "img/100-1.jpeg",
- newMessage: !1
- }, {
- name: "Peter Carlsson",
- img: "img/100-2.jpeg",
- newMessage: !1
- }], e.goToPerson = function(e, t) {
- a.show(a.alert().title("Navigating").content("Inspect " + e).ariaLabel("Person inspect demo").ok("Neat!").targetEvent(t))
- }, e.navigateTo = function(e, t) {
- a.show(a.alert().title("Navigating").content("Imagine being taken to " + e).ariaLabel("Navigation demo").ok("Neat!").targetEvent(t))
- }, e.doSecondaryAction = function(e) {
- a.show(a.alert().title("Secondary Action").content("Secondary actions can be used for one click actions").ariaLabel("Secondary click demo").ok("Neat!").targetEvent(e))
- }
- }
- function t(e, a) {
- e.notify = function(e) {
- switch (e) {
- case "info":
- return a.log("Heads up! This alert needs your attention, but it's not super important.");
- case "success":
- return a.logSuccess("Well done! You successfully read this important alert message.");
- case "warning":
- return a.logWarning("Warning! Best check yo self, you're not looking too good.");
- case "error":
- return a.logError("Oh snap! Change a few things up and try submitting again.")
- }
- }
- }
- function o(e) {
- e.alerts = [{
- type: "success",
- msg: "Well done! You successfully read this important alert message."
- }, {
- type: "info",
- msg: "Heads up! This alert needs your attention, but it is not super important."
- }, {
- type: "warning",
- msg: "Warning! Best check yo self, you're not looking too good."
- }, {
- type: "danger",
- msg: "Oh snap! Change a few things up and try submitting again."
- }], e.addAlert = function() {
- var a, t;
- switch (a = Math.ceil(4 * Math.random()), t = void 0, a) {
- case 0:
- t = "info";
- break;
- case 1:
- t = "success";
- break;
- case 2:
- t = "info";
- break;
- case 3:
- t = "warning";
- break;
- case 4:
- t = "danger"
- }
- return e.alerts.push({
- type: t,
- msg: "Another alert!"
- })
- }, e.closeAlert = function(a) {
- return e.alerts.splice(a, 1)
- }
- }
- function r(e) {
- e.max = 200, e.random = function() {
- var a, t;
- t = Math.floor(100 * Math.random()), a = void 0, a = 25 > t ? "success" : 50 > t ? "info" : 75 > t ? "warning" : "danger", e.showWarning = "danger" === a || "warning" === a, e.dynamic = t, e.type = a
- }, e.random()
- }
- function n(e) {
- e.oneAtATime = !0, e.groups = [{
- title: "Dynamic Group Header - 1",
- content: "Dynamic Group Body - 1"
- }, {
- title: "Dynamic Group Header - 2",
- content: "Dynamic Group Body - 2"
- }, {
- title: "Dynamic Group Header - 3",
- content: "Dynamic Group Body - 3"
- }], e.items = ["Item 1", "Item 2", "Item 3"], e.status = {
- isFirstOpen: !0,
- isFirstOpen1: !0
- }, e.addItem = function() {
- var a;
- a = e.items.length + 1, e.items.push("Item " + a)
- }
- }
- function i(e) {
- e.isCollapsed = !1
- }
- function s(e, a, t) {
- e.items = ["item1", "item2", "item3"], e.animationsEnabled = !0, e.open = function(o) {
- var r = a.open({
- animation: e.animationsEnabled,
- templateUrl: "myModalContent.html",
- controller: "ModalInstanceCtrl",
- size: o,
- resolve: {
- items: function() {
- return e.items
- }
- }
- });
- r.result.then(function(a) {
- e.selected = a
- }, function() {
- t.info("Modal dismissed at: " + new Date)
- })
- }, e.toggleAnimation = function() {
- e.animationsEnabled = !e.animationsEnabled
- }
- }
- function l(e, a, t) {
- e.items = t, e.selected = {
- item: e.items[0]
- }, e.ok = function() {
- a.close(e.selected.item)
- }, e.cancel = function() {
- a.dismiss("cancel")
- }
- }
- function c(e) {
- e.totalItems = 64, e.currentPage = 4, e.setPage = function(a) {
- e.currentPage = a
- }, e.maxSize = 5, e.bigTotalItems = 175, e.bigCurrentPage = 1
- }
- function u(e) {
- e.tabs = [{
- title: "Dynamic Title 1",
- content: "Dynamic content 1. Consectetur adipisicing elit. Nihil, quidem, officiis, et ex laudantium sed cupiditate voluptatum libero nobis sit illum voluptates beatae ab. Ad, repellendus non sequi et at."
- }, {
- title: "Disabled",
- content: "Dynamic content 2. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nihil, quidem, officiis, et ex laudantium sed cupiditate voluptatum libero nobis sit illum voluptates beatae ab. Ad, repellendus non sequi et at.",
- disabled: !0
- }], e.navType = "pills"
- }
- function d(e) {
- e.list = [{
- id: 1,
- title: "Item 1",
- items: []
- }, {
- id: 2,
- title: "Item 2",
- items: [{
- id: 21,
- title: "Item 2.1",
- items: [{
- id: 211,
- title: "Item 2.1.1",
- items: []
- }, {
- id: 212,
- title: "Item 2.1.2",
- items: []
- }]
- }]
- }, {
- id: 3,
- title: "Item 3",
- items: []
- }, {
- id: 4,
- title: "Item 4",
- items: [{
- id: 41,
- title: "Item 4.1",
- items: []
- }]
- }, {
- id: 5,
- title: "Item 5",
- items: []
- }], e.selectedItem = {}, e.options = {}, e.remove = function(e) {
- e.remove()
- }, e.toggle = function(e) {
- e.toggle()
- }, e.newSubItem = function(e) {
- var a;
- a = e.$modelValue, a.items.push({
- id: 10 * a.id + a.items.length,
- title: a.title + "." + (a.items.length + 1),
- items: []
- })
- }
- }
- function p(e, a, t) {
- var o, r;
- for (r = [], o = 0; 8 > o;) r[o] = new google.maps.Marker({
- title: "Marker: " + o
- }), o++;
- e.GenerateMapMarkers = function() {
- var a, t, n, i, s;
- for (a = new Date, e.date = a.toLocaleString(), s = Math.floor(4 * Math.random()) + 4, o = 0; s > o;) t = 43.66 + Math.random() / 100, n = -79.4103 + Math.random() / 100, i = new google.maps.LatLng(t, n), r[o].setPosition(i), r[o].setMap(e.map), o++
- }, t(e.GenerateMapMarkers, 2e3)
- }
- angular.module("app.ui").controller("LoaderCtrl", ["$scope", "$rootScope", e]).controller("ListCtrl", ["$scope", "$mdDialog", a]).controller("NotifyCtrl", ["$scope", "logger", t]).controller("AlertDemoCtrl", ["$scope", o]).controller("ProgressDemoCtrl", ["$scope", r]).controller("AccordionDemoCtrl", ["$scope", n]).controller("CollapseDemoCtrl", ["$scope", i]).controller("ModalDemoCtrl", ["$scope", "$uibModal", "$log", s]).controller("ModalInstanceCtrl", ["$scope", "$uibModalInstance", "items", l]).controller("PaginationDemoCtrl", ["$scope", c]).controller("TabsDemoCtrl", ["$scope", u]).controller("TreeDemoCtrl", ["$scope", d]).controller("MapDemoCtrl", ["$scope", "$http", "$interval", p])
- }(),
- function() {
- "use strict";
- function e() {
- function e(e, a) {
- e.addClass("ui-wave");
- var t, o, r, n;
- e.off("click").on("click", function(e) {
- var a = $(this);
- 0 === a.find(".ink").length && a.prepend("<span class='ink'></span>"), t = a.find(".ink"), t.removeClass("wave-animate"), t.height() || t.width() || (o = Math.max(a.outerWidth(), a.outerHeight()), t.css({
- height: o,
- width: o
- })), r = e.pageX - a.offset().left - t.width() / 2, n = e.pageY - a.offset().top - t.height() / 2, t.css({
- top: n + "px",
- left: r + "px"
- }).addClass("wave-animate")
- })
- }
- var a = {
- restrict: "A",
- compile: e
- };
- return a
- }
- function a() {
- function e(e, a) {
- var t, o;
- o = function() {
- var e, r, n, i, s, l;
- return l = new Date, e = l.getHours(), r = l.getMinutes(), n = l.getSeconds(), r = t(r), n = t(n), s = e + ":" + r + ":" + n, a.html(s), i = setTimeout(o, 500)
- }, t = function(e) {
- return 10 > e && (e = "0" + e), e
- }, o()
- }
- var a = {
- restrict: "A",
- link: e
- };
- return a
- }
- function t() {
- return {
- restrict: "A",
- compile: function(e, a) {
- return e.on("click", function(e) {
- e.stopPropagation()
- })
- }
- }
- }
- function o() {
- return {
- restrict: "A",
- link: function(e, a, t) {
- return a.slimScroll({
- height: t.scrollHeight || "100%"
- })
- }
- }
- }
- angular.module("app.ui").directive("uiWave", e).directive("uiTime", a).directive("uiNotCloseOnClick", t).directive("slimScroll", o)
- }(),
- function() {
- "use strict";
- function e() {
- var e;
- return toastr.options = {
- closeButton: !0,
- positionClass: "toast-bottom-right",
- timeOut: "3000"
- }, e = function(e, a) {
- return toastr[a](e)
- }, {
- log: function(a) {
- e(a, "info")
- },
- logWarning: function(a) {
- e(a, "warning")
- },
- logSuccess: function(a) {
- e(a, "success")
- },
- logError: function(a) {
- e(a, "error")
- }
- }
- }
- angular.module("app.ui").factory("logger", e)
- }(),
- function() {
- "use strict";
- function ProjectAnalyzeCtrl($scope, $rootScope, $stateParams, DataSyncService, $location, logger, $sce, $timeout, Upload) {
- $scope.projectId = $stateParams.pid, $scope.activeTab = [!0, !1, !1, !1, !1, !1, !1], $scope.activeTab = activateTab($scope.activeTab, $stateParams.tid - 1);
- var phaseComponentDetail = {},
- filter;
- $scope.walkthroughs = {
- fmea: !1,
- critx: !1
- }, $scope.dSchema = {
- fmea: {
- Input: "",
- FailureMode: "",
- FailureEffects: "",
- Severity: 1,
- Causes: "",
- Likelihood: 1,
- CurrentControls: "",
- Detection: 1,
- Rpn: 0,
- ActionsRecommended: "",
- Resp: "",
- ActionsTaken: "",
- ActionPlanSeverity: "",
- ActionPlanLikelihood: "",
- ActionPlanDetection: "",
- ActionPlanRpn: ""
- },
- critx: {
- Input: "",
- PracticalTheory: "",
- XMeasurement: "",
- StatTested: "",
- ToolUsed: "",
- Ho: "",
- Ha: "",
- Results: "",
- PracticalConclusions: "",
- NextSteps: ""
- }
- }, DataSyncService.loadProject($scope.projectId, function(response) {
- response.success ? ($scope.projectDetail = $rootScope.currentProject, DataSyncService.loadContacts(function(e) {
- $scope.allContacts = e
- }), $scope.phaseDetail = DataSyncService.getPhaseDetail("Analyze"), $scope.paretoData = null, phaseComponentDetail = DataSyncService.getPhaseComponentDetail("Analyze", "Pareto Chart"), filter = [], filter.push(DataSyncService.buildFilter("ProjectId", null, "is", $scope.projectId)), filter.push({
- ao: "and"
- }), filter.push(DataSyncService.buildFilter("PhaseId", null, "is", phaseComponentDetail.PhaseId)), filter.push({
- andorsplit: "and"
- }), filter.push(DataSyncService.buildFilter("PhaseComponentId", null, "is", phaseComponentDetail.Id)), DataSyncService.sync(DataSyncService.buildRequest("get", ["chartexceldata"], null, [filter]), function(e) {
- e.success && $scope.buildPareto(e.data[0].ExcelFileData)
- }), $scope.uploadParetoFile = function(e, a) {
- phaseComponentDetail = DataSyncService.getPhaseComponentDetail("Analyze", "Pareto Chart"), $scope.f = e, $scope.errFile = a && a[0], e && (e.upload = Upload.upload({
- url: "https://api.l6elite.com",
- data: {
- file: e,
- T: ["chartexceldata"],
- A: "upload",
- V: [{
- ProjectId: $scope.projectId,
- PhaseId: phaseComponentDetail.PhaseId,
- PhaseComponentId: phaseComponentDetail.Id
- }]
- }
- }), e.upload.then(function(e) {
- $scope.paretoData = e.data, $scope.buildPareto(e.data.ExcelFileData)
- }, function(e) {
- e.status > 0 && logger.logError(e.status + ": " + e.data)
- }, function(a) {
- e.progress = Math.min(100, parseInt(100 * a.loaded / a.total))
- }))
- }, $scope.buildPareto = function(e) {
- $scope.paretoData || ($scope.paretoData = {});
- var a = [],
- t = [],
- o = [],
- r = 0;
- for (var n in e)
- if (n > 1) {
- if (!parseFloat(e[n].B) && 0 !== e[n].B) return logger.logError("Data Contains Illegal Values. Data Should Only Contain Numeric Values!"), !1;
- e[n].B > r ? (a.push([e[n].A, e[n].B]), t.push([e[n].A, e[n].C]), o.push(e[n].A)) : (a.unshift([e[n].A, e[n].B]), t.unshift([e[n].A, e[n].C]), o.unshift(e[n].A))
- }
- $scope.paretoData.data = [{
- data: a,
- bars: {
- order: 0,
- fillColor: {
- colors: [{
- opacity: .3
- }, {
- opacity: .3
- }]
- },
- show: !0,
- fill: 1,
- barWidth: .3,
- align: "center",
- horizontal: !1
- }
- }, {
- data: t,
- curvedLines: {
- apply: !0
- },
- lines: {
- show: !0,
- fill: !0,
- fillColor: {
- colors: [{
- opacity: .2
- }, {
- opacity: .2
- }]
- }
- }
- }, {
- data: t,
- points: {
- show: !0
- },
- yaxis: 2
- }], $scope.paretoData.options = {
- xaxis: {
- mode: "categories"
- },
- yaxes: [{}, {
- position: "right"
- }],
- series: {
- curvedLines: {
- active: !0
- },
- points: {
- lineWidth: 2,
- fill: !0,
- fillColor: "#ffffff",
- symbol: "circle",
- radius: 4
- }
- },
- grid: {
- hoverable: !0,
- clickable: !0,
- tickColor: "#f9f9f9",
- borderWidth: 1,
- borderColor: "#eeeeee"
- },
- tooltip: !0,
- tooltipOpts: {
- defaultTheme: !1
- },
- colors: [$scope.color.gray, $scope.color.primary, $scope.color.primary]
- }
- }, $scope.fmeaData = [], $scope.fmeaDataOrig = [], $scope.getFmea = function() {
- phaseComponentDetail = DataSyncService.getPhaseComponentDetail("Analyze", "FMEA"), filter = [], filter.push(DataSyncService.buildFilter("ProjectId", null, "is", $scope.projectId)), filter.push({
- ao: "and"
- }), filter.push(DataSyncService.buildFilter("PhaseId", null, "is", phaseComponentDetail.PhaseId)), filter.push({
- andorsplit: "and"
- }), filter.push(DataSyncService.buildFilter("PhaseComponentId", null, "is", phaseComponentDetail.Id)), DataSyncService.sync(DataSyncService.buildRequest("get", ["analyzefmea"], null, [filter]), function(e) {
- e.success ? ($scope.fmeaData = e.data, $scope.fmeaDataOrig = angular.copy($scope.fmeaData)) : $scope.showWalkthrough("fmea", $scope.fmeaData)
- })
- }, $scope.getFmea(), $scope.submitFmea = function() {
- phaseComponentDetail = DataSyncService.getPhaseComponentDetail("Analyze", "FMEA");
- for (var e = [], a = [], t = [], o = 0; o < $scope.fmeaData.length; o++)
- if (!angular.equals($scope.fmeaData[o], $scope.fmeaDataOrig[o])) {
- var r = angular.copy($scope.fmeaData[o]);
- r.Id && r.isDeleted ? (a.push(r.Id), $scope.fmeaData[o].Id = !1) : r.Id ? (delete r.DateTimeCreated, delete r.LastUpdated, e.push(r)) : r.Id || r.isDeleted || (r.ProjectId = $scope.projectId, r.PhaseId = phaseComponentDetail.PhaseId, r.PhaseComponentId = phaseComponentDetail.Id, t.push(r))
- }
- DataSyncService.syncTableRowData("analyzefmea", t, e, a, null, function() {
- $scope.getFmea()
- })
- }, $scope.critXData = [], $scope.critXDataOrig = [], $scope.getCritX = function() {
- phaseComponentDetail = DataSyncService.getPhaseComponentDetail("Analyze", "Critical X"), filter = [], filter.push(DataSyncService.buildFilter("ProjectId", null, "is", $scope.projectId)), filter.push({
- ao: "and"
- }), filter.push(DataSyncService.buildFilter("PhaseId", null, "is", phaseComponentDetail.PhaseId)), filter.push({
- andorsplit: "and"
- }), filter.push(DataSyncService.buildFilter("PhaseComponentId", null, "is", phaseComponentDetail.Id)), DataSyncService.sync(DataSyncService.buildRequest("get", ["analyzecriticalx"], null, [filter]), function(e) {
- e.success ? ($scope.critXData = e.data, $scope.critXDataOrig = angular.copy($scope.critXData)) : $scope.showWalkthrough("critx", $scope.critXData)
- })
- }, $scope.getCritX(), $scope.submitCritX = function() {
- phaseComponentDetail = DataSyncService.getPhaseComponentDetail("Analyze", "Critical X");
- for (var e = [], a = [], t = [], o = 0; o < $scope.critXData.length; o++)
- if (!angular.equals($scope.critXData[o], $scope.critXDataOrig[o])) {
- var r = angular.copy($scope.critXData[o]);
- r.Id && r.isDeleted ? (a.push(r.Id), $scope.critXData[o].Id = !1) : r.Id ? (delete r.DateTimeCreated, delete r.LastUpdated, e.push(r)) : r.Id || r.isDeleted || (r.ProjectId = $scope.projectId, r.PhaseId = phaseComponentDetail.PhaseId, r.PhaseComponentId = phaseComponentDetail.Id, t.push(r))
- }
- DataSyncService.syncTableRowData("analyzecriticalx", t, e, a, null, function() {
- $scope.getCritX()
- })
- }, $scope.HypothesisMap = {}, $scope.diagramType = $rootScope.currentProject.DiagramType, phaseComponentDetail = DataSyncService.getPhaseComponentDetail("Analyze", "Hypothesis Map"), filter = [], filter.push(DataSyncService.buildFilter("ProjectId", null, "is", $scope.projectId)), filter.push({
- ao: "and"
- }), filter.push(DataSyncService.buildFilter("PhaseId", null, "is", phaseComponentDetail.PhaseId)), filter.push({
- andorsplit: "and"
- }), filter.push(DataSyncService.buildFilter("PhaseComponentId", null, "is", phaseComponentDetail.Id)), DataSyncService.sync(DataSyncService.buildRequest("get", ["analyzehypothesismap"], null, [filter]), function(e) {
- e.success && ($scope.HypothesisMap = e.data[0], $scope.HypothesisMap.hasHypothesisMap = $scope.HypothesisMap.hasOwnProperty("Svg") && "" != $scope.HypothesisMap.Svg ? !0 : !1, $scope.analyzeHypothesisMap = $sce.trustAsHtml($scope.HypothesisMap.Svg))
- }), $scope.regressionData = null, $scope.regressionStats = {
- FR: 0,
- RRSQ: 0,
- residual_values: [],
- output_value: 0,
- RMEAN: 0,
- mean1: 0,
- mean2: 0,
- ESQV: 0,
- VR1: 0,
- VR2: 0,
- FR1: 0,
- SR2: 0,
- MAE: 0,
- MAE: 0,
- DW: 0,
- NCON: 0,
- predicted: []
- }, phaseComponentDetail = DataSyncService.getPhaseComponentDetail("Analyze", "Regression"), filter = [], filter.push(DataSyncService.buildFilter("ProjectId", null, "is", $scope.projectId)), filter.push({
- ao: "and"
- }), filter.push(DataSyncService.buildFilter("PhaseId", null, "is", phaseComponentDetail.PhaseId)), filter.push({
- andorsplit: "and"
- }), filter.push(DataSyncService.buildFilter("PhaseComponentId", null, "is", phaseComponentDetail.Id)), DataSyncService.sync(DataSyncService.buildRequest("get", ["chartexceldata"], null, [filter]), function(e) {
- e.success && $scope.buildRegression(e.data[0].ExcelFileData)
- }), $scope.uploadRegressionFile = function(e, a) {
- phaseComponentDetail = DataSyncService.getPhaseComponentDetail("Analyze", "Regression"), $scope.f = e, $scope.errFile = a && a[0], e && (e.upload = Upload.upload({
- url: "https://api.l6elite.com",
- data: {
- file: e,
- T: ["chartexceldata"],
- A: "upload",
- V: [{
- ProjectId: $scope.projectId,
- PhaseId: phaseComponentDetail.PhaseId,
- PhaseComponentId: phaseComponentDetail.Id
- }]
- }
- }), e.upload.then(function(e) {
- $scope.regressionData = e.data, $scope.buildRegression(e.data.ExcelFileData)
- }, function(e) {
- e.status > 0 && logger.logError(e.status + ": " + e.data)
- }, function(a) {
- e.progress = Math.min(100, parseInt(100 * a.loaded / a.total))
- }))
- }, $scope.buildRegression = function(data) {
- function makeArray2(e, a) {
- var t;
- this.length = e + 1;
- for (var t = 0; e + 1 >= t; t++) this[t] = new makeArray(a)
- }
- function makeArray(e) {
- var a;
- this.length = e + 1;
- for (var a = 0; e + 1 >= a; a++) this[a] = 0
- }
- function buildData(e) {
- N = 0, Y = [0];
- var a = 1;
- for (var t in e) {
- if (M = 0, a > 1)
- for (var o in e[t]) "A" !== o && (N++, M++);
- a++
- }
- }
- function det(e) {
- var a = e.length - 1;
- if (1 === a) return e[1][1];
- for (var t, o = 0, r = 1, t = 1; a >= t; t++) {
- if (0 !== e[1][t]) {
- for (var n, i, s, l = new makeArray2(a - 1, a - 1), n = 1; a - 1 >= n; n++) {
- s = t > n ? n : n + 1;
- for (var i = 1; a - 1 >= i; i++) l[i][n] = e[i + 1][s]
- }
- o += e[1][t] * r * det(l)
- }
- r = -r
- }
- return o
- }
- function inverse(e) {
- var a = e.length - 1,
- t = new makeArray2(a, a),
- o = det(e);
- if (0 === o) alert("singular matrix--check data");
- else
- for (var r, n, r = 1; a >= r; r++)
- for (var n = 1; a >= n; n++) {
- for (var i, s, l, c, u = new makeArray2(a - 1, a - 1), i = 1; a - 1 >= i; i++) {
- l = n > i ? i : i + 1;
- for (var s = 1; a - 1 >= s; s++) c = r > s ? s : s + 1, u[s][i] = e[c][l]
- }
- var d = (r + n) / 2;
- if (d == Math.round(d)) var p = 1;
- else var p = -1;
- t[n][r] = det(u) * p / o
- }
- return t
- }
- function shiftRight(e, a) {
- if (0 === a) return e;
- var t = 1,
- o = a;
- 0 > o && (o = -o);
- for (var r = 1; o >= r; r++) t = 10 * t;
- return a > 0 ? t * e : e / t
- }
- function roundSigDig(e, a) {
- if (0 === e) return 0;
- if (Math.abs(e) < 1e-12) return 0;
- var t = Math.floor(Math.log(Math.abs(e)) / Math.log(10)) - a,
- o = shiftRight(Math.round(shiftRight(Math.abs(e), -t)), t);
- return e > 0 ? o : -o
- }
- function stripSpaces(e) {
- for (OutString = "", Count = 0; Count < e.length; Count++) TempChar = e.substring(Count, Count + 1), " " != TempChar && (OutString += TempChar);
- return OutString
- }
- function buildxy(data) {
- e = 2.718281828459045, pi = 3.141592653589793, abort = !1, N = 0;
- var searching = !0,
- numvariables = 4;
- numvariables = "" == document.theForm[10].value ? 1 : "" == document.theForm[11].value ? 2 : "" == document.theForm[12].value ? 3 : 4;
- for (var i = 0; 15 >= i; i++) theString1 = stripSpaces(document.theForm[3 + 6 * i].value), "" == theString1 && (searching = !1), theString2 = stripSpaces(document.theForm[4 + 6 * i].value), numvariables >= 2 && "" == theString2 && (searching = !1), theString3 = stripSpaces(document.theForm[5 + 6 * i].value), numvariables >= 3 && "" == theString3 && (searching = !1), theString4 = stripSpaces(document.theForm[6 + 6 * i].value), numvariables >= 4 && "" == theString4 && (searching = !1), searching && !abort && (N++, X[1][N] = eval(theString1), numvariables >= 2 && (X[2][N] = eval(theString2)), numvariables >= 3 && (X[3][N] = eval(theString3)), numvariables >= 4 && (X[4][N] = eval(theString4)), theString = stripSpaces(document.theForm[7 + 6 * i].value), "" == theString ? (alert("You have not entered a y-value for data point number " + N), abort = !0) : Y[N] = eval(theString));
- M = numvariables, abort || (0 == N ? (alert("Enter data first"), abort = !0) : M + 1 > N && (alert("You have entered too few data points"), abort = !0))
- }
- function linregr() {
- if (!abort) {
- var e, a, t, o, r = new makeArray(M + 1),
- n = new makeArray2(M + 1, M + 1),
- i = new makeArray2(M + 1, M + 1);
- for (a = 1; N >= a; a++) X[0][a] = 1;
- for (a = 1; M + 1 >= a; a++) {
- for (o = 0, e = 1; N >= e; e++) o += X[a - 1][e] * Y[e];
- for (r[a] = o, t = 1; M + 1 >= t; t++) {
- for (o = 0, e = 1; N >= e; e++) o += X[a - 1][e] * X[t - 1][e];
- n[a][t] = o
- }
- }
- for (i = inverse(n), e = 0; M >= e; e++) {
- for (o = 0, t = 1; M + 1 >= t; t++) o += i[e + 1][t] * r[t];
- regrCoeff[e] = o
- }
- }
- }
- function calc() {
- buildxy(), linregr();
- var e = "Y = " + roundSigDig(regrCoeff[0], sigDig);
- for (i = 1; i <= M; i++) e += " + (" + roundSigDig(regrCoeff[i], sigDig) + ")X" + i;
- for ($regressionStats.output_value = e, i = 0; i <= N - 1; i++) {
- for (y = regrCoeff[0], j = 1; j <= M; j++) y += regrCoeff[j] * X[j][i + 1];
- document.theForm[8 + 6 * i].value = roundSigDig(y, sigDig)
- }
- for (i = N; i <= maxN - 1; i++) document.theForm[8 + 6 * i].value = ""
- }
- function checkData(e) {
- var a = [];
- N = 0, Y = [0];
- var t = 1;
- for (var o in e) {
- a.push(e[o]), M = 0;
- var r = 1;
- if (t > 1) {
- for (var n in e[o]) {
- if ("A" == n && "" == e[o][n]) return !1;
- "" == e[o][n] && (e[o][n] = 0), "A" == n ? Y.push(e[o][n]) : X[r - 1][t - 1] = e[o][n], N++, M++, r++
- }
- }
- t++
- }
- return N = t - 2, M -= 1, a
- }
- function calc2(data) {
- function Norm(e) {
- e = Math.abs(e);
- var a = 1 + e * (.04986735 + e * (.02114101 + e * (.00327763 + e * (380036e-10 + e * (488906e-10 + 5383e-9 * e)))));
- return a *= a, a *= a, a *= a, 1 / (a * a)
- }
- function ANorm(e) {
- for (var a = .5, t = .5, o = 0; t > 1e-6;) o = 1 / a - 1, t /= 2, Norm(o) > e ? a -= t : a += t;
- return o
- }
- function Fmt(e) {
- var a;
- return a = e >= 0 ? "" + (e + 5e-5) : "" + (e - 5e-5), a.substring(0, a.indexOf(".") + 5)
- }
- function FishF(e, a, t) {
- var o = t / (a * e + t);
- if (a % 2 === 0) return StatCom(1 - o, t, a + t - 4, t - 2) * Math.pow(o, t / 2);
- if (t % 2 === 0) return 1 - StatCom(o, a, a + t - 4, a - 2) * Math.pow(1 - o, a / 2);
- var r = Math.atan(Math.sqrt(a * e / t)),
- n = r / PiD2,
- i = Math.sin(r),
- s = Math.cos(r);
- if (t > 1 && (n += i * s * StatCom(s * s, 2, t - 3, -1) / PiD2), 1 == a) return 1 - n;
- var l = 4 * StatCom(i * i, t + 1, a + t - 4, t - 2) * i * Math.pow(s, t) / Pi;
- if (1 == t) return 1 - n + l / 2;
- for (var c = 2;
- (t - 1) / 2 >= c;) l = l * c / (c - .5), c += 1;
- return 1 - n + l
- }
- function StatCom(e, a, t, o) {
- for (var r = 1, n = r, i = a; t >= i;) r = r * e * i / (i - o), n += r, i += 2;
- return n
- }
- function AFishF(e, a, t) {
- for (var o = .5, r = .5, n = 0; r > 1e-10;) n = 1 / o - 1, r /= 2, FishF(n, a, t) > e ? o -= r : o += r;
- return n
- }
- if (data = checkData(data), !data) return logger.logError("Data Is Not Formatted Properly! Verify All Rows Have A Valid X And Y Value!"), !1;
- linregr();
- for (var predicted = [], residual = [], output = "Y = " + roundSigDig(regrCoeff[0], sigDig), SE = 0, ST = 0, i = 1; M >= i; i++) output += " + (" + roundSigDig(regrCoeff[i], sigDig) + ")X" + i;
- for ($scope.regressionStats.output_value = output, $scope.regressionStats.residual_values = [], $scope.regressionStats.predicted = [], i = 0; N - 1 >= i; i++) {
- for (var y = regrCoeff[0], j = 1; M >= j; j++) y += regrCoeff[j] * X[j][i + 1];
- $scope.regressionStats.predicted.push(roundSigDig(y, sigDig)), predicted[i] = roundSigDig(y, sigDig), residual[i] = Y[i + 1] - predicted[i], $scope.regressionStats.residual_values.push(Math.round(residual[i] * Math.pow(10, 4)) / Math.pow(10, 4)), SE += residual[i], ST += Y[i + 1]
- }
- var MSE = 0,
- MST = 0;
- MSE = SE / N, MST = ST / N;
- var SSE = 0,
- SST = 0;
- for (i = 1; N >= i; i++) SSE += (residual[i - 1] - MSE) * (residual[i - 1] - MSE), SST += (Y[i] - MST) * (Y[i] - MST);
- var FR, RRSQ;
- for (RRSQ = 1 - SSE / SST, FR = (N - M - 1) * (SST - SSE) / (M * SSE), $scope.regressionStats.FR = FR, $scope.regressionStats.RRSQ = RRSQ, i = N; maxN - 1 >= i; i++);
- var Pi = Math.PI,
- PiD2 = Pi / 2,
- PiD4 = Pi / 4,
- Pi2 = 2 * Pi,
- e = 2.718281828459045,
- e10 = 1.1051709180756477,
- Deg = 180 / Pi,
- SUME = 0,
- StdE = 0;
- for (i = 0; N - 1 > i; i++) SUME += residual[i];
- var len = N - 1,
- mid = Math.floor(len / 2),
- SUME1 = 0,
- SUME2 = 0,
- NE1 = 0,
- NE2 = 0;
- for (i = 0; mid > i; i++) SUME1 += residual[i], NE1++;
- for (i = mid; len > i; i++) SUME2 += residual[i], NE2++;
- var mean1 = SUME1 / NE1,
- mean2 = SUME2 / NE2,
- XE = SUME / len,
- XE1 = Math.round(1e7 * XE) / 1e7,
- mn1 = Math.round(1e7 * mean1) / 1e7,
- mn2 = Math.round(1e7 * mean2) / 1e7;
- for ($scope.regressionStats.RMEAN = XE1, $scope.regressionStats.mean1 = mn1, $scope.regressionStats.mean2 = mn2, i = 0; N - 1 > i; i++) StdE += Math.pow(residual[i] - XE, 2);
- var V1 = StdE / (len - 2),
- Vari2 = Math.round(1e7 * V1) / 1e7;
- $scope.regressionStats.ESQV = Vari2;
- var StdE1 = 0,
- StdE2 = 0;
- for (i = 0; mid > i; i++) StdE1 += Math.pow(residual[i] - mean1, 2);
- for (i = mid; len > i; i++) StdE2 += Math.pow(residual[i] - mean2, 2);
- var VR1 = StdE1 / (NE1 - 2),
- var1 = Math.round(1e7 * VR1) / 1e7;
- $scope.regressionStats.VR1 = var1;
- var VR2 = StdE2 / (NE2 - 2),
- var2 = Math.round(1e7 * VR2) / 1e7;
- $scope.regressionStats.VR2 = var2;
- var listA = [],
- listB = [],
- listC = [],
- listA2 = [],
- a1 = 0,
- sumA = 0;
- for (i = 1; len > i; i++) listA[a1] = parseFloat(residual[i]), sumA += parseFloat(residual[i]), a1++;
- var a4 = 0,
- sumA2 = 0;
- for (i = 2; len > i; i++) listA2[a4] = parseFloat(residual[i]), sumA2 += parseFloat(residual[i]), a4++;
- var a2 = 0,
- sumB = 0;
- for (i = 0; len - 1 > i; i++) listB[a2] = parseFloat(residual[i]), sumB += parseFloat(residual[i]), a2++;
- var a3 = 0,
- sumC = 0;
- for (i = 0; len - 2 > i; i++) listC[a3] = parseFloat(residual[i]), sumC += parseFloat(residual[i]), a3++;
- var meanA = sumA / a1,
- meanA2 = sumA2 / a4,
- meanB = sumB / a2,
- meanC = sumC / a3,
- varA = 0,
- varB = 0,
- covarAB = 0;
- for (i = 0; i < listA.length; i++) varA += Math.pow(listA[i] - meanA, 2), varB += Math.pow(listB[i] - meanB, 2), covarAB += (listB[i] - meanB) * (listA[i] - meanA);
- var R1 = covarAB / Math.sqrt(varA * varB),
- R11 = Math.round(1e7 * R1) / 1e7;
- $scope.regressionStats.FR1 = R11;
- var varA2 = 0,
- varC = 0,
- covarA2C = 0;
- for (i = 0; i < listA2.length; i++) varA2 += Math.pow(listA2[i] - meanA2, 2), varC += Math.pow(listC[i] - meanC, 2), covarA2C += (listA2[i] - meanA2) * (listC[i] - meanC);
- var R2 = covarA2C / Math.sqrt(varA2 * varC),
- R21 = Math.round(1e7 * R2) / 1e7;
- $scope.regressionStats.SR2 = R21;
- var ERR = residual[0],
- SUMABSERR = Math.abs(ERR),
- SSE = residual[0] * residual[0],
- DWNN = 0,
- DWND = residual[0] * residual[0],
- SUMERR = residual[0],
- DWN = 0,
- MAE = 0;
- for (i = 1; N > i; i++) ERR = residual[i], SUMERR += ERR, SUMABSERR += Math.abs(ERR), DWNN += (residual[i] - residual[i - 1]) * (residual[i] - residual[i - 1]), DWND += residual[i] * residual[i], SSE += ERR * ERR;
- var MAE = SUMABSERR / N,
- DW = DWNN / DWND;
- MAE = Math.round(1e5 * MAE) / 1e5, $scope.regressionStats.MAE = MAE, DW = Math.round(1e5 * DW) / 1e5, $scope.regressionStats.DW = DW;
- var SUMF = 0,
- FXX = 0,
- FX = 0,
- xvalN = [],
- freq = [];
- for (i = 0; len > i; i++) xvalN[i] = residual[i], freq[i] = 1;
- for (var i2 = 0; i2 < xvalN.length; i2++) SUMF += parseFloat(freq[i2]), FX += parseFloat(xvalN[i2]) * parseFloat(freq[i2]), FXX += parseFloat(freq[i2]) * Math.pow(parseFloat(xvalN[i2]), 2);
- var SN2 = FXX - FX * FX / SUMF;
- SN2 /= SUMF;
- for (var stdN = Math.sqrt(SN2), meanN = FX / SUMF, zval = [], i3 = 0; i3 < xvalN.length; i3++) zval[i3] = (xvalN[i3] - meanN) / stdN;
- var zvalS = [];
- for (i = 0; i < zval.length; i++) zvalS[i] = zval[i];
- for (i = 0; i < zvalS.length - 1; i++)
- for (j = i + 1; j < zvalS.length; j++)
- if (eval(zvalS[j]) < eval(zvalS[i])) {
- var temp = zvalS[i];
- zvalS[i] = zvalS[j], zvalS[j] = temp
- }
- var freqS = [];
- for (i = 0; i < freq.length; i++) freqS[i] = freq[i];
- for (i = 0; i < zval.length; i++)
- for (j = 0; j < zval.length; j++) zvalS[i] == zval[j] && (freqS[i] = freq[j]);
- for (var fval = [], F1 = 0, i6 = 0; i6 < zvalS.length; i6++) F1 = Norm(zvalS[i6]), zvalS[i6] >= 0 ? fval[i6] = 1 - F1 / 2 : fval[i6] = F1 / 2, F1 = 0;
- var jval = [];
- jval[0] = freqS[0] / SUMF;
- for (var i7 = 1; i7 < zvalS.length; i7++) jval[i7] = jval[i7 - 1] + freqS[i7] / SUMF;
- var DP = [];
- for (DP[0] = Math.abs(jval[0] - fval[0]), i = 1; N > i; i++) {
- var A = Math.abs(jval[i] - fval[i]),
- B = Math.abs(fval[i] - jval[i - 1]);
- DP[i] = Math.max(A, B)
- }
- for (i = 0; i < DP.length - 1; i++)
- for (j = i + 1; j < DP.length; j++) eval(DP[j]) < eval(DP[i]) && (temp = DP[i], DP[i] = DP[j], DP[j] = temp);
- var DPP = DP[DP.length - 1],
- D = DPP,
- td = D + "",
- A0 = Math.sqrt(SUMF),
- C1 = A0 - .01 + .85 / A0,
- D15 = .775 / C1,
- D10 = .819 / C1,
- D05 = .895 / C1,
- D025 = .995 / C1,
- t2N = D;
- t2N > D025 ? $scope.regressionStats.NCON = "Evidence against normality" : D025 >= t2N && t2N > D05 ? $scope.regressionStats.NCON = "Sufficient evidence against normality" : D05 >= t2N && t2N > D10 ? $scope.regressionStats.NCON = "Suggestive evidence against normality" : D10 >= t2N && t2N > D15 ? $scope.regressionStats.NCON = "Little evidence against normality" : D15 >= t2N ? $scope.regressionStats.NCON = "No evidences against normality" : $scope.regressionStats.NCON = "Evidence against normality"
- }
- $scope.regressionData || ($scope.regressionData = {});
- var N = 0,
- maxN = 16,
- M = 4;
- buildData(data);
- var X = new makeArray2(M, N),
- Y = [],
- SX = 0,
- SY = 0,
- SXX = 0,
- SXY = 0,
- SYY = 0,
- m = 0,
- abort = !1,
- regrCoeff = [],
- sigDig = 3;
- calc2(data)
- }, $scope.gateReviewData = [], $scope.gateReviewDataOrig = [], phaseComponentDetail = DataSyncService.getPhaseComponentDetail("Analyze", "Gate Review"), filter = [], filter.push(DataSyncService.buildFilter("ProjectId", null, "is", $scope.projectId)), filter.push({
- ao: "and"
- }), filter.push(DataSyncService.buildFilter("PhaseId", null, "is", phaseComponentDetail.PhaseId)), filter.push({
- andorsplit: "and"
- }), filter.push(DataSyncService.buildFilter("PhaseComponentId", null, "is", phaseComponentDetail.Id)), DataSyncService.sync(DataSyncService.buildRequest("get", ["gatereview"], null, [filter]), function(e) {
- e.success && ($scope.gateReviewData = $scope.addArrayIndexId(e.data), $scope.gateReviewDataOrig = angular.copy($scope.gateReviewData))
- }), $scope.gateReviewAddRow = function(e) {
- $scope.gateReviewData.push({
- arrayId: $scope.gateReviewData.length,
- Quadrant: e,
- Detail: " "
- })
- }, $scope.submitGateReview = function() {
- phaseComponentDetail = DataSyncService.getPhaseComponentDetail("Analyze", "Gate Review");
- for (var e = [], a = [], t = [], o = 0; o < $scope.gateReviewData.length; o++)
- if (!angular.equals($scope.gateReviewData[o], $scope.gateReviewDataOrig[o])) {
- var r = angular.copy($scope.gateReviewData[o]);
- r.Id && r.isDeleted ? (a.push(r.Id), $scope.gateReviewData[o].Id = !1) : r.Id ? (delete r.DateTimeCreated, delete r.LastUpdated, delete r.arrayId, e.push(r)) : r.Id || r.isDeleted || (r.ProjectId = $scope.projectId, r.PhaseId = phaseComponentDetail.PhaseId, r.PhaseComponentId = phaseComponentDetail.Id, delete r.arrayId, t.push(r))
- }
- DataSyncService.syncTableRowData("gatereview", t, e, a), $scope.gateReviewDataOrig = angular.copy($scope.gateReviewData)
- }) : $location.path("/project/" + $stateParams.pid)
- }), $scope.exportData = function(e, a) {
- var t = DataSyncService.getPhaseComponentDetail("Analyze", a),
- o = [];
- o.push(DataSyncService.buildFilter("ProjectId", null, "is", $scope.projectId)), o.push({
- ao: "and"
- }), o.push(DataSyncService.buildFilter("PhaseId", null, "is", t.PhaseId)), o.push({
- andorsplit: "and"
- }), o.push(DataSyncService.buildFilter("PhaseComponentId", null, "is", t.Id)), DataSyncService.exportData(e, o, function(e) {
- window.open(e.data)
- })
- }, $scope.addArrayIndexId = function(e) {
- for (var a = 0; a < e.length; a++) e[a].arrayId = a;
- return e
- }, $scope.addRow = function(e, a) {
- e.push(angular.copy($scope.dSchema[a]))
- }, $scope.deleteRow = function(e, a) {
- e[a].isDeleted = !0
- }, $scope.activateTab = function(e) {
- $scope.activeTab = activateTab($scope.activeTab, e)
- }, $scope.completePhaseComponent = function(e, a) {
- completePhaseComponent(e, a, $scope.projectId, DataSyncService, function(e) {
- e.success && (logger.logSuccess("Phase Updated!"), $scope.phaseDetail = DataSyncService.getPhaseDetail("Analyze"))
- })
- }, $timeout(function() {
- $scope.walkthrough = loadWalkthrough()
- }, 500), $scope.validateField = function(e, a) {
- e = e.currentTarget ? e.currentTarget : $("#" + e);
- var t = validateField(e, a),
- o = $(e).closest(".l6_step").parent().attr("data-phase-component");
- $scope.walkthrough[o].currentStep = t.currentStep, t.isVerified && ($scope.walkthrough[o] = moveNextStep($scope.walkthrough[o]))
- }, $scope.showWalkthrough = function(e, a) {
- $scope.addRow(a, e), $scope.walkthroughs[e] = !0
- }, $scope.hideWalkthrough = function(e) {
- $scope.walkthroughs[e] = !1, $scope.walkthrough[e] = resetWalkthrough($scope.walkthrough[e])
- }
- }
- angular.module("app.project").controller("ProjectAnalyzeCtrl", ["$scope", "$rootScope", "$stateParams", "DataSyncService", "$location", "logger", "$sce", "$timeout", "Upload", ProjectAnalyzeCtrl])
- }(),
- function() {
- "use strict";
- function e(e, a, t, o, r, n, i, s, l) {
- e.projectId = t.pid, e.activeTab = [!0, !1, !1, !1], e.activeTab = activateTab(e.activeTab, t.tid - 1);
- var c, u = {};
- e.walkthroughs = {
- control_plan: !1,
- test_plan: !1
- }, e.dSchema = {
- test_plan: {
- Subject: "",
- Area: "",
- Description: "",
- Details: "",
- ExpectedBenefits: "",
- ResponsibleParty: null,
- EstimatedCost: "",
- Timing: "",
- Status: "",
- Comments: ""
- },
- control_plan: {
- ProcessSteps: "",
- Kpiv: "",
- Kpov: "",
- SpecificationCharacteristic: "",
- Lsl: "",
- Usl: "",
- UnitOfMeasure: "",
- DataDescription: "",
- MeasurementMethod: "",
- SampleSize: "",
- MeasurementFrequency: "",
- WhoMeasures: "",
- WhereRecorded: "",
- CorrectiveAction: "",
- ApplicableSop: ""
- }
- }, o.loadProject(e.projectId, function(i) {
- i.success ? (e.projectDetail = a.currentProject, o.loadContacts(function(a) {
- e.allContacts = a
- }), e.phaseDetail = o.getPhaseDetail("Control"), e.scpData = null, u = o.getPhaseComponentDetail("Control", "SCP Chart"), c = [], c.push(o.buildFilter("ProjectId", null, "is", e.projectId)), c.push({
- ao: "and"
- }), c.push(o.buildFilter("PhaseId", null, "is", u.PhaseId)), c.push({
- andorsplit: "and"
- }), c.push(o.buildFilter("PhaseComponentId", null, "is", u.Id)), o.sync(o.buildRequest("get", ["chartexceldata"], null, [c]), function(a) {
- a.success && e.buildSCP(a.data[0].ExcelFileData)
- }), e.uploadSCPFile = function(a, t) {
- u = o.getPhaseComponentDetail("Control", "SCP Chart"), e.f = a, e.errFile = t && t[0], a && (a.upload = s.upload({
- url: "https://api.l6elite.com",
- data: {
- file: a,
- T: ["chartexceldata"],
- A: "upload",
- V: [{
- ProjectId: e.projectId,
- PhaseId: u.PhaseId,
- PhaseComponentId: u.Id
- }]
- }
- }), a.upload.then(function(a) {
- e.scpData = a.data, e.buildSCP(a.data.ExcelFileData)
- }, function(e) {
- e.status > 0 && n.logError(e.status + ": " + e.data)
- }, function(e) {
- a.progress = Math.min(100, parseInt(100 * e.loaded / e.total))
- }))
- }, e.buildSCP = function(a) {
- e.scpData || (e.scpData = {});
- var t = [],
- o = [],
- r = 0,
- i = 0,
- s = 0,
- l = 0,
- c = 0;
- for (var u in a) {
- var d = 0;
- if (u > 1) {
- var p = [];
- for (var h in a[u])
- if ("A" != h) {
- var g = a[u][h];
- if (null != g && "" != g) {
- if (!parseFloat(g) && 0 !== g) return n.logError("Data Contains Illegal Values. Data Should Only Contain Numeric Values!"), !1;
- p.push(g), d++
- }
- }
- p.length > 0 && (r = d, t.push([parseInt(c), math.mean(p)]), o.push(math.mean(p)), c++);
- }
- }
- o.sort(), i = math.round(math.mean(o), 2);
- var m = math.std(o) / math.sqrt(r);
- s = math.round(i + 3 * m, 2), l = math.round(i - 3 * m, 2), e.lineAvg = i, e.lineUCL = s, e.lineLCL = l;
- var f = i / 4;
- e.scpData.data = [{
- data: t,
- lines: {
- show: !0
- }
- }, {
- data: t,
- points: {
- show: !0
- }
- }], e.scpData.options = {
- yaxis: {
- min: l - f,
- max: s + f
- },
- series: {
- points: {
- lineWidth: 2,
- fill: !0,
- fillColor: "#ffffff",
- symbol: "circle",
- radius: 4
- }
- },
- grid: {
- hoverable: !0,
- clickable: !0,
- tickColor: "#f9f9f9",
- borderWidth: 1,
- borderColor: "#eeeeee",
- markings: [{
- color: "#000",
- lineWidth: 1,
- yaxis: {
- from: i,
- to: i
- }
- }, {
- color: "#ff0000",
- lineWidth: 1,
- yaxis: {
- from: s,
- to: s
- }
- }, {
- color: "#ff0000",
- lineWidth: 1,
- yaxis: {
- from: l,
- to: l
- }
- }]
- },
- tooltip: !0,
- tooltipOpts: {
- defaultTheme: !1
- },
- colors: [e.color.gray, e.color.primary, e.color.primary]
- }
- }, e.controlPlanData = [], e.controlPlanDataOrig = [], e.getControlPlan = function() {
- u = o.getPhaseComponentDetail("Control", "Control Plan"), c = [], c.push(o.buildFilter("ProjectId", null, "is", e.projectId)), c.push({
- ao: "and"
- }), c.push(o.buildFilter("PhaseId", null, "is", u.PhaseId)), c.push({
- andorsplit: "and"
- }), c.push(o.buildFilter("PhaseComponentId", null, "is", u.Id)), o.sync(o.buildRequest("get", ["measurecontrolplan"], null, [c]), function(a) {
- a.success ? (e.controlPlanData = a.data, e.controlPlanDataOrig = angular.copy(e.controlPlanData)) : e.showWalkthrough("control_plan", e.controlPlanData)
- })
- }, e.getControlPlan(), e.submitControlPlan = function() {
- u = o.getPhaseComponentDetail("Control", "Control Plan");
- for (var a = [], t = [], r = [], n = 0; n < e.controlPlanData.length; n++)
- if (!angular.equals(e.controlPlanData[n], e.controlPlanDataOrig[n])) {
- var i = angular.copy(e.controlPlanData[n]);
- i.Id && i.isDeleted ? (t.push(i.Id), e.controlPlanData[n].Id = !1) : i.Id ? (delete i.DateTimeCreated, delete i.LastUpdated, delete i.arrayId, a.push(i)) : i.Id || i.isDeleted || (i.ProjectId = e.projectId, i.PhaseId = u.PhaseId, i.PhaseComponentId = u.Id, r.push(i))
- }
- o.syncTableRowData("measurecontrolplan", r, a, t, null, function() {
- e.getControlPlan()
- })
- }, e.productTestPlanData = [], e.productTestPlanDataOrig = [], e.trainerTestPlanData = [], e.trainerTestPlanDataOrig = [], e.employeesTestPlanData = [], e.employeesTestPlanDataOrig = [], e.getTestPlan = function() {
- u = o.getPhaseComponentDetail("Control", "Test Plan"), c = [], c.push(o.buildFilter("ProjectId", null, "is", e.projectId)), c.push({
- ao: "and"
- }), c.push(o.buildFilter("PhaseId", null, "is", u.PhaseId)), c.push({
- andorsplit: "and"
- }), c.push(o.buildFilter("PhaseComponentId", null, "is", u.Id)), o.sync(o.buildRequest("get", ["controltestplan"], null, [c]), function(a) {
- if (a.success) {
- for (var t = a.data, o = 0; o < t.length; o++) "process" == t[o].Subject ? e.productTestPlanData.push(t[o]) : "trainer" == t[o].Subject ? e.trainerTestPlanData.push(t[o]) : "employees" == t[o].Subject && e.employeesTestPlanData.push(t[o]);
- e.productTestPlanDataOrig = angular.copy(e.productTestPlanData), e.trainerTestPlanDataOrig = angular.copy(e.trainerTestPlanData), e.employeesTestPlanDataOrig = angular.copy(e.employeesTestPlanData)
- } else e.showWalkthrough("test_plan", e.productTestPlanData)
- })
- }, e.getTestPlan(), e.submitTestPlan = function() {
- u = o.getPhaseComponentDetail("Control", "Test Plan");
- for (var a = [], t = [], r = [], n = 0; n < e.productTestPlanData.length; n++)
- if (!angular.equals(e.productTestPlanData[n], e.productTestPlanDataOrig[n])) {
- var i = angular.copy(e.productTestPlanData[n]);
- i.Subject = "process", i.Id && i.isDeleted ? (t.push(i.Id), e.productTestPlanData[n].Id = !1) : i.Id ? (delete i.DateTimeCreated, delete i.LastUpdated, a.push(i)) : i.Id || i.isDeleted || (i.ProjectId = e.projectId, i.PhaseId = u.PhaseId, i.PhaseComponentId = u.Id, r.push(i))
- }
- for (var n = 0; n < e.trainerTestPlanData.length; n++)
- if (!angular.equals(e.trainerTestPlanData[n], e.trainerTestPlanDataOrig[n])) {
- var i = angular.copy(e.trainerTestPlanData[n]);
- i.Subject = "trainer", i.Id && i.isDeleted ? (t.push(i.Id), e.trainerTestPlanData[n].Id = !1) : i.Id ? (delete i.DateTimeCreated, delete i.LastUpdated, a.push(i)) : i.Id || i.isDeleted || (i.ProjectId = e.projectId, i.PhaseId = u.PhaseId, i.PhaseComponentId = u.Id, r.push(i))
- }
- for (var n = 0; n < e.employeesTestPlanData.length; n++)
- if (!angular.equals(e.employeesTestPlanData[n], e.employeesTestPlanDataOrig[n])) {
- var i = angular.copy(e.employeesTestPlanData[n]);
- i.Subject = "employees", i.Id && i.isDeleted ? (t.push(i.Id), e.employeesTestPlanData[n].Id = !1) : i.Id ? (delete i.DateTimeCreated, delete i.LastUpdated, a.push(i)) : i.Id || i.isDeleted || (i.ProjectId = e.projectId, i.PhaseId = u.PhaseId, i.PhaseComponentId = u.Id, r.push(i))
- }
- o.syncTableRowData("controltestplan", r, a, t, null, function() {
- e.getTestPlan()
- })
- }, e.hypothesisTestData = null, u = o.getPhaseComponentDetail("Control", "Hypothesis Test"), c = [], c.push(o.buildFilter("ProjectId", null, "is", e.projectId)), c.push({
- ao: "and"
- }), c.push(o.buildFilter("PhaseId", null, "is", u.PhaseId)), c.push({
- andorsplit: "and"
- }), c.push(o.buildFilter("PhaseComponentId", null, "is", u.Id)), o.sync(o.buildRequest("get", ["chartexceldata"], null, [c]), function(a) {
- a.success && e.buildHypothesisTest(a.data[0].ExcelFileData)
- }), e.uploadHypothesisTestFile = function(a, t) {
- e.f = a, e.errFile = t && t[0], u = o.getPhaseComponentDetail("Control", "Hypothesis Test"), a && (a.upload = s.upload({
- url: "https://api.l6elite.com",
- data: {
- file: a,
- T: ["chartexceldata"],
- A: "upload",
- V: [{
- ProjectId: e.projectId,
- PhaseId: u.PhaseId,
- PhaseComponentId: u.Id
- }]
- }
- }), a.upload.then(function(a) {
- e.buildHypothesisTest(a.data.ExcelFileData)
- }, function(e) {
- e.status > 0 && n.logError(e.status + ": " + e.data)
- }, function(e) {
- a.progress = Math.min(100, parseInt(100 * e.loaded / e.total))
- }))
- }, e.buildHypothesisTest = function(e) {}, e.gateReviewData = [], e.gateReviewDataOrig = [], u = o.getPhaseComponentDetail("Control", "Gate Review"), c = [], c.push(o.buildFilter("ProjectId", null, "is", e.projectId)), c.push({
- ao: "and"
- }), c.push(o.buildFilter("PhaseId", null, "is", u.PhaseId)), c.push({
- andorsplit: "and"
- }), c.push(o.buildFilter("PhaseComponentId", null, "is", u.Id)), o.sync(o.buildRequest("get", ["gatereview"], null, [c]), function(a) {
- a.success && (e.gateReviewData = e.addArrayIndexId(a.data), e.gateReviewDataOrig = angular.copy(e.gateReviewData))
- }), e.gateReviewAddRow = function(a) {
- e.gateReviewData.push({
- arrayId: e.gateReviewData.length,
- Quadrant: a,
- Detail: " "
- })
- }, e.submitGateReview = function() {
- u = o.getPhaseComponentDetail("Control", "Gate Review");
- for (var a = [], t = [], r = [], n = 0; n < e.gateReviewData.length; n++)
- if (!angular.equals(e.gateReviewData[n], e.gateReviewDataOrig[n])) {
- var i = angular.copy(e.gateReviewData[n]);
- i.Id && i.isDeleted ? (t.push(i.Id), e.gateReviewData[n].Id = !1) : i.Id ? (delete i.DateTimeCreated, delete i.LastUpdated, delete i.arrayId, a.push(i)) : i.Id || i.isDeleted || (i.ProjectId = e.projectId, i.PhaseId = u.PhaseId, i.PhaseComponentId = u.Id, delete i.arrayId, r.push(i))
- }
- o.syncTableRowData("gatereview", r, a, t), e.gateReviewDataOrig = angular.copy(e.gateReviewData)
- }) : r.path("/project/" + t.pid)
- }), e.exportData = function(a, t) {
- var r = o.getPhaseComponentDetail("Control", t),
- n = [];
- n.push(o.buildFilter("ProjectId", null, "is", e.projectId)), n.push({
- ao: "and"
- }), n.push(o.buildFilter("PhaseId", null, "is", r.PhaseId)), n.push({
- andorsplit: "and"
- }), n.push(o.buildFilter("PhaseComponentId", null, "is", r.Id)), o.exportData(a, n, function(e) {
- window.open(e.data)
- })
- }, e.addArrayIndexId = function(e) {
- for (var a = 0; a < e.length; a++) e[a].arrayId = a;
- return e
- }, e.addRow = function(a, t) {
- a.push(angular.copy(e.dSchema[t]))
- }, e.deleteRow = function(e, a) {
- e[a].isDeleted = !0
- }, e.activateTab = function(a) {
- e.activeTab = activateTab(e.activeTab, a)
- }, e.completePhaseComponent = function(a, t) {
- completePhaseComponent(a, t, e.projectId, o, function(a) {
- a.success && (n.logSuccess("Phase Updated!"), e.phaseDetail = o.getPhaseDetail("Control"))
- })
- }, l(function() {
- e.walkthrough = loadWalkthrough()
- }, 500), e.validateField = function(a, t) {
- a = a.currentTarget ? a.currentTarget : $("#" + a);
- var o = validateField(a, t),
- r = $(a).closest(".l6_step").parent().attr("data-phase-component");
- e.walkthrough[r].currentStep = o.currentStep, o.isVerified && (e.walkthrough[r] = moveNextStep(e.walkthrough[r]))
- }, e.showWalkthrough = function(a, t) {
- e.addRow(t, a), e.walkthroughs[a] = !0
- }, e.hideWalkthrough = function(a) {
- e.walkthroughs[a] = !1, e.walkthrough[a] = resetWalkthrough(e.walkthrough[a])
- }
- }
- angular.module("app.project").controller("ProjectControlCtrl", ["$scope", "$rootScope", "$stateParams", "DataSyncService", "$location", "logger", "$sce", "Upload", "$timeout", "StatCalc", e])
- }(),
- function() {
- "use strict";
- function e(e, a, t, o, r, n, i, s) {
- e.walkthroughs = {
- voc_ccr: !1,
- risk_management: !1,
- raci: !1,
- stakeholders: !1,
- communication: !1
- }, e.projectId = t.pid, e.activeTab = [!0, !1, !1, !1, !1, !1, !1, !1, !1], e.activeTab = activateTab(e.activeTab, t.tid - 1), e.phaseDetail = {};
- var l, c = {};
- e.dSchema = {
- voc_ccr: {
- Item: "",
- Quantity: 0,
- CustomerIssues: "",
- CustomerRequirements: ""
- },
- risk_management: {
- DateEntered: "",
- CategoryArea: "",
- SpecificRisk: "",
- Severity: "",
- Likelihood: "",
- Detectibility: "",
- RiskPriority: "",
- MitigationSteps: "",
- PersonAccountable: [],
- DueDate: "",
- ContingencyPlan: ""
- },
- stakeholders: {
- UserId: null,
- SupportCategory: "",
- ResistanceType: "",
- ResistanceLevel: "",
- ResistanceStrategy: ""
- },
- sipoc: {
- Suppliers: "",
- Inputs: "",
- Outputs: "",
- Processes: "",
- Customers: "",
- ProcessMeasures: "",
- OutputMeasures: ""
- },
- communication: {
- Media: "",
- Purpose: "",
- Owner: "",
- Frequency: "",
- DayTime: "",
- Length: ""
- }
- }, o.loadProject(e.projectId, function(s) {
- e.allContacts = [], s.success ? (e.projectDetail = a.currentProject, e.diagramType = a.currentProject.DiagramType, e.phaseDetail = o.getPhaseDetail("Define"), e.projectCharter = loadCharter(a), o.loadContacts(function(t) {
- e.allContacts = t, e.projectCharter.Lead = populateMdContactVariable([a.currentProject.Lead], e.allContacts), e.projectCharter.Sponsor = populateMdContactVariable([a.currentProject.Sponsor], e.allContacts), e.projectCharter.CoreTeam = populateMdContactVariable(a.currentProject.CoreTeam ? JSON.parse(a.currentProject.CoreTeam) : [], e.allContacts)
- }), e.submitCharter = function() {
- saveCharter(e.projectCharter, "update", o, n)
- }, e.$watch("projectCharter", function() {
- e.projectCharter.Sponsor.length > 1 && e.projectCharter.Sponsor.pop(), e.projectCharter.Lead.length > 1 && e.projectCharter.Lead.pop()
- }, !0), e.vocCcrData = [], e.vocCcrDataOrig = [], e.getVocCCR = function() {
- c = o.getPhaseComponentDetail("Define", "VOC & CCR"), l = [], l.push(o.buildFilter("ProjectId", null, "is", e.projectId)), l.push({
- ao: "and"
- }), l.push(o.buildFilter("PhaseId", null, "is", c.PhaseId)), l.push({
- andorsplit: "and"
- }), l.push(o.buildFilter("PhaseComponentId", null, "is", c.Id)), o.sync(o.buildRequest("get", ["definevocccr"], null, [l]), function(a) {
- a.success ? (e.vocCcrData = a.data, e.vocCcrDataOrig = angular.copy(e.vocCcrData)) : e.showWalkthrough("voc_ccr", e.vocCcrData)
- })
- }, e.getVocCCR(), e.submitVocCcr = function() {
- c = o.getPhaseComponentDetail("Define", "VOC & CCR");
- for (var a = [], t = [], r = [], n = 0; n < e.vocCcrData.length; n++)
- if (!angular.equals(e.vocCcrData[n], e.vocCcrDataOrig[n])) {
- var i = angular.copy(e.vocCcrData[n]);
- i.Id && i.isDeleted ? (t.push(i.Id), e.vocCcrData[n].Id = !1) : i.Id ? (delete i.DateTimeCreated, delete i.LastUpdated, a.push(i)) : i.Id || i.isDeleted || (i.ProjectId = e.projectId, i.PhaseId = c.PhaseId, i.PhaseComponentId = c.Id, r.push(i))
- }
- for (var n = e.vocCcrData.length; n--;)("" == e.vocCcrData[n].Tool && "" == e.vocCcrData[n].Quantity && "" == e.vocCcrData[n].CustomerIssues && "" == e.vocCcrData[n].CustomerRequirements || !e.vocCcrData[n].hasOwnProperty("Tool")) && e.vocCcrData.splice(n, 1);
- o.syncTableRowData("definevocccr", r, a, t, null, function(a) {
- e.getVocCCR()
- })
- }, e.riskManagementData = [], e.riskManagementDataOrig = [], e.getRiskManagement = function() {
- c = o.getPhaseComponentDetail("Define", "Risk Management"), l = [], l.push(o.buildFilter("ProjectId", null, "is", e.projectId)), l.push({
- ao: "and"
- }), l.push(o.buildFilter("PhaseId", null, "is", c.PhaseId)), l.push({
- andorsplit: "and"
- }), l.push(o.buildFilter("PhaseComponentId", null, "is", c.Id)), o.sync(o.buildRequest("get", ["defineriskmanagement"], null, [l]), function(a) {
- if (a.success) {
- for (var t = 0; t < a.data.length; t++) a.data[t].DateEntered = moment(a.data[t].DateEntered).format("MM/DD/YYYY"), a.data[t].DueDate = new Date(a.data[t].DueDate);
- e.riskManagementData = a.data, e.riskManagementDataOrig = angular.copy(e.riskManagementData)
- } else e.showWalkthrough("risk_management", e.riskManagementData)
- })
- }, e.getRiskManagement(), e.submitRiskManagement = function() {
- c = o.getPhaseComponentDetail("Define", "Risk Management");
- for (var a = [], t = [], r = [], n = 0; n < e.riskManagementData.length; n++)
- if (!angular.equals(e.riskManagementData[n], e.riskManagementDataOrig[n])) {
- var i = angular.copy(e.riskManagementData[n]);
- i.Id && i.isDeleted ? (t.push(i.Id), e.riskManagementData[n].Id = !1) : i.Id ? (delete i.DateTimeCreated, delete i.LastUpdated, a.push(i)) : i.Id || i.isDeleted || (i.ProjectId = e.projectId, i.PhaseId = c.PhaseId, i.PhaseComponentId = c.Id, r.push(i)), i.DateEntered = new Date(i.DateEntered), i.DueDate = new Date(i.DueDate)
- }
- for (var n = e.riskManagementData.length; n--;)("" == e.riskManagementData[n].DateEntered && "" == e.riskManagementData[n].CategoryArea && "" == e.riskManagementData[n].SpecificRisk || !e.riskManagementData[n].hasOwnProperty("DateEntered")) && e.riskManagementData.splice(n, 1);
- o.syncTableRowData("defineriskmanagement", r, a, t, null, function() {
- e.getRiskManagement()
- })
- }, e.RACIData = {}, e.raciOwners = [], e.getRaciData = function() {
- c = o.getPhaseComponentDetail("Define", "RACI"), l = [], l.push(o.buildFilter("ProjectId", null, "is", e.projectId)), l.push({
- ao: "and"
- }), l.push(o.buildFilter("PhaseId", null, "is", c.PhaseId)), l.push({
- andorsplit: "and"
- }), l.push(o.buildFilter("PhaseComponentId", null, "is", c.Id)), o.sync(o.buildRequest("get", ["defineraci"], null, [l]), function(a) {
- if (a.success) {
- var t = a.data;
- e.RACIData = {}, e.raciOwners = JSON.parse(t[0].Owners);
- for (var o = 0; o < t.length; o++) e.RACIData[t[o].Activity] = {
- id: t[o].Id,
- label: t[o].Activity,
- data: JSON.parse(t[o].Raci)
- }
- } else e.showRACIWalkthrough()
- })
- }, e.getRaciData(), e.addRACIColumn = function() {
- var a = "New",
- t = 1;
- if (-1 != e.raciOwners.indexOf("New")) {
- do t++; while (e.raciOwners.indexOf("New" + t) > -1);
- a += t
- }
- e.raciOwners.push(a);
- for (var o in e.RACIData) e.RACIData[o].data.push("")
- }, e.addRACILine = function(a) {
- var t = 1,
- o = "New";
- if (a) var o = a;
- else if (e.RACIData.hasOwnProperty("New")) {
- do t++; while (e.RACIData.hasOwnProperty("New" + t));
- o += t
- }
- e.RACIData[o] = {
- label: a ? a : "New",
- data: []
- };
- for (var r = 0; r < e.raciOwners.length; r++) e.RACIData[o].data.push("")
- }, e.deleteRaciRow = function(a) {
- e.RACIData[a].isDeleted = !0
- }, e.deleteRaciCol = function(a) {
- e.raciOwners.splice(a, 1);
- for (var t in e.RACIData) e.RACIData[t].data.splice(a, 1)
- }, e.submitRACI = function() {
- c = o.getPhaseComponentDetail("Define", "RACI");
- var a = [],
- t = [],
- r = [];
- for (var n in e.RACIData) {
- var i = e.RACIData[n],
- s = {
- Activity: i.label,
- Owners: JSON.stringify(e.raciOwners),
- Raci: JSON.stringify(i.data),
- ProjectId: e.projectId,
- PhaseId: c.PhaseId,
- PhaseComponentId: c.Id
- };
- i.hasOwnProperty("id") && i.isDeleted ? (t.push(e.RACIData[n].id), delete e.RACIData[n]) : i.hasOwnProperty("id") ? (s.Id = i.id, a.push(s)) : i.isDeleted || r.push(s)
- }
- o.syncTableRowData("defineraci", r, a, t, null, function() {
- e.getRaciData()
- })
- }, e.stakeholderData = [], e.stakeholderDataOrig = [], e.getStakeHolders = function() {
- c = o.getPhaseComponentDetail("Define", "Stakeholders"), l = [], l.push(o.buildFilter("ProjectId", null, "is", e.projectId)), l.push({
- ao: "and"
- }), l.push(o.buildFilter("PhaseId", null, "is", c.PhaseId)), l.push({
- andorsplit: "and"
- }), l.push(o.buildFilter("PhaseComponentId", null, "is", c.Id)), o.sync(o.buildRequest("get", ["definestakeholders"], null, [l]), function(a) {
- if (a.success) {
- var t = a.data;
- t instanceof Array || (t = [t]);
- for (var o = [], r = 0; t && r < t.length; r++) o.push(t[r].UserId);
- e.stakeholderData = a.data, e.stakeholderDataOrig = angular.copy(e.stakeholderData), e.projectCharter.stakeholders = populateMdContactVariable(o, e.allContacts)
- } else e.showWalkthrough("stakeholders", e.stakeholderData)
- })
- }, e.getStakeHolders(), e.submitStakeholders = function() {
- c = o.getPhaseComponentDetail("Define", "Stakeholders");
- for (var a = [], t = [], r = [], n = 0; n < e.stakeholderData.length; n++)
- if (!angular.equals(e.stakeholderData[n], e.stakeholderDataOrig[n])) {
- var i = angular.copy(e.stakeholderData[n]);
- i.Id && i.isDeleted ? (t.push(i.Id), e.stakeholderData[n].Id = !1) : i.Id ? (delete i.DateTimeCreated, delete i.LastUpdated, a.push(i)) : i.Id || i.isDeleted || (i.ProjectId = e.projectId, i.PhaseId = c.PhaseId, i.PhaseComponentId = c.Id, r.push(i))
- }
- o.syncTableRowData("definestakeholders", r, a, t, null, function() {
- e.getStakeHolders()
- })
- }, e.sipocData = [], e.sipocDataOrig = [], e.getSipoc = function() {
- c = o.getPhaseComponentDetail("Define", "SIPOC"), l = [], l.push(o.buildFilter("ProjectId", null, "is", e.projectId)), l.push({
- ao: "and"
- }), l.push(o.buildFilter("PhaseId", null, "is", c.PhaseId)), l.push({
- andorsplit: "and"
- }), l.push(o.buildFilter("PhaseComponentId", null, "is", c.Id)), o.sync(o.buildRequest("get", ["definesipoc"], null, [l]), function(a) {
- a.success ? (e.sipocData = a.data, e.sipocDataOrig = angular.copy(e.sipocData)) : e.showWalkthrough("sipoc", e.sipocData)
- })
- }, e.getSipoc(), e.submitSipoc = function() {
- c = o.getPhaseComponentDetail("Define", "SIPOC");
- for (var a = [], t = [], r = [], n = 0; n < e.sipocData.length; n++)
- if (!angular.equals(e.sipocData[n], e.sipocDataOrig[n])) {
- var i = angular.copy(e.sipocData[n]);
- i.Id && i.isDeleted ? (t.push(i.Id), e.sipocData[n].Id = !1) : i.Id ? (delete i.DateTimeCreated, delete i.LastUpdated, a.push(i)) : i.Id || i.isDeleted || (i.ProjectId = e.projectId, i.PhaseId = c.PhaseId, i.PhaseComponentId = c.Id, r.push(i))
- }
- e.sipocDataOrig = angular.copy(e.sipocData), o.syncTableRowData("definesipoc", r, a, t, null, function() {
- e.getSipoc()
- })
- }, e.valueStreamDiagram = {}, c = o.getPhaseComponentDetail("Define", "Value Stream Diagram"), l = [], l.push(o.buildFilter("ProjectId", null, "is", e.projectId)), l.push({
- ao: "and"
- }), l.push(o.buildFilter("PhaseId", null, "is", c.PhaseId)), l.push({
- andorsplit: "and"
- }), l.push(o.buildFilter("PhaseComponentId", null, "is", c.Id)), o.sync(o.buildRequest("get", ["valuestreamdiagram"], null, [l]), function(a) {
- a.success && (e.valueStreamDiagram = a.data[0], e.defineValueStreamDiagram = i.trustAsHtml(e.valueStreamDiagram.Svg), e.valueStreamDiagram.hasProcessMap = e.valueStreamDiagram.hasOwnProperty("Svg") && "" != e.valueStreamDiagram.Svg ? !0 : !1)
- }), e.communicationData = [], e.communicationDataOrig = [], e.getCommData = function() {
- c = o.getPhaseComponentDetail("Define", "Communication"), l = [], l.push(o.buildFilter("ProjectId", null, "is", e.projectId)), l.push({
- ao: "and"
- }), l.push(o.buildFilter("PhaseId", null, "is", c.PhaseId)), l.push({
- andorsplit: "and"
- }), l.push(o.buildFilter("PhaseComponentId", null, "is", c.Id)), o.sync(o.buildRequest("get", ["definecommunication"], null, [l]), function(a) {
- a.success ? (e.communicationData = a.data, e.communicationDataOrig = angular.copy(e.communicationData)) : e.showWalkthrough("communication", e.communicationData)
- })
- }, e.getCommData(), e.submitCommunication = function() {
- c = o.getPhaseComponentDetail("Define", "Communication");
- for (var a = [], t = [], r = [], n = 0; n < e.communicationData.length; n++)
- if (!angular.equals(e.communicationData[n], e.communicationDataOrig[n])) {
- var i = angular.copy(e.communicationData[n]);
- i.Id && i.isDeleted ? (t.push(i.Id), e.communicationData[n].Id = !1) : i.Id ? (delete i.DateTimeCreated, delete i.LastUpdated, a.push(i)) : i.Id || i.isDeleted || (i.ProjectId = e.projectId, i.PhaseId = c.PhaseId, i.PhaseComponentId = c.Id, r.push(i))
- }
- o.syncTableRowData("definecommunication", r, a, t, null, function() {
- e.getCommData()
- })
- }, e.gateReviewData = [], e.gateReviewDataOrig = [], e.getGateReview = function() {
- c = o.getPhaseComponentDetail("Define", "Gate Review"), l = [], l.push(o.buildFilter("ProjectId", null, "is", e.projectId)), l.push({
- ao: "and"
- }), l.push(o.buildFilter("PhaseId", null, "is", c.PhaseId)), l.push({
- andorsplit: "and"
- }), l.push(o.buildFilter("PhaseComponentId", null, "is", c.Id)), o.sync(o.buildRequest("get", ["definegatereview"], null, [l]), function(a) {
- a.success && (e.gateReviewData = e.addArrayIndexId(a.data), e.gateReviewDataOrig = angular.copy(e.gateReviewData))
- })
- }, e.getGateReview(), e.gateReviewAddRow = function(a) {
- console.log(e.gateReviewData), e.gateReviewData.push({
- arrayId: e.gateReviewData.length,
- Quadrant: a,
- Detail: " "
- })
- }, e.submitGateReview = function() {
- c = o.getPhaseComponentDetail("Define", "Gate Review");
- for (var a = [], t = [], r = [], n = 0; n < e.gateReviewData.length; n++)
- if (!angular.equals(e.gateReviewData[n], e.gateReviewDataOrig[n])) {
- var i = angular.copy(e.gateReviewData[n]);
- i.Id && i.isDeleted ? (t.push(i.Id), e.gateReviewData[n].Id = !1) : i.Id ? (delete i.DateTimeCreated, delete i.LastUpdated, delete i.arrayId, a.push(i)) : i.Id || i.isDeleted || (i.ProjectId = e.projectId, i.PhaseId = c.PhaseId, i.PhaseComponentId = c.Id, delete i.arrayId, r.push(i))
- }
- o.syncTableRowData("definegatereview", r, a, t, null, function() {
- e.getGateReview()
- })
- }) : r.path("/project/" + t.pid)
- }), e.exportData = function(a, t) {
- var r = o.getPhaseComponentDetail("Define", t),
- n = [];
- n.push(o.buildFilter("ProjectId", null, "is", e.projectId)), n.push({
- ao: "and"
- }), n.push(o.buildFilter("PhaseId", null, "is", r.PhaseId)), n.push({
- andorsplit: "and"
- }), n.push(o.buildFilter("PhaseComponentId", null, "is", r.Id)), o.exportData(a, n, function(e) {
- window.open(e.data)
- })
- }, e.addArrayIndexId = function(e) {
- for (var a = 0; a < e.length; a++) e[a].arrayId = a;
- return e
- }, e.addRow = function(a, t) {
- a.push(angular.copy(e.dSchema[t]))
- }, e.deleteRow = function(e, a) {
- e[a].isDeleted = !0
- }, e.querySearch = function(a) {
- var t = a ? e.allContacts.filter(e.createFilterFor(a)) : [];
- return t
- }, e.createFilterFor = function(e) {
- var a = angular.lowercase(e);
- return function(e) {
- return -1 !== e._lowername.indexOf(a)
- }
- }, e.completePhaseComponent = function(a, t) {
- completePhaseComponent(a, t, e.projectId, o, function(a) {
- a.success && (n.logSuccess("Phase Updated!"), e.phaseDetail = o.getPhaseDetail("Define"))
- })
- }, e.filterSelected = !0, e.activateTab = function(a) {
- e.activeTab = activateTab(e.activeTab, a)
- }, e.openCalendar = function(a) {
- e.projectCharter[a].status.opened = !0
- }, s(function() {
- e.walkthrough = loadWalkthrough()
- }, 500), e.validateField = function(a, t) {
- console.log(t), a = a.currentTarget ? a.currentTarget : $("#" + a);
- var o = validateField(a, t),
- r = $(a).closest(".l6_step").parent().attr("data-phase-component");
- console.log($(a).parent()), e.walkthrough[r].currentStep = o.currentStep, o.isVerified && (e.walkthrough[r] = moveNextStep(e.walkthrough[r]))
- }, e.raciWalkthroughData = {
- activity: "",
- owner: "",
- responsibility: ""
- }, e.submitRACIWalkthrough = function() {
- e.RACIData.hasOwnProperty(e.raciWalkthroughData.activity) ? 1 !== e.raciOwners.indexOf(e.raciWalkthroughData.owner) ? e.RACIData[e.raciWalkthroughData.activity].data[e.raciOwners.indexOf(e.raciWalkthroughData.owner)] = e.raciWalkthroughData.responsibility : (e.addRACIColumn(), e.raciOwners[e.raciOwners.length - 1] = e.raciWalkthroughData.owner, e.RACIData[e.raciWalkthroughData.activity].data[e.raciOwners.length - 1] = e.raciWalkthroughData.responsibility) : (e.addRACILine(e.raciWalkthroughData.activity), e.RACIData[e.raciWalkthroughData.activity].label = e.raciWalkthroughData.activity, -1 !== e.raciOwners.indexOf(e.raciWalkthroughData.owner) ? e.RACIData[e.raciWalkthroughData.activity].data[e.raciOwners.indexOf(e.raciWalkthroughData.owner)] = e.raciWalkthroughData.responsibility : (e.addRACIColumn(), e.raciOwners[e.raciOwners.length - 1] = e.raciWalkthroughData.owner, e.RACIData[e.raciWalkthroughData.activity].data[e.raciOwners.length - 1] = e.raciWalkthroughData.responsibility)), e.hideWalkthrough("raci")
- }, e.showRACIWalkthrough = function() {
- e.raciWalkthroughData = {
- activity: "",
- owner: "",
- responsibility: ""
- }, e.walkthroughs.raci = !0
- }, e.showWalkthrough = function(a, t) {
- e.addRow(t, a), e.walkthroughs[a] = !0
- }, e.hideWalkthrough = function(a) {
- e.walkthroughs[a] = !1, e.walkthrough[a] = resetWalkthrough(e.walkthrough[a])
- }
- }
- angular.module("app.project").controller("ProjectDefineCtrl", ["$scope", "$rootScope", "$stateParams", "DataSyncService", "$location", "logger", "$sce", "$timeout", e])
- }(),
- function() {
- "use strict";
- function e(e, a, t, o, r) {
- e.ProjectHistoryData = [], o.getUserSubordinates(function(t) {
- var r = [a.globals.userDetails.Id];
- if (t.success)
- for (var n = 0; t.data && n < t.data.length; n++) t.data[n].Id && r.push(t.data[n].Id);
- e.subordinates = r;
- var i = [o.buildFilter("CreatedBy", null, "anyof", r)];
- o.sync(o.buildRequest("get", ["projects"], null, [i]), function(a) {
- a.success ? (e.allProjects = a.data, "object" != typeof e.allProjects && (e.allProjects = []), e.allProjects instanceof Array || (e.allProjects = [e.allProjects])) : e.allProjects = [], o.loadContacts(function(a) {
- for (var t = {}, o = 0; e.allProjects && o < e.allProjects.length; o++) {
- var r = "",
- n = moment(e.allProjects[o].DateTimeCreated).format("MMMM YYYY"),
- i = e.allProjects[o];
- t[n] || (t[n] = []);
- for (var s = 0; a && s < a.length; s++)
- if (a[s].id == i.CreatedBy) {
- r = a[s].name + " (" + a[s].worktitle + ")";
- break
- }
- i.CreatedBy = r, i.CompletionPercentage = parseInt(i.CompletionPercentage), t[n].push(i)
- }
- for (var l in t) e.ProjectHistoryData.push({
- date: l,
- projects: t[l]
- })
- })
- })
- })
- }
- angular.module("app.project").controller("ProjectHistoryCtrl", ["$scope", "$rootScope", "$stateParams", "DataSyncService", "$location", e])
- }(),
- function() {
- "use strict";
- function e(e, a, t, o, r, n, i, s) {
- e.projectId = t.pid, e.activeTab = [!0, !1, !1], e.activeTab = activateTab(e.activeTab, t.tid - 1);
- var l, c = {};
- e.walkthroughs = {
- improvementPlan: !1
- }, e.dSchema = {
- improvementPlan: {
- Process: "",
- Goal: "",
- ActionNeeded: "",
- ResourceResponsible: "",
- Challenges: "",
- Measures: ""
- }
- }, o.loadProject(e.projectId, function(n) {
- n.success ? (e.projectDetail = a.currentProject, e.diagramType = a.currentProject.DiagramType, "Value Stream Diagram" !== e.diagramType && e.activeTab[0] === !0 && (e.activeTab[0] = !1, e.activeTab[1] = !0), e.phaseDetail = o.getPhaseDetail("Improve"), e.valueStreamDiagram = {}, c = o.getPhaseComponentDetail("Improve", "Value Stream Diagram"), l = [], l.push(o.buildFilter("ProjectId", null, "is", e.projectId)), l.push({
- ao: "and"
- }), l.push(o.buildFilter("PhaseId", null, "is", c.PhaseId)), l.push({
- andorsplit: "and"
- }), l.push(o.buildFilter("PhaseComponentId", null, "is", c.Id)), o.sync(o.buildRequest("get", ["valuestreamdiagram"], null, [l]), function(a) {
- if (a.success) e.valueStreamDiagram = a.data[0], e.valueStreamDiagram.hasProcessMap = e.valueStreamDiagram.hasOwnProperty("Svg") && "" != e.valueStreamDiagram.Svg ? !0 : !1, e.improveValueStreamDiagram = i.trustAsHtml(e.valueStreamDiagram.Svg);
- else {
- var t = o.getPhaseComponentDetail("Measure", "Value Stream Diagram");
- l = [], l.push(o.buildFilter("ProjectId", null, "is", e.projectId)), l.push({
- ao: "and"
- }), l.push(o.buildFilter("PhaseId", null, "is", t.PhaseId)), l.push({
- andorsplit: "and"
- }), l.push(o.buildFilter("PhaseComponentId", null, "is", t.Id)), o.sync(o.buildRequest("get", ["valuestreamdiagram"], null, [l]), function(a) {
- a.success ? (e.valueStreamDiagram = a.data[0], e.improveValueStreamDiagram = i.trustAsHtml(e.valueStreamDiagram.Svg), e.valueStreamDiagram.hasProcessMap = e.valueStreamDiagram.hasOwnProperty("Svg") && "" != e.valueStreamDiagram.Svg ? !0 : !1) : (t = o.getPhaseComponentDetail("Define", "Value Stream Diagram"), l = [], l.push(o.buildFilter("ProjectId", null, "is", e.projectId)), l.push({
- ao: "and"
- }), l.push(o.buildFilter("PhaseId", null, "is", t.PhaseId)), l.push({
- andorsplit: "and"
- }), l.push(o.buildFilter("PhaseComponentId", null, "is", t.Id)), o.sync(o.buildRequest("get", ["valuestreamdiagram"], null, [l]), function(a) {
- a.success && (e.valueStreamDiagram = a.data[0], e.improveValueStreamDiagram = i.trustAsHtml(e.valueStreamDiagram.Svg), e.valueStreamDiagram.hasProcessMap = e.valueStreamDiagram.hasOwnProperty("Svg") && "" != e.valueStreamDiagram.Svg ? !0 : !1)
- }))
- })
- }
- }), e.improvementPlanData = [], e.improvementPlanDataOrig = [], e.getImprovementPlan = function() {
- c = o.getPhaseComponentDetail("Improve", "Improvement Plan"), l = [], l.push(o.buildFilter("ProjectId", null, "is", e.projectId)), l.push({
- ao: "and"
- }), l.push(o.buildFilter("PhaseId", null, "is", c.PhaseId)), l.push({
- andorsplit: "and"
- }), l.push(o.buildFilter("PhaseComponentId", null, "is", c.Id)), o.sync(o.buildRequest("get", ["improveimprovementplan"], null, [l]), function(a) {
- a.success ? (e.improvementPlanData = a.data, e.improvementPlanDataOrig = angular.copy(e.improvementPlanData)) : e.showWalkthrough("improvementPlan", e.improvementPlanData)
- })
- }, e.getImprovementPlan(), e.submitImprovementPlan = function() {
- c = o.getPhaseComponentDetail("Improve", "Improvement Plan");
- for (var a = [], t = [], r = [], n = 0; n < e.improvementPlanData.length; n++)
- if (!angular.equals(e.improvementPlanData[n], e.improvementPlanDataOrig[n])) {
- var i = angular.copy(e.improvementPlanData[n]);
- i.Id && i.isDeleted ? (t.push(i.Id), e.improvementPlanData[n].Id = !1) : i.Id ? (delete i.DateTimeCreated, delete i.LastUpdated, a.push(i)) : i.Id || i.isDeleted || (i.ProjectId = e.projectId, i.PhaseId = c.PhaseId, i.PhaseComponentId = c.Id, r.push(i))
- }
- o.syncTableRowData("improveimprovementplan", r, a, t, null, function() {
- e.getImprovementPlan()
- })
- }, e.gateReviewData = [], e.gateReviewDataOrig = [], c = o.getPhaseComponentDetail("Improve", "Gate Review"), l = [], l.push(o.buildFilter("ProjectId", null, "is", e.projectId)), l.push({
- ao: "and"
- }), l.push(o.buildFilter("PhaseId", null, "is", c.PhaseId)), l.push({
- andorsplit: "and"
- }), l.push(o.buildFilter("PhaseComponentId", null, "is", c.Id)), o.sync(o.buildRequest("get", ["gatereview"], null, [l]), function(a) {
- a.success && (e.gateReviewData = e.addArrayIndexId(a.data), e.gateReviewDataOrig = angular.copy(e.gateReviewData))
- }), e.gateReviewAddRow = function(a) {
- e.gateReviewData.push({
- arrayId: e.gateReviewData.length,
- Quadrant: a,
- Detail: " "
- })
- }, e.submitGateReview = function() {
- c = o.getPhaseComponentDetail("Improve", "Gate Review");
- for (var a = [], t = [], r = [], n = 0; n < e.gateReviewData.length; n++)
- if (!angular.equals(e.gateReviewData[n], e.gateReviewDataOrig[n])) {
- var i = angular.copy(e.gateReviewData[n]);
- i.Id && i.isDeleted ? (t.push(i.Id), e.gateReviewData[n].Id = !1) : i.Id ? (delete i.DateTimeCreated, delete i.LastUpdated, delete i.arrayId, a.push(i)) : i.Id || i.isDeleted || (i.ProjectId = e.projectId, i.PhaseId = c.PhaseId, i.PhaseComponentId = c.Id, delete i.arrayId, r.push(i))
- }
- o.syncTableRowData("gatereview", r, a, t), e.gateReviewDataOrig = angular.copy(e.gateReviewData)
- }) : r.path("/project/" + t.pid), o.loadContacts(function(a) {
- e.allContacts = a
- })
- }), e.exportData = function(a, t) {
- var r = o.getPhaseComponentDetail("Improve", t),
- n = [];
- n.push(o.buildFilter("ProjectId", null, "is", e.projectId)), n.push({
- ao: "and"
- }), n.push(o.buildFilter("PhaseId", null, "is", r.PhaseId)), n.push({
- andorsplit: "and"
- }), n.push(o.buildFilter("PhaseComponentId", null, "is", r.Id)), o.exportData(a, n, function(e) {
- window.open(e.data)
- })
- }, e.addArrayIndexId = function(e) {
- for (var a = 0; a < e.length; a++) e[a].arrayId = a;
- return e
- }, e.addRow = function(a, t) {
- a.push(angular.copy(e.dSchema[t]))
- }, e.deleteRow = function(e, a) {
- e[a].isDeleted = !0
- }, e.activateTab = function(a) {
- e.activeTab = activateTab(e.activeTab, a)
- }, e.completePhaseComponent = function(a, t) {
- completePhaseComponent(a, t, e.projectId, o, function(a) {
- a.success && (n.logSuccess("Phase Updated!"), e.phaseDetail = o.getPhaseDetail("Improve"))
- })
- }, s(function() {
- e.walkthrough = loadWalkthrough()
- }, 500), e.validateField = function(a, t) {
- a = a.currentTarget ? a.currentTarget : $("#" + a);
- var o = validateField(a, t),
- r = $(a).closest(".l6_step").parent().attr("data-phase-component");
- e.walkthrough[r].currentStep = o.currentStep, o.isVerified && (e.walkthrough[r] = moveNextStep(e.walkthrough[r]))
- }, e.showWalkthrough = function(a, t) {
- e.addRow(t, a), e.walkthroughs[a] = !0
- }, e.hideWalkthrough = function(a) {
- e.walkthroughs[a] = !1, e.walkthrough[a] = resetWalkthrough(e.walkthrough[a])
- }
- }
- angular.module("app.project").controller("ProjectImproveCtrl", ["$scope", "$rootScope", "$stateParams", "DataSyncService", "$location", "logger", "$sce", "$timeout", e])
- }(),
- function() {
- "use strict";
- function e(e, a, t, o, r, n, i, s, l) {
- e.walkthroughs = {
- non_value_analysis: !1,
- cne_matrix: !1,
- collection_plan: !1,
- "control-plan": !1,
- histogram: !1
- }, e.projectId = t.pid, e.activeTab = [!0, !1, !1, !1, !1, !1], e.activeTab = activateTab(e.activeTab, t.tid - 1);
- var c, u = {};
- e.dSchema = {
- non_value_analysis: {
- Waste: "",
- Improvements: ""
- },
- collection_plan: {
- Measure: "",
- MeasureType: "",
- DataType: "",
- OperationalDefinition: "",
- Specification: "",
- Target: "",
- DataCollectionForm: "",
- Sampling: "",
- BaselineSigma: ""
- },
- control_plan: {
- ProcessSteps: "",
- Ctq: "",
- SpecificationCharacteristic: "",
- Lsl: "",
- Usl: "",
- UnitOfMeasure: "",
- DataDescription: "",
- MeasurementMethod: "",
- SampleSize: "",
- MeasurementFrequency: "",
- WhoMeasures: "",
- WhereRecorded: "",
- CorrectiveAction: "",
- ApplicableSop: ""
- }
- }, o.loadProject(e.projectId, function(d) {
- if (d.success) {
- e.projectDetail = a.currentProject, e.diagramType = a.currentProject.DiagramType, o.loadContacts(function(a) {
- e.allContacts = a
- }), e.phaseDetail = o.getPhaseDetail("Measure"), e.nonValueAnalysisData = [], e.nonValueAnalysisDataOrig = [], e.getNonValueAnalysis = function() {
- u = o.getPhaseComponentDetail("Measure", "Non-Value Analysis"), c = [], c.push(o.buildFilter("ProjectId", null, "is", e.projectId)), c.push({
- ao: "and"
- }), c.push(o.buildFilter("PhaseId", null, "is", u.PhaseId)), c.push({
- andorsplit: "and"
- }), c.push(o.buildFilter("PhaseComponentId", null, "is", u.Id)), o.sync(o.buildRequest("get", ["measurenonvalueanalysis"], null, [c]), function(a) {
- a.success ? (e.nonValueAnalysisData = a.data, e.nonValueAnalysisDataOrig = angular.copy(e.nonValueAnalysisData)) : e.showWalkthrough("non_value_analysis", e.nonValueAnalysisData)
- })
- }, e.getNonValueAnalysis(), e.submitNonValueAnalysis = function() {
- u = o.getPhaseComponentDetail("Measure", "Non-Value Analysis");
- for (var a = [], t = [], r = [], n = 0; n < e.nonValueAnalysisData.length; n++)
- if (!angular.equals(e.nonValueAnalysisData[n], e.nonValueAnalysisDataOrig[n])) {
- var i = angular.copy(e.nonValueAnalysisData[n]);
- i.Id && i.isDeleted ? (t.push(i.Id), e.nonValueAnalysisData[n].Id = !1) : i.Id ? (delete i.DateTimeCreated,
- delete i.LastUpdated, delete i.arrayId, a.push(i)) : i.Id || i.isDeleted || (i.ProjectId = e.projectId, i.PhaseId = u.PhaseId, i.PhaseComponentId = u.Id, r.push(i))
- }
- o.syncTableRowData("measurenonvalueanalysis", r, a, t, null, function() {
- e.getNonValueAnalysis()
- })
- }, e.ceMatrixRowData = [], e.ceMatrixRowDataOrig = [], e.ceMatrixOutputData = [], e.ceMatrixOutputDataOrig = [], e.ceMatrixColData = [], e.ceMatrixColDataOrig = [];
- var p = !0;
- u = o.getPhaseComponentDetail("Measure", "C&E Matrix"), e.loadCEMatrixData = function() {
- c = [], c.push(o.buildFilter("ProjectId", null, "is", e.projectId)), c.push({
- ao: "and"
- }), c.push(o.buildFilter("PhaseId", null, "is", u.PhaseId)), c.push({
- andorsplit: "and"
- }), c.push(o.buildFilter("PhaseComponentId", null, "is", u.Id)), o.sync(o.buildRequest("get", ["analyzecematrix"], null, [c]), function(a) {
- if (a.success) {
- 1 == a.data.length && "" == a.data[0].ProcessInput && (e.walkthroughs.cne_matrix = !0), u = o.getPhaseComponentDetail("Measure", "C&E Matrix"), e.ceMatrixRowData = a.data, e.ceMatrixRowDataOrig = angular.copy(e.ceMatrixRowData);
- for (var t = [], r = 0; r < e.ceMatrixRowData.length; r++) t.push(e.ceMatrixRowData[r].Id);
- var n = [];
- n.push(o.buildFilter("MatrixId", null, "anyof", t)), o.sync(o.buildRequest("get", ["analyzecematrixdata"], null, [n]), function(a) {
- u = o.getPhaseComponentDetail("Measure", "C&E Matrix"), a.success && (e.ceMatrixColData = a.data, e.ceMatrixColDataOrig = angular.copy(e.ceMatrixColData));
- var t = [];
- t.push(o.buildFilter("ProjectId", null, "is", e.projectId)), t.push({
- ao: "and"
- }), t.push(o.buildFilter("PhaseId", null, "is", u.PhaseId)), t.push({
- andorsplit: "and"
- }), t.push(o.buildFilter("PhaseComponentId", null, "is", u.Id)), o.sync(o.buildRequest("get", ["analyzecematrixoutputs"], null, [t]), function(a) {
- if (a.success) {
- e.ceMatrixOutputData = a.data, e.ceMatrixOutputDataOrig = angular.copy(e.ceMatrixOutputData);
- for (var t = 0; t < e.ceMatrixRowData.length; t++) {
- e.ceMatrixRowData[t].colData = [];
- for (var o = 0; o < e.ceMatrixOutputData.length; o++) {
- for (var r = !1, n = 0; n < e.ceMatrixColData.length; n++) e.ceMatrixColData[n].MatrixId == e.ceMatrixRowData[t].Id && e.ceMatrixColData[n].MatrixOutputId == e.ceMatrixOutputData[o].Id && (e.ceMatrixRowData[t].colData.push(e.ceMatrixColData[n]), r = !0);
- r || e.ceMatrixRowData[t].colData.push({
- MatrixId: e.ceMatrixRowData[t].Id,
- MatrixOutputId: e.ceMatrixOutputData[o].Id,
- Correlation: ""
- })
- }
- }
- }
- e.calculateTotals(), p = !1
- })
- })
- } else {
- u = o.getPhaseComponentDetail("Measure", "C&E Matrix");
- var i = [];
- i.push(o.buildFilter("ProjectId", null, "is", e.projectId)), i.push({
- ao: "and"
- }), i.push(o.buildFilter("PhaseId", null, "is", u.PhaseId)), i.push({
- andorsplit: "and"
- }), i.push(o.buildFilter("PhaseComponentId", null, "is", u.Id)), o.sync(o.buildRequest("get", ["analyzecematrixoutputs"], null, [i]), function(a) {
- a.success ? (1 == a.data.length && "" == a.data[0].ProcessOutput && (e.walkthroughs.cne_matrix = !0), e.ceMatrixOutputData = a.data, e.ceMatrixOutputDataOrig = angular.copy(e.ceMatrixOutputData)) : e.showCNEWalkthrough(), p = !1
- })
- }
- })
- }, e.deleteCEColumn = function(a) {
- e.ceMatrixOutputData[a].isDeleted = !0, e.ceMatrixOutputData[a].Importance = 0;
- for (var t = 0; t < e.ceMatrixRowData.length; t++) e.ceMatrixRowData[t].colData[a].isDeleted = !0, e.ceMatrixRowData[t].colData[a].Correlation = 0
- }, e.deleteCERow = function(a) {
- e.ceMatrixRowData[a].isDeleted = !0;
- for (var t = 0; t < e.ceMatrixRowData[a].colData.length; t++) e.ceMatrixRowData[a].colData[t].isDeleted = !0, e.ceMatrixRowData[a].colData[t].Correlation = 0
- }, e.addCEMatrixRow = function() {
- u = o.getPhaseComponentDetail("Measure", "C&E Matrix");
- var a = [],
- t = {
- ProjectId: e.projectId,
- PhaseId: u.PhaseId,
- PhaseComponentId: u.Id,
- ProcessStep: "",
- ProcessInput: ""
- };
- o.sync(o.buildRequest("add", ["analyzecematrix"], null, null, [t]), function(t) {
- if (t.success) {
- for (var o = t.data.Id, r = 0; r < e.ceMatrixOutputData.length; r++) {
- var n = {
- MatrixId: o,
- MatrixOutputId: e.ceMatrixOutputData[r].Id,
- Correlation: ""
- };
- a.push(n)
- }
- t.data.colData = a, e.ceMatrixRowData.push(t.data), e.ceMatrixRowDataOrig = angular.copy(e.ceMatrixRowData)
- }
- })
- }, e.addCEMatrixColumn = function() {
- u = o.getPhaseComponentDetail("Measure", "C&E Matrix");
- var a = {
- ProjectId: e.projectId,
- PhaseId: u.PhaseId,
- PhaseComponentId: u.Id,
- ProcessOutput: "",
- Importance: ""
- };
- o.sync(o.buildRequest("add", ["analyzecematrixoutputs"], null, null, [a]), function(a) {
- if (a.success) {
- var t = a.data.Id;
- e.ceMatrixOutputData.push(a.data);
- for (var o = 0; o < e.ceMatrixRowData.length; o++) e.ceMatrixRowData[o].colData.push({
- MatrixId: e.ceMatrixRowData[o].Id,
- MatrixOutputId: t,
- Correlation: ""
- });
- e.ceMatrixOutputDataOrig = angular.copy(e.ceMatrixOutputData)
- } else n.logError("Oops! An Error Occurred While Trying To Add A Column. Are You Still Connected To The Internet?")
- })
- }, e.showCNEWalkthrough = function() {
- return e.addCEMatrixColumn(), e.addCEMatrixRow(), e.walkthroughs.cne_matrix = !0, !1
- }, e.submitCEMatrix = function() {
- u = o.getPhaseComponentDetail("Measure", "C&E Matrix");
- for (var a = [], t = [], r = [], n = [], i = [], s = 0; s < e.ceMatrixOutputData.length; s++) {
- var c = angular.copy(e.ceMatrixOutputData[s]);
- c.Id && c.isDeleted ? (t.push(c.Id), e.ceMatrixOutputData[s].Id = !1) : c.Id && (delete c.DateTimeCreated, delete c.LastUpdated, a.push(c))
- }
- o.syncTableRowData("analyzecematrixoutputs", r, a, t, !1), e.ceMatrixOutputDataOrig = angular.copy(e.ceMatrixOutputData), a = [], t = [], r = [];
- for (var s = 0; s < e.ceMatrixRowData.length; s++) {
- var c = angular.copy(e.ceMatrixRowData[s]);
- if (c.Id && c.isDeleted) t.push(c.Id), e.ceMatrixRowData[s].Id = !1;
- else if (c.Id) {
- for (var d = 0; c.colData && d < c.colData.length; d++) {
- var p = angular.copy(c.colData[d]);
- p.Id && !p.isDeleted ? (delete p.DateTimeCreated, delete p.LastUpdated, n.push(p)) : p.isDeleted || i.push(p)
- }
- delete c.DateTimeCreated, delete c.LastUpdated, delete c.colData, delete c.rowTotal, a.push(c)
- }
- }
- o.syncTableRowData("analyzecematrix", r, a, t, !1), o.syncTableRowData("analyzecematrixdata", i, n, []), e.ceMatrixRowDataOrig = angular.copy(e.ceMatrixRowData), l(function() {
- e.loadCEMatrixData()
- }, 1200)
- }, e.loadCEMatrixData(), e.collectionPlanData = [], e.collectionPlanDataOrig = [], e.getCollectionPlan = function() {
- u = o.getPhaseComponentDetail("Measure", "Collection Plan"), c = [], c.push(o.buildFilter("ProjectId", null, "is", e.projectId)), c.push({
- ao: "and"
- }), c.push(o.buildFilter("PhaseId", null, "is", u.PhaseId)), c.push({
- andorsplit: "and"
- }), c.push(o.buildFilter("PhaseComponentId", null, "is", u.Id)), o.sync(o.buildRequest("get", ["measurecollectionplan"], null, [c]), function(a) {
- a.success ? (e.collectionPlanData = a.data, e.collectionPlanDataOrig = angular.copy(e.collectionPlanData)) : e.showWalkthrough("collection_plan", e.collectionPlanData)
- })
- }, e.getCollectionPlan(), e.submitCollectionPlan = function() {
- u = o.getPhaseComponentDetail("Measure", "Collection Plan");
- for (var a = [], t = [], r = [], n = 0; n < e.collectionPlanData.length; n++)
- if (!angular.equals(e.collectionPlanData[n], e.collectionPlanDataOrig[n])) {
- var i = angular.copy(e.collectionPlanData[n]);
- i.Id && i.isDeleted ? (t.push(i.Id), e.collectionPlanData[n].Id = !1) : i.Id ? (delete i.DateTimeCreated, delete i.LastUpdated, delete i.arrayId, a.push(i)) : i.Id || i.isDeleted || (i.ProjectId = e.projectId, i.PhaseId = u.PhaseId, i.PhaseComponentId = u.Id, r.push(i))
- }
- o.syncTableRowData("measurecollectionplan", r, a, t, null, function() {
- e.getCollectionPlan()
- })
- }, e.histogramData = null, u = o.getPhaseComponentDetail("Measure", "Histogram"), c = [], c.push(o.buildFilter("ProjectId", null, "is", e.projectId)), c.push({
- ao: "and"
- }), c.push(o.buildFilter("PhaseId", null, "is", u.PhaseId)), c.push({
- andorsplit: "and"
- }), c.push(o.buildFilter("PhaseComponentId", null, "is", u.Id)), o.sync(o.buildRequest("get", ["chartexceldata"], null, [c]), function(a) {
- a.success && e.buildHistogram(a.data[0].ExcelFileData)
- }), e.uploadHistogramFile = function(a, t) {
- e.f = a, e.errFile = t && t[0], u = o.getPhaseComponentDetail("Measure", "Histogram"), a && (a.upload = s.upload({
- url: "https://api.l6elite.com",
- data: {
- file: a,
- T: ["chartexceldata"],
- A: "upload",
- V: [{
- ProjectId: e.projectId,
- PhaseId: u.PhaseId,
- PhaseComponentId: u.Id
- }]
- }
- }), a.upload.then(function(a) {
- e.buildHistogram(a.data.ExcelFileData)
- }, function(e) {
- e.status > 0 && n.logError(e.status + ": " + e.data)
- }, function(e) {
- a.progress = Math.min(100, parseInt(100 * e.loaded / e.total))
- }))
- }, e.buildHistogram = function(a) {
- var t = [],
- o = {},
- r = 0;
- for (var i in a)
- if (i > 1) {
- var s = a[i];
- for (var l in s)
- if (null !== s[l] && "" !== s[l]) {
- var c = s[l];
- if (!parseFloat(c) && 0 !== c) return n.logError("Data Contains Illegal Values. Data Should Only Contain Numeric Values!"), !1;
- o.hasOwnProperty(c) ? o[c] += 1 : o[c] = 1, r++
- }
- }
- for (var u in o) t.push(u);
- t.sort();
- var d = t[t.length - 1] - t[0],
- p = Math.round(Math.sqrt(r));
- 10 > p && (p = 10);
- for (var h = d / p, g = t[0] - h, m = [], f = [], v = 1; p >= v; v++) {
- var D = Math.round(10 * g) / 10,
- C = Math.round(10 * (g + h)) / 10,
- y = 0;
- m.push(D + " - " + C);
- for (var b = 0; b < t.length; b++) t[b] >= D && t[b] <= C && (y += o[t[b]]);
- f.push(y), g = 1 > h ? C + .1 : C + 1
- }
- e.histogramData = {
- labels: m,
- data: [f],
- options: {
- barValueSpacing: 5
- },
- range: Math.round(10 * d) / 10,
- cWidth: Math.round(10 * h) / 10
- }
- }, e.controlPlanData = [], e.controlPlanDataOrig = [], e.getControlPlan = function() {
- u = o.getPhaseComponentDetail("Measure", "Control Plan"), c = [], c.push(o.buildFilter("ProjectId", null, "is", e.projectId)), c.push({
- ao: "and"
- }), c.push(o.buildFilter("PhaseId", null, "is", u.PhaseId)), c.push({
- andorsplit: "and"
- }), c.push(o.buildFilter("PhaseComponentId", null, "is", u.Id)), o.sync(o.buildRequest("get", ["measurecontrolplan"], null, [c]), function(a) {
- a.success ? (e.controlPlanData = a.data, e.controlPlanDataOrig = angular.copy(e.controlPlanData)) : e.showWalkthrough("control_plan", e.controlPlanData)
- })
- }, e.getControlPlan(), e.submitControlPlan = function() {
- u = o.getPhaseComponentDetail("Measure", "Control Plan");
- for (var a = [], t = [], r = [], n = 0; n < e.controlPlanData.length; n++)
- if (!angular.equals(e.controlPlanData[n], e.controlPlanDataOrig[n])) {
- var i = angular.copy(e.controlPlanData[n]);
- i.Id && i.isDeleted ? (t.push(i.Id), e.controlPlanData[n].Id = !1) : i.Id ? (delete i.DateTimeCreated, delete i.LastUpdated, delete i.arrayId, a.push(i)) : i.Id || i.isDeleted || (i.ProjectId = e.projectId, i.PhaseId = u.PhaseId, i.PhaseComponentId = u.Id, r.push(i))
- }
- o.syncTableRowData("measurecontrolplan", r, a, t, null, function() {
- e.getControlPlan()
- })
- }, e.valueStreamDiagram = {}, u = o.getPhaseComponentDetail("Measure", "Value Stream Diagram"), c = [], c.push(o.buildFilter("ProjectId", null, "is", e.projectId)), c.push({
- ao: "and"
- }), c.push(o.buildFilter("PhaseId", null, "is", u.PhaseId)), c.push({
- andorsplit: "and"
- }), c.push(o.buildFilter("PhaseComponentId", null, "is", u.Id)), o.sync(o.buildRequest("get", ["valuestreamdiagram"], null, [c]), function(a) {
- if (a.success) e.valueStreamDiagram = a.data[0], e.valueStreamDiagram.hasProcessMap = e.valueStreamDiagram.hasOwnProperty("Svg") && "" != e.valueStreamDiagram.Svg ? !0 : !1, e.measureValueStreamDiagram = i.trustAsHtml(e.valueStreamDiagram.Svg);
- else {
- var t = o.getPhaseComponentDetail("Define", "Value Stream Diagram");
- c = [], c.push(o.buildFilter("ProjectId", null, "is", e.projectId)), c.push(o.buildFilter("PhaseId", null, "is", t.PhaseId)), c.push(o.buildFilter("PhaseComponentId", null, "is", t.Id)), o.sync(o.buildRequest("get", ["valuestreamdiagram"], null, [c]), function(a) {
- a.success && (e.valueStreamDiagram = a.data[0], e.measureValueStreamDiagram = i.trustAsHtml(e.valueStreamDiagram.Svg), e.valueStreamDiagram.hasProcessMap = e.valueStreamDiagram.hasOwnProperty("Svg") && "" != e.valueStreamDiagram.Svg ? !0 : !1)
- })
- }
- }), e.gateReviewData = [], e.gateReviewDataOrig = [], e.getGateReview = function() {
- u = o.getPhaseComponentDetail("Measure", "Gate Review"), c = [], c.push(o.buildFilter("ProjectId", null, "is", e.projectId)), c.push({
- ao: "and"
- }), c.push(o.buildFilter("PhaseId", null, "is", u.PhaseId)), c.push({
- andorsplit: "and"
- }), c.push(o.buildFilter("PhaseComponentId", null, "is", u.Id)), o.sync(o.buildRequest("get", ["gatereview"], null, [c]), function(a) {
- a.success && (e.gateReviewData = e.addArrayIndexId(a.data), e.gateReviewDataOrig = angular.copy(e.gateReviewData))
- })
- }, e.getGateReview(), e.gateReviewAddRow = function(a) {
- e.gateReviewData.push({
- arrayId: e.gateReviewData.length,
- Quadrant: a,
- Detail: " "
- })
- }, e.submitGateReview = function() {
- u = o.getPhaseComponentDetail("Measure", "Gate Review");
- for (var a = [], t = [], r = [], n = 0; n < e.gateReviewData.length; n++)
- if (!angular.equals(e.gateReviewData[n], e.gateReviewDataOrig[n])) {
- var i = angular.copy(e.gateReviewData[n]);
- i.Id && i.isDeleted ? (t.push(i.Id), e.gateReviewData[n].Id = !1) : i.Id ? (delete i.DateTimeCreated, delete i.LastUpdated, delete i.arrayId, a.push(i)) : i.Id || i.isDeleted || (i.ProjectId = e.projectId, i.PhaseId = u.PhaseId, i.PhaseComponentId = u.Id, delete i.arrayId, r.push(i))
- }
- o.syncTableRowData("gatereview", r, a, t, null, function() {
- e.getGateReview()
- })
- }
- } else r.path("/project/" + t.pid)
- }), e.exportData = function(a, t) {
- var r = o.getPhaseComponentDetail("Measure", t),
- n = [];
- n.push(o.buildFilter("ProjectId", null, "is", e.projectId)), n.push({
- ao: "and"
- }), n.push(o.buildFilter("PhaseId", null, "is", r.PhaseId)), n.push({
- andorsplit: "and"
- }), n.push(o.buildFilter("PhaseComponentId", null, "is", r.Id)), o.exportData(a, n, function(e) {
- window.open(e.data)
- })
- }, e.addRow = function(a, t) {
- a.push(angular.copy(e.dSchema[t]))
- }, e.deleteRow = function(e, a) {
- e[a].isDeleted = !0
- }, e.addArrayIndexId = function(e) {
- for (var a = 0; a < e.length; a++) e[a].arrayId = a;
- return e
- }, e.activateTab = function(a) {
- e.activeTab = activateTab(e.activeTab, a)
- }, e.completePhaseComponent = function(a, t) {
- completePhaseComponent(a, t, e.projectId, o, function(a) {
- a.success && (n.logSuccess("Phase Updated!"), e.phaseDetail = o.getPhaseDetail("Measure"))
- })
- }, e.calculateTotals = function() {
- for (var a = 0; a < e.ceMatrixRowData.length; a++) {
- for (var t = 0, o = 0; o < e.ceMatrixRowData[a].colData.length; o++) t += ("" != e.ceMatrixRowData[a].colData[o].Correlation ? parseInt(e.ceMatrixRowData[a].colData[o].Correlation) : 0) * (e.ceMatrixOutputData[o].Importance ? parseInt(e.ceMatrixOutputData[o].Importance) : 0);
- e.ceMatrixRowData[a].rowTotal = t
- }
- }, l(function() {
- e.walkthrough = loadWalkthrough()
- }, 500), e.validateField = function(a, t) {
- a = a.currentTarget ? a.currentTarget : $("#" + a);
- var o = validateField(a, t),
- r = $(a).closest(".l6_step").parent().attr("data-phase-component");
- e.walkthrough[r].currentStep = o.currentStep, o.isVerified && (e.walkthrough[r] = moveNextStep(e.walkthrough[r]))
- }, e.showWalkthrough = function(a, t) {
- e.addRow(t, a), e.walkthroughs[a] = !0
- }, e.hideWalkthrough = function(a) {
- e.walkthroughs[a] = !1, e.walkthrough[a] = resetWalkthrough(e.walkthrough[a])
- }
- }
- function a(e) {
- e.$watch("cd.Correlation", function(a, t) {
- e.firstLoad || e.calculateTotals()
- }), e.$watch("matrixOP.Importance", function(a, t) {
- e.firstLoad || e.calculateTotals()
- })
- }
- angular.module("app.project").controller("ProjectMeasureCtrl", ["$scope", "$rootScope", "$stateParams", "DataSyncService", "$location", "logger", "$sce", "Upload", "$timeout", e]).controller("ProjectAnalyzeCEItemCtrl", ["$scope", a])
- }();
Add Comment
Please, Sign In to add comment