diff --git a/ng6-seed/package-lock.json b/ng6-seed/package-lock.json index 6c56cb46a..67231c52a 100644 --- a/ng6-seed/package-lock.json +++ b/ng6-seed/package-lock.json @@ -4273,8 +4273,7 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "aproba": { "version": "1.2.0", @@ -4295,14 +4294,12 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -4317,20 +4314,17 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "core-util-is": { "version": "1.0.2", @@ -4447,8 +4441,7 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "ini": { "version": "1.3.5", @@ -4460,7 +4453,6 @@ "version": "1.0.0", "bundled": true, "dev": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -4475,7 +4467,6 @@ "version": "3.0.4", "bundled": true, "dev": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -4483,14 +4474,12 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, - "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -4509,7 +4498,6 @@ "version": "0.5.1", "bundled": true, "dev": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -4590,8 +4578,7 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "object-assign": { "version": "4.1.1", @@ -4603,7 +4590,6 @@ "version": "1.4.0", "bundled": true, "dev": true, - "optional": true, "requires": { "wrappy": "1" } @@ -4689,8 +4675,7 @@ "safe-buffer": { "version": "5.1.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "safer-buffer": { "version": "2.1.2", @@ -4726,7 +4711,6 @@ "version": "1.0.2", "bundled": true, "dev": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -4746,7 +4730,6 @@ "version": "3.0.1", "bundled": true, "dev": true, - "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -4790,14 +4773,12 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "yallist": { "version": "3.0.2", "bundled": true, - "dev": true, - "optional": true + "dev": true } } }, diff --git a/ng6-seed/src/app/dashboard/dashboard.component.html b/ng6-seed/src/app/dashboard/dashboard.component.html index 276146a03..4f840d978 100644 --- a/ng6-seed/src/app/dashboard/dashboard.component.html +++ b/ng6-seed/src/app/dashboard/dashboard.component.html @@ -1,96 +1,167 @@
- +
- - Today's Status - -
- + + + + {{dashboardTitle}} + + +
+
Full - {{total1}}
+ + + +
+
+
Smart - {{total2}}
+ +
+ +
+
Tele - {{total3}}
+ +
+
+
+
+ -
-
- - Today's Details - - -
- Full - - -
- -
- Smart - + Full +
+
- Tele - + Smart +
-
-
-
- -
-
- - Alert warning - - - - - -

{{item.applicantname}}

-

{{item.applicantid}}

-

{{item.lendername}} - {{item.status}}

-
-
-
-
-
-
- -
- - Lenderwise - - - - - -

{{item.lendername}} / {{item.billingaddr}}

-

Full -{{item.fullpd}} / Smart -{{item.smartpd}} / Tele - {{item.telepd}}

-
-
-
-
-
-
-
- - CityWise - - - - -

{{item.cityname}}

-

Full -{{item.fullpd}} / Smart -{{item.smartpd}} / Tele - {{item.telepd}}

-
-
-
-
-
-
- -
-
-
\ No newline at end of file +
+ Tele + + +
+ + + --> + + +
+
+ + Alert warning + + + + + + + +

{{item.applicant_name}}

+

{{item.lender_applicant_id}}

+

{{item.entity_name}} - {{item.pd_status}}

+
+
+
+
+
+
+ + +
+ + Lenderwise + + + + + + + + +

{{item.full_name}} / {{item.city_name}}

+

{{item.PDTYPE}} -{{item.count}}

+ + + +
+
+
+
+
+
+ +
+ + CityWise + + + + + + +

{{item.city_name}}

+ +

{{item.PDTYPE}} -{{item.count}} + + +

+
+
+
+
+
+
+
diff --git a/ng6-seed/src/app/dashboard/dashboard.component.scss b/ng6-seed/src/app/dashboard/dashboard.component.scss index 02efbd61c..fc7f8f15d 100644 --- a/ng6-seed/src/app/dashboard/dashboard.component.scss +++ b/ng6-seed/src/app/dashboard/dashboard.component.scss @@ -8,538 +8,547 @@ mat-card-title{ padding-bottom: 1rem; margin-bottom: 0px; } -.profile { - position: relative; - width: 100%; - height: 100%; - background: rgba(white, .25); - border-radius: 2px; - overflow: hidden; - box-shadow: 0 0 20px rgba(darken($red, 40%), .2); - &.pre-enter { - transform-origin: center center; - transform: scaleY(0); - .avatar { - transform-origin: center top; - transform: scaleY(0); - } - h1, - h2, - a.follow, - a.link { - opacity: 0; - transform: translateY(300px); - } - } - &.on-enter { - animation: scaleYIn 1000ms ease-out forwards; - .avatar { - animation: scaleYIn-small 750ms ease-out forwards 1000ms; - } - h1, - h2, - a.follow, - a.link { - opacity: 1; - animation: slideInUp 1000ms ease-out forwards; - } - h1 { - animation-delay: 1050ms; - } - h2 { - animation-delay: 1100ms; - } - a.follow { - animation-delay: 1250ms; - } - li { - &:nth-child(1) { - a.link { - animation-delay: 1300ms; - } - } - &:nth-child(2) { - a.link { - animation-delay: 1350ms; - } - } - &:nth-child(3) { - a.link { - animation-delay: 1400ms; - } - } - } - } -} +.donut-inner h5 { + margin-bottom: 5px; + margin-top: 0; + } +// .profile { +// position: relative; +// width: 100%; +// height: 100%; +// background: rgba(white, .25); +// border-radius: 2px; +// overflow: hidden; +// box-shadow: 0 0 20px rgba(darken($red, 40%), .2); +// &.pre-enter { +// transform-origin: center center; +// transform: scaleY(0); +// .avatar { +// transform-origin: center top; +// transform: scaleY(0); +// } +// h1, +// h2, +// a.follow, +// a.link { +// opacity: 0; +// transform: translateY(300px); +// } +// } +// &.on-enter { +// animation: scaleYIn 1000ms ease-out forwards; +// .avatar { +// animation: scaleYIn-small 750ms ease-out forwards 1000ms; +// } +// h1, +// h2, +// a.follow, +// a.link { +// opacity: 1; +// animation: slideInUp 1000ms ease-out forwards; +// } +// h1 { +// animation-delay: 1050ms; +// } +// h2 { +// animation-delay: 1100ms; +// } +// a.follow { +// animation-delay: 1250ms; +// } +// li { +// &:nth-child(1) { +// a.link { +// animation-delay: 1300ms; +// } +// } +// &:nth-child(2) { +// a.link { +// animation-delay: 1350ms; +// } +// } +// &:nth-child(3) { +// a.link { +// animation-delay: 1400ms; +// } +// } +// } +// } +// } -.background { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - background: white; - border-radius: 2px; -} +// .background { +// position: absolute; +// top: 0; +// left: 0; +// width: 100%; +// height: 100%; +// background: white; +// border-radius: 2px; +// } -.avatar, -.info { - width: 100%; - height: 50%; -} +// .avatar, +// .info { +// width: 100%; +// height: 50%; +// } -.avatar { - background: url('../../assets/images/1.jpg') no-repeat center center / cover; - clip-path: polygon(0 0, 100% 0, 100% 75%, 0% 100%); -} +// .avatar { +// background: url('../../assets/images/1.jpg') no-repeat center center / cover; +// clip-path: polygon(0 0, 100% 0, 100% 75%, 0% 100%); +// } -.prof-list { - li { - display: inline-block; - list-style: none; - } -} +// .prof-list { +// li { +// display: inline-block; +// list-style: none; +// } +// } -.info { - display: flex; - flex-flow: row wrap; - align-items: center; - align-content: center; - justify-content: center; - position: relative; - text-align: center; - h1 { - padding: $p $p 0; - width: 100%; - font-size: 24px; - font-weight: 800; - letter-spacing: 2px; - text-transform: uppercase; - } - h2, - a.follow { - display: block; +// .info { +// display: flex; +// flex-flow: row wrap; +// align-items: center; +// align-content: center; +// justify-content: center; +// position: relative; +// text-align: center; +// h1 { +// padding: $p $p 0; +// width: 100%; +// font-size: 24px; +// font-weight: 800; +// letter-spacing: 2px; +// text-transform: uppercase; +// } +// h2, +// a.follow { +// display: block; - border-radius: 2px; - padding: $p/2; - color: white; - font-size: 12px; - font-weight: 500; - letter-spacing: 1px; - text-transform: uppercase; - } - h2 { - background: $red; - background: linear-gradient(135deg, rgba(#f5825f, 1) 0%, rgba(#f5005f, 1) 100%); - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f5825f', endColorstr='#f5005f', GradientType=1); - } - a.follow { - margin-left: $p; - background: $blue; - background: linear-gradient(135deg, rgba(#05c8e0, 1) 0%, rgba(#057fe0, 1) 100%); - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#05c8e0', endColorstr='#057fe0', GradientType=1); - &:hover, - &:focus { - background: #05c8e0; - background: linear-gradient(135deg, rgba(lighten(#05c8e0, 10%), 1) 0%, rgba(lighten(#057fe0, 10%), 1) 100%); - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='lighten(#05c8e0, 10%)', endColorstr='lighten(#057fe0, 10%)', GradientType=1); - } - &:active { - background: #057fe0; - background: linear-gradient(135deg, rgba(darken(#05c8e0, 5%), 1) 0%, rgba(darken(#057fe0, 5%), 1) 100%); - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='darken(#05c8e0, 5%)', endColorstr='darken(#057fe0, 5%)', GradientType=1); - } - } - ul { - display: flex; - justify-content: center; - padding: $p/2; - width: 100%; - li { - padding: $p/2; - } - } - a.link { - display: block; - border-radius: 100%; - background: $blue; - width: 30px; - height: 30px; - line-height: 30px; - display: block; - } -} +// border-radius: 2px; +// padding: $p/2; +// color: white; +// font-size: 12px; +// font-weight: 500; +// letter-spacing: 1px; +// text-transform: uppercase; +// } +// h2 { +// background: $red; +// background: linear-gradient(135deg, rgba(#f5825f, 1) 0%, rgba(#f5005f, 1) 100%); +// filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f5825f', endColorstr='#f5005f', GradientType=1); +// } +// a.follow { +// margin-left: $p; +// background: $blue; +// background: linear-gradient(135deg, rgba(#05c8e0, 1) 0%, rgba(#057fe0, 1) 100%); +// filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#05c8e0', endColorstr='#057fe0', GradientType=1); +// &:hover, +// &:focus { +// background: #05c8e0; +// background: linear-gradient(135deg, rgba(lighten(#05c8e0, 10%), 1) 0%, rgba(lighten(#057fe0, 10%), 1) 100%); +// filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='lighten(#05c8e0, 10%)', endColorstr='lighten(#057fe0, 10%)', GradientType=1); +// } +// &:active { +// background: #057fe0; +// background: linear-gradient(135deg, rgba(darken(#05c8e0, 5%), 1) 0%, rgba(darken(#057fe0, 5%), 1) 100%); +// filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='darken(#05c8e0, 5%)', endColorstr='darken(#057fe0, 5%)', GradientType=1); +// } +// } +// ul { +// display: flex; +// justify-content: center; +// padding: $p/2; +// width: 100%; +// li { +// padding: $p/2; +// } +// } +// a.link { +// display: block; +// border-radius: 100%; +// background: $blue; +// width: 30px; +// height: 30px; +// line-height: 30px; +// display: block; +// } +// } -a.link { - &.portfolio { - background: #f5c8bf; - background: linear-gradient(135deg, rgba(#f5c8bf, 1) 0%, rgba(#f58dbf, 1) 100%); - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f5c8bf', endColorstr='#f58dbf', GradientType=1); - box-shadow: inset 0 0 10px rgba(#f58dbf, .5); - &:hover, - &:focus { - background: lighten(#f5c8bf, 5%); - background: linear-gradient(135deg, rgba(lighten(#f5c8bf, 5%), 1) 0%, rgba(lighten(#f58dbf, 5%), 1) 100%); - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='lighten(#f5c8bf, 5%)', endColorstr='lighten(#f58dbf, 5%)', GradientType=1); - box-shadow: inset 0 0 10px rgba(lighten(#f58dbf, 5%), .5); - } - &:active { - background: darken(#f5c8bf, 5%); - background: linear-gradient(135deg, rgba(darken(#f5c8bf, 5%), 1) 0%, rgba(darken(#f58dbf, 5%), 1) 100%); - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='darken(#f5c8bf, 5%)', endColorstr='darken(#f58dbf, 5%)', GradientType=1); - box-shadow: inset 0 0 10px rgba(darken(#f58dbf, 5%), .5); - } - } - &.codepen { - background: #fcd000; - background: linear-gradient(135deg, rgba(#fcd000, 1) 0%, rgba(#fc9a00, 1) 100%); - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fcd000', endColorstr='#fc9a00', GradientType=1); - box-shadow: inset 0 0 10px rgba(#fc9a00, .5); - &:hover, - &:focus { - background: lighten(#fcd000, 5%); - background: linear-gradient(135deg, rgba(lighten(#fcd000, 5%), 1) 0%, rgba(lighten(#fc9a00, 5%), 1) 100%); - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='lighten(#fcd000, 5%)', endColorstr='lighten(#fc9a00, 5%)', GradientType=1); - box-shadow: inset 0 0 10px rgba(lighten(#fc9a00, 5%), .5); - } - &:active { - background: darken(#fcd000, 5%); - background: linear-gradient(135deg, rgba(darken(#fcd000, 5%), 1) 0%, rgba(darken(#fc9a00, 5%), 1) 100%); - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='darken(#fcd000, 5%)', endColorstr='darken(#fc9a00, 5%)', GradientType=1); - box-shadow: inset 0 0 10px rgba(darken(#fc9a00, 5%), .5); - } - } - &.github { - background: #41adc4; - background: linear-gradient(135deg, rgba(#41adc4, 1) 0%, rgba(#4183c4, 1) 100%); - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#41adc4', endColorstr='#4183c4', GradientType=1); - box-shadow: inset 0 0 10px rgba(#4183c4, .5); - &:hover, - &:focus { - background: lighten(#41adc4, 5%); - background: linear-gradient(135deg, rgba(lighten(#41adc4, 5%), 1) 0%, rgba(lighten(#4183c4, 5%), 1) 100%); - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='lighten(#41adc4, 5%)', endColorstr='lighten(#4183c4, 5%)', GradientType=1); - box-shadow: inset 0 0 10px rgba(lighten(#4183c4, 5%), .5); - } - &:active { - background: darken(#41adc4, 5%); - background: linear-gradient(135deg, rgba(darken(#41adc4, 5%), 1) 0%, rgba(darken(#4183c4, 5%), 1) 100%); - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='darken(#41adc4, 5%)', endColorstr='darken(#4183c4, 5%)', GradientType=1); - box-shadow: inset 0 0 10px rgba(darken(#4183c4, 5%), .5); - } - } -} +// a.link { +// &.portfolio { +// background: #f5c8bf; +// background: linear-gradient(135deg, rgba(#f5c8bf, 1) 0%, rgba(#f58dbf, 1) 100%); +// filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f5c8bf', endColorstr='#f58dbf', GradientType=1); +// box-shadow: inset 0 0 10px rgba(#f58dbf, .5); +// &:hover, +// &:focus { +// background: lighten(#f5c8bf, 5%); +// background: linear-gradient(135deg, rgba(lighten(#f5c8bf, 5%), 1) 0%, rgba(lighten(#f58dbf, 5%), 1) 100%); +// filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='lighten(#f5c8bf, 5%)', endColorstr='lighten(#f58dbf, 5%)', GradientType=1); +// box-shadow: inset 0 0 10px rgba(lighten(#f58dbf, 5%), .5); +// } +// &:active { +// background: darken(#f5c8bf, 5%); +// background: linear-gradient(135deg, rgba(darken(#f5c8bf, 5%), 1) 0%, rgba(darken(#f58dbf, 5%), 1) 100%); +// filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='darken(#f5c8bf, 5%)', endColorstr='darken(#f58dbf, 5%)', GradientType=1); +// box-shadow: inset 0 0 10px rgba(darken(#f58dbf, 5%), .5); +// } +// } +// &.codepen { +// background: #fcd000; +// background: linear-gradient(135deg, rgba(#fcd000, 1) 0%, rgba(#fc9a00, 1) 100%); +// filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fcd000', endColorstr='#fc9a00', GradientType=1); +// box-shadow: inset 0 0 10px rgba(#fc9a00, .5); +// &:hover, +// &:focus { +// background: lighten(#fcd000, 5%); +// background: linear-gradient(135deg, rgba(lighten(#fcd000, 5%), 1) 0%, rgba(lighten(#fc9a00, 5%), 1) 100%); +// filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='lighten(#fcd000, 5%)', endColorstr='lighten(#fc9a00, 5%)', GradientType=1); +// box-shadow: inset 0 0 10px rgba(lighten(#fc9a00, 5%), .5); +// } +// &:active { +// background: darken(#fcd000, 5%); +// background: linear-gradient(135deg, rgba(darken(#fcd000, 5%), 1) 0%, rgba(darken(#fc9a00, 5%), 1) 100%); +// filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='darken(#fcd000, 5%)', endColorstr='darken(#fc9a00, 5%)', GradientType=1); +// box-shadow: inset 0 0 10px rgba(darken(#fc9a00, 5%), .5); +// } +// } +// &.github { +// background: #41adc4; +// background: linear-gradient(135deg, rgba(#41adc4, 1) 0%, rgba(#4183c4, 1) 100%); +// filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#41adc4', endColorstr='#4183c4', GradientType=1); +// box-shadow: inset 0 0 10px rgba(#4183c4, .5); +// &:hover, +// &:focus { +// background: lighten(#41adc4, 5%); +// background: linear-gradient(135deg, rgba(lighten(#41adc4, 5%), 1) 0%, rgba(lighten(#4183c4, 5%), 1) 100%); +// filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='lighten(#41adc4, 5%)', endColorstr='lighten(#4183c4, 5%)', GradientType=1); +// box-shadow: inset 0 0 10px rgba(lighten(#4183c4, 5%), .5); +// } +// &:active { +// background: darken(#41adc4, 5%); +// background: linear-gradient(135deg, rgba(darken(#41adc4, 5%), 1) 0%, rgba(darken(#4183c4, 5%), 1) 100%); +// filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='darken(#41adc4, 5%)', endColorstr='darken(#4183c4, 5%)', GradientType=1); +// box-shadow: inset 0 0 10px rgba(darken(#4183c4, 5%), .5); +// } +// } +// } -@media only screen and (min-width: 470px) { - .profile { - display: flex; - &.pre-enter { - transform: scaleX(0); - .avatar { - transform-origin: left center; - transform: scaleX(0); - } - h1, - h2, - a.follow, - a.link { - transform: translateX(300px); - } - } - &.on-enter { - animation-name: scaleXIn; - .avatar { - animation-name: scaleXIn-small; - } - h1, - h2, - a.follow, - a.link { - animation-name: slideInLeft; - } - } - } - .background { - mix-blend-mode: overlay; - } - .avatar, - .info { - width: 50%; - height: 100%; - } - .avatar { - clip-path: polygon(0 0, 100% 0, 75% 100%, 0% 100%); - } -} +// @media only screen and (min-width: 470px) { +// .profile { +// display: flex; +// &.pre-enter { +// transform: scaleX(0); +// .avatar { +// transform-origin: left center; +// transform: scaleX(0); +// } +// h1, +// h2, +// a.follow, +// a.link { +// transform: translateX(300px); +// } +// } +// &.on-enter { +// animation-name: scaleXIn; +// .avatar { +// animation-name: scaleXIn-small; +// } +// h1, +// h2, +// a.follow, +// a.link { +// animation-name: slideInLeft; +// } +// } +// } +// .background { +// mix-blend-mode: overlay; +// } +// .avatar, +// .info { +// width: 50%; +// height: 100%; +// } +// .avatar { +// clip-path: polygon(0 0, 100% 0, 75% 100%, 0% 100%); +// } +// } -@media only screen and (min-width: 470px) and (min-height: 600px) { - .profile { - max-height: 400px; - } -} +// @media only screen and (min-width: 470px) and (min-height: 600px) { +// .profile { +// max-height: 400px; +// } +// } -/* https://goo.gl/jIUq3E */ +// /* https://goo.gl/jIUq3E */ -@keyframes scaleXIn { - 0% { - transform: matrix3d(0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } - 4.7% { - transform: matrix3d(0.45, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } - 9.41% { - transform: matrix3d(0.883, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } - 14.11% { - transform: matrix3d(1.141, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } - 18.72% { - transform: matrix3d(1.212, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } - 24.32% { - transform: matrix3d(1.151, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } - 29.93% { - transform: matrix3d(1.048, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } - 35.54% { - transform: matrix3d(0.979, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } - 41.04% { - transform: matrix3d(0.961, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } - 52.15% { - transform: matrix3d(0.991, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } - 63.26% { - transform: matrix3d(1.007, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } - 85.49% { - transform: matrix3d(0.999, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } - 100% { - transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } -} +// @keyframes scaleXIn { +// 0% { +// transform: matrix3d(0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// 4.7% { +// transform: matrix3d(0.45, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// 9.41% { +// transform: matrix3d(0.883, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// 14.11% { +// transform: matrix3d(1.141, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// 18.72% { +// transform: matrix3d(1.212, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// 24.32% { +// transform: matrix3d(1.151, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// 29.93% { +// transform: matrix3d(1.048, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// 35.54% { +// transform: matrix3d(0.979, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// 41.04% { +// transform: matrix3d(0.961, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// 52.15% { +// transform: matrix3d(0.991, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// 63.26% { +// transform: matrix3d(1.007, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// 85.49% { +// transform: matrix3d(0.999, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// 100% { +// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// } -/* https://goo.gl/auuhcg */ +// /* https://goo.gl/auuhcg */ -@keyframes scaleYIn { - 0% { - transform: matrix3d(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } - 4.7% { - transform: matrix3d(1, 0, 0, 0, 0, 0.45, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } - 9.41% { - transform: matrix3d(1, 0, 0, 0, 0, 0.883, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } - 14.11% { - transform: matrix3d(1, 0, 0, 0, 0, 1.141, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } - 18.72% { - transform: matrix3d(1, 0, 0, 0, 0, 1.212, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } - 24.32% { - transform: matrix3d(1, 0, 0, 0, 0, 1.151, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } - 29.93% { - transform: matrix3d(1, 0, 0, 0, 0, 1.048, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } - 35.54% { - transform: matrix3d(1, 0, 0, 0, 0, 0.979, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } - 41.04% { - transform: matrix3d(1, 0, 0, 0, 0, 0.961, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } - 52.15% { - transform: matrix3d(1, 0, 0, 0, 0, 0.991, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } - 63.26% { - transform: matrix3d(1, 0, 0, 0, 0, 1.007, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } - 85.49% { - transform: matrix3d(1, 0, 0, 0, 0, 0.999, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } - 100% { - transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } -} +// @keyframes scaleYIn { +// 0% { +// transform: matrix3d(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// 4.7% { +// transform: matrix3d(1, 0, 0, 0, 0, 0.45, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// 9.41% { +// transform: matrix3d(1, 0, 0, 0, 0, 0.883, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// 14.11% { +// transform: matrix3d(1, 0, 0, 0, 0, 1.141, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// 18.72% { +// transform: matrix3d(1, 0, 0, 0, 0, 1.212, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// 24.32% { +// transform: matrix3d(1, 0, 0, 0, 0, 1.151, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// 29.93% { +// transform: matrix3d(1, 0, 0, 0, 0, 1.048, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// 35.54% { +// transform: matrix3d(1, 0, 0, 0, 0, 0.979, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// 41.04% { +// transform: matrix3d(1, 0, 0, 0, 0, 0.961, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// 52.15% { +// transform: matrix3d(1, 0, 0, 0, 0, 0.991, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// 63.26% { +// transform: matrix3d(1, 0, 0, 0, 0, 1.007, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// 85.49% { +// transform: matrix3d(1, 0, 0, 0, 0, 0.999, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// 100% { +// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// } -/* https://goo.gl/dNBqrt */ +// /* https://goo.gl/dNBqrt */ -@keyframes scaleXIn-small { - 0% { - transform: matrix3d(0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } - 6.31% { - transform: matrix3d(0.384, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } - 12.51% { - transform: matrix3d(0.621, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } - 18.82% { - transform: matrix3d(0.771, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } - 25.03% { - transform: matrix3d(0.862, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } - 37.54% { - transform: matrix3d(0.952, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } - 50.05% { - transform: matrix3d(0.984, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } - 75.08% { - transform: matrix3d(0.999, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } - 100% { - transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } -} +// @keyframes scaleXIn-small { +// 0% { +// transform: matrix3d(0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// 6.31% { +// transform: matrix3d(0.384, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// 12.51% { +// transform: matrix3d(0.621, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// 18.82% { +// transform: matrix3d(0.771, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// 25.03% { +// transform: matrix3d(0.862, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// 37.54% { +// transform: matrix3d(0.952, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// 50.05% { +// transform: matrix3d(0.984, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// 75.08% { +// transform: matrix3d(0.999, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// 100% { +// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// } -/* https://goo.gl/jZL0uj */ +// /* https://goo.gl/jZL0uj */ -@keyframes scaleYIn-small { - 0% { - transform: matrix3d(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } - 6.31% { - transform: matrix3d(1, 0, 0, 0, 0, 0.384, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } - 12.51% { - transform: matrix3d(1, 0, 0, 0, 0, 0.621, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } - 18.82% { - transform: matrix3d(1, 0, 0, 0, 0, 0.771, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } - 25.03% { - transform: matrix3d(1, 0, 0, 0, 0, 0.862, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } - 37.54% { - transform: matrix3d(1, 0, 0, 0, 0, 0.952, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } - 50.05% { - transform: matrix3d(1, 0, 0, 0, 0, 0.984, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } - 75.08% { - transform: matrix3d(1, 0, 0, 0, 0, 0.999, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } - 100% { - transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } -} +// @keyframes scaleYIn-small { +// 0% { +// transform: matrix3d(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// 6.31% { +// transform: matrix3d(1, 0, 0, 0, 0, 0.384, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// 12.51% { +// transform: matrix3d(1, 0, 0, 0, 0, 0.621, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// 18.82% { +// transform: matrix3d(1, 0, 0, 0, 0, 0.771, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// 25.03% { +// transform: matrix3d(1, 0, 0, 0, 0, 0.862, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// 37.54% { +// transform: matrix3d(1, 0, 0, 0, 0, 0.952, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// 50.05% { +// transform: matrix3d(1, 0, 0, 0, 0, 0.984, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// 75.08% { +// transform: matrix3d(1, 0, 0, 0, 0, 0.999, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// 100% { +// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// } -/* https://goo.gl/Ne0Mkr */ +// /* https://goo.gl/Ne0Mkr */ -@keyframes slideInLeft { - 0% { - transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 300, 0, 0, 1); - } - 6.31% { - transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 184.858, 0, 0, 1); - } - 12.51% { - transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 113.68, 0, 0, 1); - } - 18.82% { - transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 68.663, 0, 0, 1); - } - 25.03% { - transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 41.37, 0, 0, 1); - } - 37.54% { - transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 14.382, 0, 0, 1); - } - 50.05% { - transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 4.724, 0, 0, 1); - } - 75.08% { - transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0.381, 0, 0, 1); - } - 100% { - transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } -} +// @keyframes slideInLeft { +// 0% { +// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 300, 0, 0, 1); +// } +// 6.31% { +// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 184.858, 0, 0, 1); +// } +// 12.51% { +// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 113.68, 0, 0, 1); +// } +// 18.82% { +// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 68.663, 0, 0, 1); +// } +// 25.03% { +// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 41.37, 0, 0, 1); +// } +// 37.54% { +// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 14.382, 0, 0, 1); +// } +// 50.05% { +// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 4.724, 0, 0, 1); +// } +// 75.08% { +// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0.381, 0, 0, 1); +// } +// 100% { +// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// } -/* https://goo.gl/MSqtd5 */ +// /* https://goo.gl/MSqtd5 */ -@keyframes slideInUp { - 0% { - transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 300, 0, 1); - } - 6.31% { - transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 184.858, 0, 1); - } - 12.51% { - transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 113.68, 0, 1); - } - 18.82% { - transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 68.663, 0, 1); - } - 25.03% { - transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 41.37, 0, 1); - } - 37.54% { - transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 14.382, 0, 1); - } - 50.05% { - transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 4.724, 0, 1); - } - 75.08% { - transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0.381, 0, 1); - } - 100% { - transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } -} +// @keyframes slideInUp { +// 0% { +// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 300, 0, 1); +// } +// 6.31% { +// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 184.858, 0, 1); +// } +// 12.51% { +// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 113.68, 0, 1); +// } +// 18.82% { +// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 68.663, 0, 1); +// } +// 25.03% { +// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 41.37, 0, 1); +// } +// 37.54% { +// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 14.382, 0, 1); +// } +// 50.05% { +// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 4.724, 0, 1); +// } +// 75.08% { +// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0.381, 0, 1); +// } +// 100% { +// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); +// } +// } -//wheather -.card-wheather { - height: 220px; - color: #fff; -} +// //wheather +// .card-wheather { +// height: 220px; +// color: #fff; +// } -.city { +// .city { - font-size: 26px; -} +// font-size: 26px; +// } -.date { - font-size: 20px; - line-height: 40px; -} +// .date { +// font-size: 20px; +// line-height: 40px; +// } -.sun { - height: 70px; -} +// .sun { +// height: 70px; +// } -.grad-blue { - background: linear-gradient(58deg, #f44336, #673ab7); - color: #fff; -} +// .grad-blue { +// background: linear-gradient(58deg, #f44336, #673ab7); +// color: #fff; +// } -.grad-green { - background: linear-gradient(58deg, #009688, #673ab7); - color: #fff; -} +// .grad-green { +// background: linear-gradient(58deg, #009688, #673ab7); +// color: #fff; +// } -.grad-red { - background: linear-gradient(58deg, #f44336, #673ab7); - color: #fff; -} -.card-wheather{ +// .grad-red { +// background: linear-gradient(58deg, #f44336, #673ab7); +// color: #fff; +// } +// .card-wheather{ +// padding: 2rem; +// } +// .temp { +// font-size: 50px; +// display: inline-block; +// } + + +.chart{ padding: 2rem; -} -.temp { - font-size: 50px; - display: inline-block; -} +} \ No newline at end of file diff --git a/ng6-seed/src/app/dashboard/dashboard.component.ts b/ng6-seed/src/app/dashboard/dashboard.component.ts index d4173c88b..cd1d19cb3 100644 --- a/ng6-seed/src/app/dashboard/dashboard.component.ts +++ b/ng6-seed/src/app/dashboard/dashboard.component.ts @@ -1,4 +1,10 @@ -import { Component } from '@angular/core'; +//import { Component } from '@angular/core'; +import {Component, NgModule, ElementRef, Inject, ViewChild} from '@angular/core' +import {BrowserModule} from '@angular/platform-browser' +import {ChartsModule, Color} from 'ng2-charts'; +//import { MastersService } from './../service/masters/masters.service' +import { DashboardService } from './dashboard.service'; +import { BaseChartDirective } from 'ng2-charts/ng2-charts'; @Component({ selector: 'app-dashboard', @@ -8,195 +14,564 @@ import { Component } from '@angular/core'; export class DashboardComponent { - - public showXAxis = true; - public showYAxis = true; - public gradient = true; - public showLegend = false; - public showXAxisLabel = true; - public xAxisLabel = 'Status'; - public showYAxisLabel = true; - public yAxisLabel = 'PD'; - view: any[]; - width =900; - height= 250; - public colorScheme = { - domain: ['#673ab7', '#f44336', '#009688 ', '#2196f3', '#234278 ', '#2a1653'] - }; - public autoScale = true; - constructor() { - } - ngOnInit(){ - this.view = [this.width, this.height]; + dashboardTitle = 'Monthly Status'; + + @ViewChild('mycanvas') + doughnutChartDataForFullPD:any[]=[]; + doughnutChartDataForSmartPD:any[]=[]; + doughnutChartDataForTelePD:any[]=[]; + TempDataFullPD :number[]=[]; + TempDataSmartPD :number[]=[]; + TempDataTelePD :number[]=[]; + total1: number = 0; + total2: number = 0; + total3: number = 0; + doughnutChartName:any; + citywisepd : any[]; + lenderpd :any[]; + message : any[]; + Status = false; + + // globalChartOptionsFullPD: any = { + // responsive: false, + // legend: { + // display: false, + // position: 'bottom' + // } + // }; + // globalChartOptionsSmartPD: any = { + // responsive: false, + // legend: { + // display: false, + // position: 'bottom' + // } + // }; + globalChartOptions: any = { + responsive: false, + legend: { + display: true, + position: 'bottom' + } + }; + + TodayFullPD:any = []; + MonthlyFullPD:any = []; + + constructor(private _dashboardService: DashboardService) { - } -//pie chart - single: Object[] = [ - { - name: 'Germany', - value: 40632 - }, - { - name: 'USA', - value: 49737 - }, - { - name: 'France', - value: 36745 - }, - { - name: 'UK', - value: 36240 - }, - { - name: 'Spain', - value: 33000 - }, - { - name: 'Italy', - value: 35800 } -]; - //Full Pd Data - full: Object[] = [ - { - name: 'Triggered', - value: 45 - }, - { - name: 'Allocated', - value: 50 - }, - { - name: 'Scheduled', - value: 36 - }, - { - name: 'InProgress', - value: 90 - }, - { - name: 'Completed', - value: 56 - }, - { - name: 'QC Completed', - value: 81 - } - ]; - //smart PD data - smart: Object[] = [ - { - name: 'Triggered', - value: 65 - }, - { - name: 'Allocated', - value: 20 - }, - { - name: 'Scheduled', - value: 80 - }, - { - name: 'InProgress', - value: 60 - }, - { - name: 'Completed', - value: 26 - }, - { - name: 'QC Completed', - value: 51 - } - ]; - //Tele PD Data - tele: Object[] = [ - { - name: 'Triggered', - value: 95 - }, - { - name: 'Allocated', - value: 59 - }, - { - name: 'Scheduled', - value: 45 - }, - { - name: 'InProgress', - value: 25 - }, - { - name: 'Completed', - value: 36 - }, - { - name: 'QC Completed', - value: 49 - } - ]; - // //Lender wise PD Triggered - lenderpd: Object[] = [{ - lendername:'ICICI', - billingaddr:'Bangalore', - fullpd:'19', - smartpd:'6', - telepd:'10', - }, { - lendername:'IOB', - billingaddr:'Chennai', - fullpd:'10', - smartpd:'5', - telepd:'7', - }, { - lendername:'SBI', - billingaddr:'Pune', - fullpd:'16', - smartpd:'3', - telepd:'33', - }, ]; + // Doughnut + //name: "DoughnutTextInside" + ngOnInit(){ + + this.GetData(); + this.getDoNUT(); + + } + +GetData(){ + this._dashboardService.getLenderDetail().subscribe(data => { + //console.log('Lender');console.log(data); + this.TodayFullPD = data.records; - //City Wise PD Triggered - citywisepd: Object[] = [{ - cityname: 'Bangalore', - fullpd:'45', - smartpd:'17', - telepd:'10', - }, { - cityname: 'Chennai', - fullpd:'33', - smartpd:'16', - telepd:'8', - }, { - cityname: 'Salem', - fullpd:'22', - smartpd:'12', - telepd:'2', - } ]; + // console.log(this.TodayFullPD); + // console.log(this.TodayFullPD.current_day); + // console.log(this.TodayFullPD.current_week); + // console.log(this.TodayFullPD.current_month); + if(this.TodayFullPD.current_day.length != '0'){ + //console.log('If Condition day'); + } + else{ + //console.log('Else Condition day'); + } - // //Same status - message: Object[] = [{ - applicantname: 'Saravana', - applicantid:'ICICITN0118000354', - lendername:'ICICI', - status:'Allocated', - photo: 'assets/images/face3.jpg', - }, { - applicantname: 'Kumaran', - applicantid:'IOBKA0418000578', - lendername:'IOB', - status:'Allocated', - photo: 'assets/images/face6.jpg', - }, { - applicantname: 'Priya', - applicantid:'SBIGA0118000241', - lendername:'SBI', - status:'Triggered', - photo: 'assets/images/face4.jpg', - } ]; + if(this.TodayFullPD.current_week.length != '0'){ + //console.log('If Condition week'); + } + else{ + //console.log('Else Condition week'); + } + + if(this.TodayFullPD.current_month.length != '0'){ + this.lenderpd = this.TodayFullPD.current_month; + console.log('******************** lender'); + console.log(this.lenderpd); + + // for(let contact of this.TodayFullPD.current_month) { + // let message = contact; + // } + + } + else{ + //console.log('Else Condition month'); + } +}); + this._dashboardService.getAlertDetail().subscribe(data => { + console.log('Alert*********************************');console.log(data); + this.message = data.records; + console.log(this.message); + }); + this._dashboardService.getCityDetail().subscribe(data => {console.log('City');console.log(data); + this.TodayFullPD = data.records; + + // console.log(this.TodayFullPD); + // console.log(this.TodayFullPD.current_day); + // console.log(this.TodayFullPD.current_week); + // console.log(this.TodayFullPD.current_month); + console.log('Whole',this.TodayFullPD); + console.log('Today only',this.TodayFullPD.current_day); + console.log('This week',this.TodayFullPD.current_week); + console.log('This month',this.TodayFullPD.current_month); + if(this.TodayFullPD.current_day.length != '0'){ + //console.log('If Condition day'); + } + else{ + //console.log('Else Condition day'); + } + if(this.TodayFullPD.current_week.length != '0'){ + //console.log('If Condition week'); + } + else{ + //console.log('Else Condition week'); + } + if(this.TodayFullPD.current_month.length != '0'){ + this.citywisepd = this.TodayFullPD.current_month; + //console.log('citywisepd'); + //console.log(this.citywisepd); + //for(let contact of this.TodayFullPD.current_month) { + // let message = contact; + //} + + } + else{ + //console.log('Else Condition month'); + } +}); } +getDoNUT(){ + this._dashboardService.getPDDetailForDoughnut().subscribe(data => { + this.MonthlyFullPD = data.records; + + console.log('whole',this.MonthlyFullPD); + console.log('Today',this.MonthlyFullPD.current_day); + console.log('week',this.MonthlyFullPD.current_week); + console.log('month',this.MonthlyFullPD.current_month); + if(this.MonthlyFullPD.current_day.length != '0'){ + //console.log('If Condition day'); + } + else{ + //console.log('Else Condition day'); + } + if(this.MonthlyFullPD.current_week.length != '0'){ + //console.log('If Condition week'); + } + else{ + //console.log('Else Condition week'); + } + if(this.MonthlyFullPD.current_month.length != '0'){ + //console.log('If Condition monthLY'); + //this.citydatas = this.citydatas.filter(city=>city.isactive == 1 ); + let Monthly = this.MonthlyFullPD.current_month; + let MonthlyFullPDArr = Monthly.filter(arr=>arr.PDTYPE == 'FULL' ); + let MonthlySmartPDArr = Monthly.filter(arr=>arr.PDTYPE == 'SMART' ); + let MonthlyTelePDArr = Monthly.filter(arr=>arr.PDTYPE == 'TELE' ); + + + let TriggedIndexvalue = this.doughnutChartLabels.indexOf('Triggered'); + let AllocatedIndexvalue = this.doughnutChartLabels.indexOf('Allocated'); + let ScheduledIndexvalue = this.doughnutChartLabels.indexOf('Scheduled'); + let InProgressIndexvalue = this.doughnutChartLabels.indexOf('InProgress'); + let CompletedIndexvalue = this.doughnutChartLabels.indexOf('Completed'); + let QCCompletedIndexvalue = this.doughnutChartLabels.indexOf('QC Completed'); + + let TriggerFullPDvalue = MonthlyFullPDArr.filter(arr=>arr.pd_status == 'TRIGGERED'); + if(TriggerFullPDvalue.length != '0'){ + //console.log('console triggered value',TriggerFullPDvalue); + for(let FPD of TriggerFullPDvalue){ + let y = +FPD.count; + this.total1 = this.total1+y; + this.TempDataFullPD[TriggedIndexvalue] = y; + } + } + else{ + this.TempDataFullPD[TriggedIndexvalue] = 0; + } + + let AllocatedFullPDvalue = MonthlyFullPDArr.filter(arr=>arr.pd_status == 'ALLOCATED'); + if(AllocatedFullPDvalue.length != '0'){ + for(let FPD of AllocatedFullPDvalue){ + let y = +FPD.count; + this.total1 = this.total1+y; + this.TempDataFullPD[AllocatedIndexvalue] = y; + } + } + else{ + this.TempDataFullPD[AllocatedIndexvalue] = 0; + } + + let ScheduledFullPDvalue = MonthlyFullPDArr.filter(arr=>arr.pd_status == 'SCHEDULED'); + if(ScheduledFullPDvalue.length != '0'){ + for(let FPD of ScheduledFullPDvalue){ + let y = +FPD.count; + this.total1 = this.total1+y; + this.TempDataFullPD[ScheduledIndexvalue] = y; + } + //let y = +ScheduledFullPDvalue.count; + + } + else{ + this.TempDataFullPD[ScheduledIndexvalue] = 0; + } + + let InProgressFullPDvalue = MonthlyFullPDArr.filter(arr=>arr.pd_status == 'INPROGRESS'); + if(InProgressFullPDvalue.length != '0'){ + for(let FPD of InProgressFullPDvalue){ + let y = +FPD.count; + this.total1 = this.total1+y; + this.TempDataFullPD[InProgressIndexvalue] = y; + } + //let y = +InProgressFullPDvalue.count; + + } + else{ + this.TempDataFullPD[InProgressIndexvalue] = 0; + } + + let CompletedFullPDvalue = MonthlyFullPDArr.filter(arr=>arr.pd_status == 'COMPLETED'); + if(CompletedFullPDvalue.length != '0'){ + for(let FPD of CompletedFullPDvalue){ + let y = +FPD.count; + this.total1 = this.total1+y; + this.TempDataFullPD[CompletedIndexvalue] = y; + } + //let y = +CompletedFullPDvalue.count; + + } + else{ + this.TempDataFullPD[CompletedIndexvalue] = 0; + } + + let QCCompletedFullPDvalue = MonthlyFullPDArr.filter(arr=>arr.pd_status == "QC_COMPLETED"); + if(QCCompletedFullPDvalue.length != '0'){ + for(let FPD of QCCompletedFullPDvalue){ + let y = +FPD.count; + this.total1 = this.total1+y; + this.TempDataFullPD[QCCompletedIndexvalue] = y; + } + //let y = +QCCompletedFullPDvalue.count; + + } + else{ + this.TempDataFullPD[QCCompletedIndexvalue] = 0; + } + + let TriggerSmartPDvalue = MonthlySmartPDArr.filter(arr=>arr.pd_status == 'TRIGGERED'); + if(TriggerSmartPDvalue.length != '0'){ + + for(let FPD of TriggerSmartPDvalue){ + let y = +FPD.count; + this.total2 = this.total2+y; + this.TempDataSmartPD[TriggedIndexvalue] = y; + } + } + else{ + this.TempDataSmartPD[TriggedIndexvalue] = 0; + } + + let AllocatedSmartPDvalue = MonthlySmartPDArr.filter(arr=>arr.pd_status == 'ALLOCATED'); + if(AllocatedSmartPDvalue.length != '0'){ + for(let FPD of AllocatedSmartPDvalue){ + let y = +FPD.count; + this.total2 = this.total2+y; + this.TempDataSmartPD[AllocatedIndexvalue] = y; + } + } + else{ + this.TempDataSmartPD[AllocatedIndexvalue] = 0; + } + + let ScheduledSmartPDvalue = MonthlySmartPDArr.filter(arr=>arr.pd_status == 'SCHEDULED'); + if(ScheduledSmartPDvalue.length != '0'){ + for(let FPD of ScheduledSmartPDvalue){ + let y = +FPD.count; + this.total2 = this.total2+y; + this.TempDataSmartPD[ScheduledIndexvalue] = y; + } + //let y = +ScheduledFullPDvalue.count; + + } + else{ + this.TempDataSmartPD[ScheduledIndexvalue] = 0; + } + + let InProgressSmartPDvalue = MonthlySmartPDArr.filter(arr=>arr.pd_status == 'INPROGRESS'); + if(InProgressSmartPDvalue.length != '0'){ + for(let FPD of InProgressSmartPDvalue){ + let y = +FPD.count; + this.total2 = this.total2+y; + this.TempDataSmartPD[InProgressIndexvalue] = y; + } + //let y = +InProgressFullPDvalue.count; + + } + else{ + this.TempDataSmartPD[InProgressIndexvalue] = 0; + } + + let CompletedSmartPDvalue = MonthlySmartPDArr.filter(arr=>arr.pd_status == 'COMPLETED'); + if(CompletedSmartPDvalue.length != '0'){ + for(let FPD of CompletedSmartPDvalue){ + let y = +FPD.count; + this.total2 = this.total2+y; + this.TempDataSmartPD[CompletedIndexvalue] = y; + } + //let y = +CompletedFullPDvalue.count; + + } + else{ + this.TempDataSmartPD[CompletedIndexvalue] = 0; + } + + let QCCompletedSmartPDvalue = MonthlySmartPDArr.filter(arr=>arr.pd_status == "QC_COMPLETED"); + if(QCCompletedSmartPDvalue.length != '0'){ + for(let FPD of QCCompletedSmartPDvalue){ + let y = +FPD.count; + this.total2 = this.total2+y; + this.TempDataSmartPD[QCCompletedIndexvalue] = y; + } + //let y = +QCCompletedFullPDvalue.count; + + } + else{ + this.TempDataSmartPD[QCCompletedIndexvalue] = 0; + } + + let TriggerTelePDvalue = MonthlyTelePDArr.filter(arr=>arr.pd_status == 'TRIGGERED'); + if(TriggerTelePDvalue.length != '0'){ + //console.log('console triggered value',TriggerTelePDvalue); + for(let FPD of TriggerTelePDvalue){ + let y = +FPD.count; + this.total3 = this.total3+y; + this.TempDataTelePD[TriggedIndexvalue] = y; + } + } + else{ + this.TempDataTelePD[TriggedIndexvalue] = 0; + } + + let AllocatedTelePDvalue = MonthlyTelePDArr.filter(arr=>arr.pd_status == 'ALLOCATED'); + if(AllocatedTelePDvalue.length != '0'){ + for(let FPD of AllocatedTelePDvalue){ + let y = +FPD.count; + this.total3 = this.total3+y; + this.TempDataTelePD[AllocatedIndexvalue] = y; + } + } + else{ + this.TempDataTelePD[AllocatedIndexvalue] = 0; + } + + let ScheduledTelePDvalue = MonthlyTelePDArr.filter(arr=>arr.pd_status == 'SCHEDULED'); + if(ScheduledTelePDvalue.length != '0'){ + for(let FPD of ScheduledTelePDvalue){ + let y = +FPD.count; + this.total3 = this.total3+y; + this.TempDataTelePD[ScheduledIndexvalue] = y; + } + //let y = +ScheduledFullPDvalue.count; + + } + else{ + this.TempDataTelePD[ScheduledIndexvalue] = 0; + } + + let InProgressTelePDvalue = MonthlyTelePDArr.filter(arr=>arr.pd_status == 'INPROGRESS'); + if(InProgressTelePDvalue.length != '0'){ + for(let FPD of InProgressTelePDvalue){ + let y = +FPD.count; + this.total3 = this.total3+y; + this.TempDataTelePD[InProgressIndexvalue] = y; + } + //let y = +InProgressFullPDvalue.count; + + } + else{ + this.TempDataTelePD[InProgressIndexvalue] = 0; + } + + let CompletedTelePDvalue = MonthlyTelePDArr.filter(arr=>arr.pd_status == 'COMPLETED'); + if(CompletedTelePDvalue.length != '0'){ + for(let FPD of CompletedTelePDvalue){ + let y = +FPD.count; + this.total3 = this.total3+y; + this.TempDataTelePD[CompletedIndexvalue] = y; + } + //let y = +CompletedFullPDvalue.count; + + } + else{ + this.TempDataTelePD[CompletedIndexvalue] = 0; + } + + let QCCompletedTelePDvalue = MonthlyTelePDArr.filter(arr=>arr.pd_status == "QC_COMPLETED"); + if(QCCompletedTelePDvalue.length != '0'){ + for(let FPD of QCCompletedTelePDvalue){ + let y = +FPD.count; + this.total3 = this.total3+y; + this.TempDataTelePD[QCCompletedIndexvalue] = y; + } + //let y = +QCCompletedFullPDvalue.count; + + } + else{ + this.TempDataTelePD[QCCompletedIndexvalue] = 0; + } + + // y: number + + //console.log(MonthlyFullPDArr.pd_status); + // for(let FPD of MonthlyFullPDArr){ + + // if(FPD.pd_status == 'TRIGGERED'){ + // console.log('PD Status'); + // let Indexvalue = this.doughnutChartLabels.indexOf('Triggered'); + // let y = +FPD.count; // y: number + // console.log('Initial',this.TempDataFullPD); + // this.TempDataFullPD[Indexvalue] = y; + // console.log(this.TempDataFullPD); + // } + // else{ + // let Indexvalue = this.doughnutChartLabels.indexOf('Triggered'); + // this.TempDataFullPD[Indexvalue] = 0; + // } + + // // if(contact.pd_status == 'TRIGGERED' && contact.PDTYPE == 'FULL'){ + // // let Indexvalue = this.doughnutChartLabels.indexOf('Triggered'); + // // var y = +contact.count; // y: number + // // console.log('Initial',this.TempDataFullPD); + // // this.TempDataFullPD[Indexvalue] = y; + // // console.log(this.TempDataFullPD); + // // } + // // else{ + // // let Indexvalue = this.doughnutChartLabels.indexOf('Triggered'); + // // this.TempDataFullPD[Indexvalue] = 0; + + // // } + // if(FPD.pd_status == 'ALLOCATED'){ + // let Indexvalue = this.doughnutChartLabels.indexOf('Allocated'); + // var y = +FPD.count; // y: number + // // console.log(this.TempDataFullPD); + // this.TempDataFullPD[Indexvalue] = y; + // //console.log('allocated b4',TempDataFullPD); + // } + // else{ + // let Indexvalue = this.doughnutChartLabels.indexOf('Allocated'); + // this.TempDataFullPD[Indexvalue] = 0; + // } + // if(FPD.pd_status == 'INPROGRESS'){ + // let Indexvalue = this.doughnutChartLabels.indexOf('InProgress'); + // var y = +FPD.count; // y: number + // this.TempDataFullPD[Indexvalue] = y; + // //console.log('b4',TempDataFullPD); + // } + // else{ + // let Indexvalue = this.doughnutChartLabels.indexOf('InProgress'); + // this.TempDataFullPD[Indexvalue] = 0; + // } + // if(FPD.pd_status == 'SCHEDULED'){ + // let Indexvalue = this.doughnutChartLabels.indexOf('Scheduled'); + // var y = +FPD.count; // y: number + // this.TempDataFullPD[Indexvalue] = y; + // //console.log('b4',TempDataFullPD); + // } + // else{ + // let Indexvalue = this.doughnutChartLabels.indexOf('Scheduled'); + // this.TempDataFullPD[Indexvalue] = 0; + // //console.log('d',TempDataFullPD); + // } + // if(FPD.pd_status == 'COMPLETED'){ + // let Indexvalue = this.doughnutChartLabels.indexOf('Completed'); + // var y = +FPD.count; // y: number + // this.TempDataFullPD[Indexvalue] = y; + // //console.log('allocated',TempDataFullPD); + // } + // else{ + // let Indexvalue = this.doughnutChartLabels.indexOf('Completed'); + // this.TempDataFullPD[Indexvalue] = 0; + // } + // //return TempDataFullPD; + + // if(FPD.pd_status == 'QC COMPLETED'){ + // let Indexvalue = this.doughnutChartLabels.indexOf('QC Completed'); + // var y = +FPD.count; // y: number + // this.TempDataFullPD[Indexvalue] = y; + // //console.log('allocated',TempDataFullPD); + // } + // else{ + // let Indexvalue = this.doughnutChartLabels.indexOf('QC Completed'); + // this.TempDataFullPD[Indexvalue] = 0; + // //console.log('Final Data',TempDataFullPD); + // } + // //console.log('inside',this.TempDataFullPD); + // } + //this.doughnutChartDataForFullPD = [3,4,5,6,7,8]; + } + + else{ + //console.log('Else Condition month'); + } + this.doughnutChartDataForFullPD = this.TempDataFullPD; + this.doughnutChartDataForSmartPD = this.TempDataSmartPD; + this.doughnutChartDataForTelePD = this.TempDataTelePD; + + console.log('Final full Data Completed',this.doughnutChartDataForFullPD); + console.log('Temp full Data',this.TempDataFullPD); + console.log('Final Smart Data Completed',this.doughnutChartDataForSmartPD); + console.log('Temp Smart Data',this.TempDataSmartPD); + console.log('Final Tele Data Completed',this.doughnutChartDataForTelePD); + console.log('Temp Tele Data',this.TempDataTelePD); + + }) +} + +// setTimeout(() => { +// this.datasets = [{ +// data: [12, 19, 3, 5, 2, 3] +// }]; +// }, 100); + +doughnutChartColors: any[] = [{ + backgroundColor: ['#f44336', '#3f51b5', '#ffeb3b', '#4caf50', '#2196f3','#673ab7'] +}]; + +doughnutChartType = 'doughnut'; +doughnutChartLabels: string[] = ['Triggered', 'Allocated','Scheduled','InProgress','Completed','QC Completed']; +doughnutOptionsFullPD: any = Object.assign({ + elements: { + arc: { + borderWidth: 0.2 + } + } +}, this.globalChartOptions); + +doughnutOptionsSmartPD: any = Object.assign({ + elements: { + arc: { + borderWidth: 0.2 + } + } +}, this.globalChartOptions); + +doughnutOptionsTelePD: any = Object.assign({ + elements: { + arc: { + borderWidth: 0.2 + } + } +}, this.globalChartOptions); + +chartfunction(){ this.Status = true; } + +} \ No newline at end of file diff --git a/ng6-seed/src/app/dashboard/dashboard.module.ts b/ng6-seed/src/app/dashboard/dashboard.module.ts index ac863a047..89e784107 100644 --- a/ng6-seed/src/app/dashboard/dashboard.module.ts +++ b/ng6-seed/src/app/dashboard/dashboard.module.ts @@ -11,6 +11,9 @@ import { NgxDatatableModule } from '@swimlane/ngx-datatable'; import { DashboardComponent } from './dashboard.component'; import { DashboardRoutes } from './dashboard.routing'; +/** Dashboard Service */ +import { DashboardService } from './dashboard.service'; + @NgModule({ imports: [ CommonModule, @@ -27,6 +30,7 @@ import { DashboardRoutes } from './dashboard.routing'; NgxDatatableModule, FlexLayoutModule ], + providers: [ DashboardService ], declarations: [ DashboardComponent ] }) diff --git a/ng6-seed/src/app/dashboard/dashboard.service.spec.ts b/ng6-seed/src/app/dashboard/dashboard.service.spec.ts new file mode 100644 index 000000000..09bd58774 --- /dev/null +++ b/ng6-seed/src/app/dashboard/dashboard.service.spec.ts @@ -0,0 +1,12 @@ +import { TestBed } from '@angular/core/testing'; + +import { DashboardService } from './dashboard.service'; + +describe('DashboardService', () => { + beforeEach(() => TestBed.configureTestingModule({})); + + it('should be created', () => { + const service: DashboardService = TestBed.get(DashboardService); + expect(service).toBeTruthy(); + }); +}); diff --git a/ng6-seed/src/app/dashboard/dashboard.service.ts b/ng6-seed/src/app/dashboard/dashboard.service.ts new file mode 100644 index 000000000..e87616fad --- /dev/null +++ b/ng6-seed/src/app/dashboard/dashboard.service.ts @@ -0,0 +1,87 @@ +/** Common Import Section */ +import { Injectable } from '@angular/core'; +import { Observable } from 'rxjs';//for Datatables +import { HttpClient } from '@angular/common/http'; +import { catchError } from 'rxjs/operators'; +import { of } from 'rxjs'; + +/** Imported Service Files Are., */ +import { AwsService } from '../AwsService/aws.service'; +/** Environment */ +import { environment } from 'environments/environment'; + + +/** Consant Value For Created Date And Updated Date */ +const currentdate = new Date().toJSON().slice(0,19).replace('T',' '); + +@Injectable() + +export class DashboardService { + + private apiUrl = environment.apiEndpoint; + + + constructor(private _http: HttpClient, + private _aws:AwsService) { } + +// $route['getDashBoardMaster'] +// $route['getDashBoardLenderCity'] +// $route['getDashBoardDetailsOfCity'] + +/** +* TO Get the M Datas using API Call +* 1st argument is "TableName" :string - Table Name +*/ +// getAllMasterData(TableName:string): Observable { +// return this._http.post(this.apiUrl+"getListOfMaster", { "master_name":TableName }) +// .pipe( +// catchError(this.handleError('role', [])) +// ) +// } + +/** +* TO get PD Datas For Dashboard Screen +*/ +getPDDetailForDoughnut(): Observable { + return this._http.get(this.apiUrl+'getDashBoardMaster') + .pipe( + catchError(this.handleError('role', [])) + ) + +} + +getLenderDetail(): Observable { + return this._http.get(this.apiUrl+'getDashBoardLenderCity') + .pipe( + catchError(this.handleError('role', [])) + ) + + } + + getCityDetail(): Observable { + return this._http.get(this.apiUrl+'getDashBoardDetailsOfCity') + .pipe( + catchError(this.handleError('role', [])) + ) + + } + + getAlertDetail(): Observable { + return this._http.get(this.apiUrl+'getDashBoardAlertDetails') + .pipe( + catchError(this.handleError('role', [])) + ) + + } + +/** +* TO Handle The Error +*/ +private handleError(operation = 'operation', result?: T) { + + return (error: any): Observable => { + return of(result as T); + }; +} + +} \ No newline at end of file diff --git a/ng6-seed/src/app/layouts/admin/admin-layout.component.ts b/ng6-seed/src/app/layouts/admin/admin-layout.component.ts index 0d8ac289a..ad6a4fd3e 100644 --- a/ng6-seed/src/app/layouts/admin/admin-layout.component.ts +++ b/ng6-seed/src/app/layouts/admin/admin-layout.component.ts @@ -54,9 +54,9 @@ export class AdminLayoutComponent implements OnInit, OnDestroy { this.currentUser = this.currentUser.records[0]; this.fullName = this.currentUser.user_first_name +' '+this.currentUser.user_last_name; //console.log(this.currentUser); - if(this.currentUser.fk_entity_id == 1 ){ + if(this.currentUser.fk_entity_type_id == 1 ){ this.userDep = "SineEdge"; - }else if(this.currentUser.fk_entity_id ==2){ + }else if(this.currentUser.fk_entity_type_id ==2){ this.userDep = "Lender"; }else{ diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.ts index 648ef999c..a8fca707a 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.ts @@ -10,7 +10,7 @@ import { PdTrigerService } from '../../../pd-service/pd-triger.service'; styleUrls: ['./pd-allocation.component.scss'] }) export class PdAllocationComponent implements OnInit { - public pageTitle: string = "PD Allocation To"; + public pageTitle: string = "Allocation To PD Officer"; public _pdAllocationForm: FormGroup; public pdOfficerList: any = []; errorMessage: any; @@ -43,9 +43,8 @@ export class PdAllocationComponent implements OnInit { this._pd.getPdOfficerList(pdID).subscribe( data => { if (data.status == 200) { - this.pdOfficerList= data.records.filter(item => item.fk_pd_type_id != 2); + this.pdOfficerList= data.records.pdofficers.filter(item => item.fk_pd_type_id == 1); - } }, error => this.errorMessage = error); diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/smart-pd-allocation/smart-pd-allocation.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/smart-pd-allocation/smart-pd-allocation.component.html index 7e88d465b..0c7f1b24d 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/smart-pd-allocation/smart-pd-allocation.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/smart-pd-allocation/smart-pd-allocation.component.html @@ -11,9 +11,9 @@ -
+
-
+
- -
-
-
-
- -
-
-
- - - {{ asset.name }} - - -
-
- -
- -
-
-
-
-
- - - {{ prop.name }} - - -
-
-
-
-
- -
-
-
-
-
- - - -
-
-
-
-
- -
-
-
-
-
- - - -
-
-
-
-
- -
-
-
-
-
- - - -
-
-
-
-
- -
-
-
-
-
- - - -
-
-
-
-
- -
-
-
-
-
-
- - - {{ ins_type.name }} - - -
-
- - - -
-
- - - {{ freqn.name }} - - -
-
-
-
- - - -
-
- - - -
-
-
-
-
-
- -
-
-
-
-
-
- - - {{ ins_type.name }} - - -
-
- - - -
-
- - - -
-
-
-
-
-
- -
-
-
-
-
- - - -
-
-
-
-
-
- -
-
- - - -
-
- - - -
-
- - - -
-
-
-
- EMI -
-
- - - -
-
- - - -
-
- - - -
-
-
-
- - - -
+ + + +

Assets Details

+ +
+
+
+ + +
+
+
+ + + {{ asset.name }} + + + +
+
+ +
+ +
+
+
+
+
+ + + {{ prop.name }} + + +
+
+
+
+
+ +
+
+
+
+
+ + + +
+
+
+
+
+ +
+
+
+
+
+ + + +
+
+
+
+
+ + +
+
+
+
+
+ + + +
+
+
+
+
+ +
+
+
+
+
+
+ + + {{ ins_type.name }} + + +
+
+ + + +
+
+ + + {{ freqn.name }} + + +
+
+
+
+ + + +
+
+ + + +
+
+
+
+
+
+ +
+
+
+
+
+
+ + + {{ ins_type.name }} + + +
+
+ + + +
+
+ + + +
+
+
+
+
+
+ +
+
+
+
+
+ + + +
+
+
+
+
+
+ +
+
+
+ + + +
+
+
+ +
+ + + +
+
+
+
+ + + +
+
+
+
+ +
+
+ Is there a loan? +
+
+ + + +
+
+ + + +
+
+ + + +
+
+
+
+
+ + + + +
+
+
+ +
+
+
+
- -
- + +
+ +
+ + +
+ + + + + \ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts index 204344fbb..03138ffeb 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts @@ -189,7 +189,8 @@ export class AssetsInfoComponent implements OnInit { formid: ['4'], assets_details: this._formBuilder.array([ // this.initDetails(), - ]) + ]), + // assets_form_remark:[value.assets_form_remark || 'check'] }); this.addAssetsDetailsWithData(value.assets_details); } else { @@ -198,7 +199,8 @@ export class AssetsInfoComponent implements OnInit { formid: ['4'], assets_details: this._formBuilder.array([ this.initDetails(), - ]) + ]), + // assets_form_remark:[''] }); } this.loadDetails = true; diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html index a9ecfeeb3..622f281b1 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html @@ -1,67 +1,158 @@ - -
-
- - - - -

{{i+1}} Banking details - add - - - delete -

-
-
- - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - - Savings - Current - OD - CC + + + + + + + - - + + - - - Yes - No - NA - - - - - - - - Yes - No - - - - - -
+ + + + + + + + + + + + + + + + + + + + + + + + -
-
- -
-
\ No newline at end of file + + + + + + + + + +

Banking Information

+
+
+ + + + + +

{{i+1}} , Banking Details +

+
+
+ + + + + + + + + + Savings + Current + OD + CC + + + + + + + Yes + No + NA + + + + + + + + Yes + No + + + + + + +
+
+
+
+
+
+
+ + Remarks + + +
+
+
+ + +
+
+ +
+
+ + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.scss index 868e51eb9..bb27e4477 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.scss +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.scss @@ -1,5 +1,5 @@ .banlFields mat-form-field { - width: 100%; + width: 27%; margin: 0 2%; } .bankForm .button { diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.ts index 8b1decbd5..f832d64f4 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.ts @@ -30,7 +30,7 @@ import {ActivatedRoute, Router} from "@angular/router"; export class BankingDetailsComponent implements OnInit { @Input() pdid: number; public bankingForm: FormGroup; - step: any; + step: number; private notifier: NotifierService; constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute, @@ -39,37 +39,42 @@ export class BankingDetailsComponent implements OnInit { this.notifier = notifier; } + ngOnInit() { this.step = 0; this.initBankingForm(); let params: any = {}; - params.pd_id = '252'; - params.pd_form_id = '252'; + params.pd_id = this.pdid; + params.pd_form_id = '7'; this._pd.retriveForm(params).subscribe(data => { console.log('data', data); const control = this.bankingForm.controls['itemRows']; - if( data.status == 200) { - var result = Object.keys(data.records.banking_details).map(function (key) { - return data.records.banking_details[key]; - }); - if (result.length == 0) { - control.push(this.createBankarray()); - } else { - result.forEach(datas => { - control.push(this.createBankarray()); - }); - this.bankingForm.controls.itemRows.setValue(result); - } - } else { - control.push(this.createBankarray()); - } + if (data.status == 200) { + this.bankingForm.controls.banking_form_remark.setValue(data.records.banking_form_remark); + var result = Object.keys(data.records.banking_details).map(function (key) { + return data.records.banking_details[key]; + }); + if (result.length == 0) { + control.push(this.createBankarray()); + } else { + result.forEach(datas => { + control.push(this.createBankarray()); + }); + this.bankingForm.controls.itemRows.setValue(result); + } + } else { + control.push(this.createBankarray()); + } }); } + public initBankingForm(): void { this.bankingForm = this.fb.group({ + banking_form_remark: [''], itemRows: this.fb.array([]) }); } + createBankarray() { return this.fb.group({ applicant_name: ['', Validators.compose([Validators.required])], @@ -81,39 +86,44 @@ export class BankingDetailsComponent implements OnInit { vintage: ['', Validators.compose([Validators.required])], }); } - addBankdetails(event) { + + addBankdetails(index, event) { event.stopPropagation(); const control = this.bankingForm.controls['itemRows']; let length = control.length; this.step = length; control.push(this.createBankarray()); } - deleteBankdetails(index: number, event) { - event.stopPropagation(); + + deleteBankdetails(index: number) { + console.log('index value -', index); const control = this.bankingForm.controls['itemRows']; control.removeAt(index); } + setStep(index: number) { this.step = index; } + bankSubmit() { if (!this.bankingForm.valid) { - this.validateAllFormFields(this.bankingForm); - return; - } - let records: any = {}; - records.pdid = '252'; - records.formid = '252'; - records.fk_createdby = '252'; - records.banking_details = this.bankingForm.controls['itemRows'].value; - console.log('data', records); - this._pd.saveForm(records).subscribe(data => { - console.log('data', data); - this.notifier.notify('success', 'Saved Successfully.'); - }, error => { - this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); - }); + return; + } + let records: any = {}; + records.pdid = this.pdid; + records.formid = '7'; + records.banking_form_remark = this.bankingForm.controls.banking_form_remark.value; + // records.fk_createdby = '252'; + records.banking_details = this.bankingForm.controls['itemRows'].value; + console.log('data', records); + this._pd.saveForm(records).subscribe(data => { + console.log('data', data); + this.notifier.notify('success', 'Saved Successfully.'); + }, error => { + this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + }); } + validateAllFormFields(formGroup: FormGroup) { Object.keys(formGroup.controls).forEach(field => { const control = formGroup.get(field); diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html index 5af3fd5af..a508f499c 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html @@ -28,7 +28,7 @@

-
@@ -70,7 +70,7 @@ + formControlName="other_main_person"formControlName="family_members_involved" (selectionChange)="relationChanged($event)"> {{member.name}} @@ -88,7 +88,7 @@

-
@@ -280,7 +280,7 @@
-
- - - +
+
+ + Remarks + + +
+
\ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts index 225c770ef..624cb0caf 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts @@ -22,6 +22,7 @@ import { /** Service */ import { PdTrigerService } from '../../../../../pd-service/pd-triger.service'; import {ActivatedRoute, Router} from "@angular/router"; + @Component({ selector: 'app-business-info', templateUrl: './business-info.component.html', diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.html index 39ec48a86..ca8fb72ff 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.html @@ -1,54 +1,66 @@ - -

Current Loan Details

-
- - - Yes - No - - - - -

Loan Details

- -

-
- - - - - - - - - - - - - - - - - - - - - - -
-
-
- - - - -
-
\ No newline at end of file + + +

Current Loan Details

+
+ + + Yes + No + + + + +

Loan Details

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+ + Remarks + + +
+
+
+ +
+ +
+
+
+ diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.scss index db319b869..345378a3b 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.scss +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.scss @@ -9,6 +9,7 @@ } .matcard mat-form-field { margin: 0 2%; + width:26%; } .address .button { float: right; diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.ts index f73d6c725..a1a4b369b 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.ts @@ -22,6 +22,7 @@ import { /** Service */ import { PdTrigerService } from '../../../../../pd-service/pd-triger.service'; import {ActivatedRoute, Router} from "@angular/router"; + @Component({ selector: 'app-current-loan', templateUrl: './current-loan.component.html', @@ -93,8 +94,7 @@ export class CurrentLoanComponent implements OnInit { } submitCurrentloan() { if (!this.currentLoanForm.valid) { - this.validateAllFormFields(this.currentLoanForm); - return; + return; } let records: any = {}; records.pdid = this.pdid; diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html index 4b92a9f61..0f16f392e 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html @@ -63,9 +63,14 @@
- - - +
+
+ + Remarks + + +
+
\ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.ts index e73af719b..2a95ace92 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.ts @@ -22,6 +22,7 @@ import { /** Service */ import { PdTrigerService } from '../../../../../pd-service/pd-triger.service'; import {ActivatedRoute, Router} from '@angular/router'; + @Component({ selector: 'app-employment-info', templateUrl: './employment-info.component.html', diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.html index c535549be..33085f7fa 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.html @@ -1,5 +1,7 @@ - -

Family

+ + + +

Family Details

@@ -18,11 +20,11 @@

Earning Members

- +

-
- +
@@ -65,7 +67,7 @@

-
@@ -95,7 +97,7 @@
@@ -103,8 +105,7 @@ -

Residence -

+

Residence

@@ -126,11 +127,25 @@ - - -

-
\ No newline at end of file +
+
+ + Remarks + + +
+
+
+ +
+ + + + + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.scss index db319b869..c97e4d992 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.scss +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.scss @@ -8,7 +8,12 @@ width: 100%; } .matcard mat-form-field { + margin: 0 2%; + width:27%; +} +.matcards mat-form-field { margin: 0 2%; + width:40%; } .address .button { float: right; diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.ts index 9936555b3..5d7148a1c 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.ts @@ -22,6 +22,7 @@ import { /** Service */ import { PdTrigerService } from '../../../../../pd-service/pd-triger.service'; import {ActivatedRoute, Router} from "@angular/router"; + @Component({ selector: 'app-family-details', templateUrl: './family-details.component.html', @@ -43,7 +44,8 @@ export class FamilyDetailsComponent implements OnInit { public ownershipOther: AbstractControl; public rent: AbstractControl; filteredStates: any = [ - 'Co-Applicant 1 to x', + 'Main Applicant', + 'Co-Applicant ', 'Accountant', 'Manager', 'Relative of the applicant', @@ -63,8 +65,8 @@ export class FamilyDetailsComponent implements OnInit { this.getOccupation(); this.initFamilyForm(); let params: any = {}; - params.pd_id = '251'; - params.pd_form_id = '555'; + params.pd_id = this.pdid; + params.pd_form_id = '6'; this._pd.retriveForm(params).subscribe(data => { console.log('data', data); const control = this.familyForm.controls['nonEarningMembers']; @@ -83,6 +85,8 @@ export class FamilyDetailsComponent implements OnInit { this.familyForm.controls.members.setValue(data.records.family_members); this.familyForm.controls.years.setValue(data.records.no_of_years); this.familyForm.controls.ownership.setValue(data.records.ownership); + this.familyForm.controls.family_details_form_remark.setValue(data.records.family_details_form_remark); + if (data.records.ownership_others) { this.familyForm.controls.ownershipOther.setValue(data.records.ownership_others); } @@ -121,7 +125,8 @@ export class FamilyDetailsComponent implements OnInit { ownershipOther: [''], rent: [''], earningMembers: this.fb.array([]), - nonEarningMembers: this.fb.array([]) + nonEarningMembers: this.fb.array([]), + family_details_form_remark: [''] }); this.person = this.familyForm.controls['person']; this.personOther = this.familyForm.controls['personOther']; @@ -190,8 +195,7 @@ export class FamilyDetailsComponent implements OnInit { } submitFamily() { if (!this.familyForm.valid) { - this.validateAllFormFields(this.familyForm); - return; + return; } console.log('data', this.familyForm.value); let records: any = {}; @@ -211,9 +215,10 @@ export class FamilyDetailsComponent implements OnInit { records.family_members = this.members.value; records.earning_members = this.familyForm.controls['earningMembers'].value; records.non_earning_members = this.familyForm.controls['nonEarningMembers'].value; - records.pdid = '251'; - records.formid = '555'; - records.fk_createdby = '251'; + records.family_details_form_remark = this.familyForm.controls['family_details_form_remark'].value; + records.pdid = this.pdid; + records.formid = '6'; + // records.fk_createdby = '251'; console.log('params', records); this._pd.saveForm(records).subscribe(data => { console.log('data', data); diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html index 23e0c28fe..720f89fc3 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html @@ -5,23 +5,23 @@

Data as per Financial statements

-
- + - + - + - - + + @@ -44,23 +44,23 @@

Estimated Value

-
- + - + - + - - + + @@ -77,9 +77,14 @@
- - - +
+
+ + Remarks + + +
+
\ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.scss index db319b869..efbc1400d 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.scss +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.scss @@ -15,4 +15,7 @@ width: 10px; background: #62B013; color: white; +} +.highlight { + color: red; } \ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.ts index 98d10651b..41e4e8014 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.ts @@ -22,6 +22,7 @@ import { /** Service */ import { PdTrigerService } from '../../../../../pd-service/pd-triger.service'; import {ActivatedRoute, Router} from '@angular/router'; + @Component({ selector: 'app-financial-info', templateUrl: './financial-info.component.html', @@ -46,43 +47,50 @@ export class FinancialInfoComponent implements OnInit { params.pd_form_id = this.form_id; this._pd.retriveForm(params).subscribe(value => { console.log('value', value); - // const rawMaterial = this.financialForm.controls['raw_materials']; - // const finishedGoods = this.financialForm.controls['finished_goods']; - // if (value.status == 200) { - // let result = Object.keys(value.records.raw_materials).map(function(key) { - // return value.records.raw_materials[key]; - // }); - // let result_Goods = Object.keys(value.records.finished_goods).map(function(key) { - // return value.records.finished_goods[key]; - // }); - // this.stockForm.controls['stock_remarks'].setValue(value.records.stock_remarks); - // if (result.length > 0) { - // result.forEach(val => { - // rawMaterial.push(this.createRawmaterial()); - // }); - // this.stockForm.controls['raw_materials'].setValue(result); - // } else { - // rawMaterial.push(this.createRawmaterial()); - // } - // if (result_Goods.length > 0) { - // result_Goods.forEach(val => { - // finishedGoods.push(this.createGoods()); - // }); - // this.stockForm.controls['finished_goods'].setValue(result_Goods); - // } else { - // finishedGoods.push(this.createGoods()); - // } - // } else { - // rawMaterial.push(this.createRawmaterial()); - // finishedGoods.push(this.createGoods()); - // } + const financial_date = this.financialForm.controls['date_per_financial']; + const estimated_val = this.financialForm.controls['estimated_value']; + if (value.status == 200) { + let retriveData = value.records; + let result = Object.keys(value.records.date_per_financial).map(function(key) { + return value.records.date_per_financial[key]; + }); + let result_val = Object.keys(value.records.estimated_value).map(function(key) { + return value.records.estimated_value[key]; + }); + if (result.length > 0) { + result.forEach(val => { + financial_date.push(this.createDate()); + }); + retriveData.date_per_financial = result; + } else { + financial_date.push(this.createDate()); + } + if (result_val.length > 0) { + result_val.forEach(val => { + estimated_val.push(this.createValue()); + }); + retriveData.estimated_value = result_val; + } else { + estimated_val.push(this.createValue()); + } + retriveData.pdid = this.pdid; + retriveData.formid = this.form_id; + retriveData.fk_createdby = this.pdid; + this.financialForm.setValue(retriveData); + } else { + financial_date.push(this.createDate()); + estimated_val.push(this.createValue()); + } }) } public initstockForm(): void { this.financialForm = this.fb.group({ + pdid: this.pdid, + formid: this.form_id, + fk_createdby: this.pdid, financial_remarks: ['', Validators.compose([Validators.required])], - date_per_financial: this.fb.array([this.createDate()]), - estimated_value: this.fb.array([this.createValue()]) + date_per_financial: this.fb.array([]), + estimated_value: this.fb.array([]) }); } createDate() { @@ -91,17 +99,17 @@ export class FinancialInfoComponent implements OnInit { financial_annual_sale: ['', Validators.compose([Validators.required, Validators.pattern(/^[0-9\(\)]+$/)])], financial_net_profit: ['', Validators.compose([Validators.required, Validators.pattern(/^-?[1-9]\d*|0$/)])], financial_margin: ['', Validators.compose([Validators.required])], - financial_variation: ['', Validators.compose([Validators.required])], + financial_variation: [''], financial_reason: ['', Validators.compose([Validators.required])], }); } createValue() { return this.fb.group({ estimate_year: ['', Validators.compose([Validators.required, Validators.pattern(/^[0-9]{4}-[0-9]{2}$/)])], - estimate_annual_sale: ['', Validators.compose([Validators.required, Validators.pattern(/^[0-9]$/)])], + estimate_annual_sale: ['', Validators.compose([Validators.required, Validators.pattern(/^[0-9\(\)]+$/)])], estimate_net_profit: ['', Validators.compose([Validators.required, Validators.pattern(/^-?[1-9]\d*|0$/)])], estimate_margin: ['', Validators.compose([Validators.required])], - estimate_variation: ['', Validators.compose([Validators.required])], + estimate_variation: [''], estimate_reason: ['', Validators.compose([Validators.required])], }); } @@ -121,34 +129,58 @@ export class FinancialInfoComponent implements OnInit { const control = this.financialForm.controls['estimated_value']; control.removeAt(index); } - calMargin(event, index) { - let salary = this.financialForm.controls['date_per_financial'].value[index].financial_annual_sale; - console.log(event.target.value); - console.log('salary', salary); - let margin = event.target.value / salary * 100; - this.financialForm.controls['date_per_financial'].value[index].financial_annual_sale = margin.toFixed(2); - this.financialForm.controls['date_per_financial'].setValue(this.financialForm.controls['date_per_financial']); + calYearVariation(index, detail) { + let profit = detail.value.financial_net_profit; + if ( profit != '' && index != 0) { + console.log('value') + let array = this.financialForm.controls['date_per_financial'] + let prev_profit = array.value[index - 1].financial_net_profit; + let variation = profit - prev_profit / prev_profit * 100; + detail.controls.financial_variation.setValue(variation.toFixed(2)) + // detail.controls.financial_variation.disable() + } + } + calMargin(index, detail) { + console.log('detail', detail); + let salary = detail.value.financial_annual_sale; + let profit = detail.value.financial_net_profit; + if (salary != '' && profit != '') { + let margin = profit / salary * 100; + detail.controls.financial_margin.setValue(margin.toFixed(2)) + // detail.controls.financial_margin.disable() + } + } + calVariation(index, detail) { + let profit = detail.value.estimate_net_profit; + if ( profit != '' && index != 0) { + let array = this.financialForm.controls['estimated_value'] + let prev_profit = array.value[index - 1].estimate_net_profit; + let variation = profit - prev_profit / prev_profit * 100; + detail.controls.estimate_variation.setValue(variation.toFixed(2)) + // detail.controls.estimate_variation.disable() + } + } + calMarginVal(index, detail) { + let salary = detail.value.estimate_annual_sale; + let profit = detail.value.estimate_net_profit; + if (salary != '' && profit != '') { + let margin = profit / salary * 100; + detail.controls.estimate_margin.setValue(margin.toFixed(2)) + // detail.controls.estimate_margin.disable() + } } submitDetails() { if (!this.financialForm.valid) { - this.validateAllFormFields(this.financialForm); return; } - // let records: any = {}; - // records.pdid = this.pdid; - // records.formid = this.form_id; - // records.fk_createdby = this.pdid; - // records.raw_materials = this.stockForm.controls['raw_materials'].value; - // records.stock_remarks = this.stockForm.controls['stock_remarks'].value; - // records.finished_goods = this.stockForm.controls['finished_goods'].value; - // console.log('data', records); - // this._pd.saveForm(records).subscribe(data => { - // console.log('data', data); - // this.notifier.notify('success', 'Saved Successfully.'); - // }, error => { - // this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); - // }) - // } + let records = this.financialForm.value; + console.log('data', records); + this._pd.saveForm(records).subscribe(data => { + console.log('data', data); + this.notifier.notify('success', 'Saved Successfully.'); + }, error => { + this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + }) } validateAllFormFields(formGroup: FormGroup) { Object.keys(formGroup.controls).forEach(field => { diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html index 4bbaa6ff3..dd8ad6799 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html @@ -112,9 +112,14 @@
- - - +
+
+ + Remarks + + +
+
\ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.scss index 8c61eec1d..fce74bbc3 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.scss +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.scss @@ -12,6 +12,7 @@ } .matcard mat-form-field { margin: 0 2%; + width:26%; } .address .button { float: right; diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts index 6ff07a5ce..01648a36d 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts @@ -22,6 +22,7 @@ import { /** Service */ import { PdTrigerService } from '../../../../../pd-service/pd-triger.service'; import {ActivatedRoute, Router} from '@angular/router'; + @Component({ selector: 'app-loan-details', templateUrl: './loan-details.component.html', @@ -141,8 +142,7 @@ export class LoanDetailsComponent implements OnInit { submitLoanDetails() { console.log('formData', this.loanDetailsForm.value); if (!this.loanDetailsForm.valid) { - this.validateAllFormFields(this.loanDetailsForm); - return; + return; } let records: any = {}; records.pdid = this.pdid; diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/other-income/other-income.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/other-income/other-income.component.html index 152416d0d..fc82feab0 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/other-income/other-income.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/other-income/other-income.component.html @@ -1,52 +1,109 @@ - -
- - - Yes - No - - - - -

Loan Details

- -

-
- + + + + + + + + + + + + + + + + + + + + +

Other Income Details

+ - - Rental Income - Interest Income - Agricultural Income - Dividend Income and Others + + Yes + No - - - - - - {{frq.name}} - - - - -
-
-
-
- - - - -
-
\ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Income Details

+ +

+
+ + + + Rental Income + Interest Income + Agricultural Income + Dividend Income + + + + + + + + {{frq.name}} + + + + + +
+
+
+
+
+ + Remarks + + +
+
+
+ +
+ + + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/other-income/other-income.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/other-income/other-income.component.ts index f0b03b565..fc5435bf7 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/other-income/other-income.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/other-income/other-income.component.ts @@ -22,6 +22,7 @@ import { /** Service */ import { PdTrigerService } from '../../../../../pd-service/pd-triger.service'; import {ActivatedRoute, Router} from '@angular/router'; + @Component({ selector: 'app-other-income', templateUrl: './other-income.component.html', @@ -102,8 +103,7 @@ export class OtherIncomeComponent implements OnInit { } submitCurrentDetails() { if (!this.otherIncomeForm.valid) { - this.validateAllFormFields(this.otherIncomeForm); - return; + return; } let records: any = {}; records.pdid = this.pdid; diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.html index 36b5e52f7..87b675661 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.html @@ -72,7 +72,7 @@ - + @@ -112,6 +112,15 @@
+ +
+
+ + Remarks + + +
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.ts index 9dad2e46c..e4e50d7f4 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.ts @@ -123,6 +123,7 @@ var co_result = Object.keys(data.co_applicant_details).map(function(key) { form_id:null, mainItem: mainApplicantGroup, coItem: coApplicantGroup, + personal_info_form_remark: [data.personal_info_form_remark] }); //console.log(this._personalForm); this.loadDataStatus = true; @@ -178,6 +179,7 @@ var co_result = Object.keys(data.co_applicant_details).map(function(key) { form_id:null, mainItem: mainApplicantGroup, coItem: coApplicantGroup, + personal_info_form_remark:null }); //console.log(this._personalForm); this.loadDataStatus = true; @@ -236,7 +238,8 @@ submitPersonalForm(formData:any) { "pdid": this.pdid, "formid": this.form_id, "main_applicant_details":main_applicantDetails, - "co_applicant_details":co_applicantDetails + "co_applicant_details":co_applicantDetails, + "personal_info_form_remark": this._personalForm.get('personal_info_form_remark').value }; this._pd.savePDFormDetailsWithID(save_details).subscribe(result => { if (result.status == 200) { diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html index 0ceb4944e..3a55530a2 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html @@ -6,7 +6,7 @@

Raw Materials

-
@@ -42,7 +42,7 @@

Finished Goods

-
@@ -73,9 +73,14 @@
- - - +
+
+ + Remarks + + +
+
\ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.ts index 6a89f87d5..aaddf2420 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.ts @@ -22,6 +22,7 @@ import { /** Service */ import { PdTrigerService } from '../../../../../pd-service/pd-triger.service'; import {ActivatedRoute, Router} from '@angular/router'; + @Component({ selector: 'app-stock', templateUrl: './stock.component.html', @@ -120,8 +121,7 @@ export class StockComponent implements OnInit { } submitDetails() { if (!this.stockForm.valid) { - this.validateAllFormFields(this.stockForm); - return; + return; } let records: any = {}; records.pdid = this.pdid; diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html index ef86c6b67..ab40fa472 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html @@ -1,10 +1,15 @@ +
+ +
- + - + +
@@ -21,7 +26,7 @@ - +
{{ (formButton.form_name.length>17)? (formButton.form_name | slice:0:17)+'..':(formButton.form_name) }} @@ -41,9 +46,9 @@
-
- +
+

{{mainApplicantName}}

{{pdMasterList.customer_segment_name}} diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.scss index 543149a8b..0d116af22 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.scss +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.scss @@ -116,11 +116,6 @@ $product-bg-color-hover: rgba(103, 58, 183, 0.7); mat-icon{ color: #ff3636; } -.start_close_btn { - position: fixed; - right: 69px; - top: 112px; -} .address { display: flex; padding: 0 2%; diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts index ffff61e10..026e6a552 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts @@ -43,7 +43,7 @@ export class StartPdComponent implements OnInit, OnDestroy { // getQuestionsLength:number; // answerList:any=[]; // ansPDList:any=[]; - pdFullDetails:any=[]; + // category static form buttons categoryFormButtons: any = [ @@ -104,6 +104,54 @@ export class StartPdComponent implements OnInit, OnDestroy { "form_name": "Financial Info", }, ]; + +pdFullDetails:any=[]; + +// category static form buttons +// categoryFormButtons: any; + // = [ + // { + // "form_id": 1, + // "form_name": "Supplier Details" + // }, + // { + // "form_id": 2, + // "form_name": "Client Details", + // }, + // { + // "form_id": 3, + // "form_name": "Personal Details", + // }, + // { + // "form_id":4, + // "form_name":"Asset Details", + // }, + // { + // "form_id": 5, + // "form_name": "Address" + // }, + // { + // "form_id": 6, + // "form_name": "Family", + // }, + // { + // "form_id": 7, + // "form_name": "Banking", + // }, + // { + // "form_id": 8, + // "form_name": "Current Loan", + // }, + // { + // "form_id": 9, + // "form_name": "Other Income", + // }, + // { + // "form_id": 10, + // "form_name": "Loan Details", + // }, + + // ]; formsCategoryEnable: boolean = false; selectedFormsCategory: any; // create values for status check @@ -167,6 +215,7 @@ export class StartPdComponent implements OnInit, OnDestroy { } // load pd template details + // loadTemplates(startID: string) { // this._pd.loadPDTemplates(startID).subscribe( // data => { @@ -188,6 +237,30 @@ export class StartPdComponent implements OnInit, OnDestroy { // this.currentPDStatus = ""; // } // }, error => this.errorMessage = error); +// } +// loadTemplates(startID: string) { +// this._pd.loadPDTemplates(startID).subscribe( +// data => { +// if (data.status == 200) { +// this.pdMasterList = data.records.pdmaster_details; +// this.categoryList = data.records.question_answers; +// // this.categoryFormButtons = data.records.template_forms; +// let filterApplicantName = data.records.pdapplicants_detials.filter(item => item.applicant_type == 1); +// this.mainApplicantName = filterApplicantName[0].applicant_name; +// this.currentPDStatus = data.records.pdmaster_details.pd_status; +// +// this.actualQuestions = data.records.counts.overall_question_count; +// this.answeredQuestions = data.records.counts.overall_answered_count; +// +// this.pdFullDetails = data.records +// } +// else { +// this.pdMasterList = ""; +// this.mainApplicantName = ""; +// this.categoryList = []; +// this.currentPDStatus = ""; +// } +// }, error => this.errorMessage = error); // } ngOnDestroy(): void { @@ -211,6 +284,7 @@ export class StartPdComponent implements OnInit, OnDestroy { "template_id": selectedQuestions.fk_template_id, "category_id": selectedQuestions.fk_template_question_category_id } + this.getAnswers(serachQuestions); } loadTemplates(startID:string){ diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/tele-pd-allocation/tele-pd-allocation.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/tele-pd-allocation/tele-pd-allocation.component.html new file mode 100644 index 000000000..125066e83 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/tele-pd-allocation/tele-pd-allocation.component.html @@ -0,0 +1,51 @@ +
+
+ + +
+ + + {{pageTitle}} + + + + + +
+
+
+ + + + No Image
+ {{officer.first_name}} +
+ {{officer.mobile_no}}
+ PD in hand - {{officer.count}} +
+
+
+
+ + +
+ + +

No central pd officer available.

+
+
+ + +
+ +
+ +
+
+
+
+ + + + + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/tele-pd-allocation/tele-pd-allocation.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/tele-pd-allocation/tele-pd-allocation.component.scss new file mode 100644 index 000000000..6e263adae --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/tele-pd-allocation/tele-pd-allocation.component.scss @@ -0,0 +1,3 @@ +.example-full-width{ + width: 100%; +} \ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/tele-pd-allocation/tele-pd-allocation.component.spec.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/tele-pd-allocation/tele-pd-allocation.component.spec.ts new file mode 100644 index 000000000..4ff90d423 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/tele-pd-allocation/tele-pd-allocation.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { TelePdAllocationComponent } from './tele-pd-allocation.component'; + +describe('TelePdAllocationComponent', () => { + let component: TelePdAllocationComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ TelePdAllocationComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(TelePdAllocationComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/tele-pd-allocation/tele-pd-allocation.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/tele-pd-allocation/tele-pd-allocation.component.ts new file mode 100644 index 000000000..9fb85fb4b --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/tele-pd-allocation/tele-pd-allocation.component.ts @@ -0,0 +1,84 @@ +import { Component, OnInit, Inject } from '@angular/core'; +import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material'; +import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms'; +import { NotifierService } from 'angular-notifier'; +import { PdTrigerService } from '../../../pd-service/pd-triger.service'; + +@Component({ + selector: 'app-tele-pd-allocation', + templateUrl: './tele-pd-allocation.component.html', + styleUrls: ['./tele-pd-allocation.component.scss'] +}) +export class TelePdAllocationComponent implements OnInit { + public pageTitle: string = "Allocate To Central Officer"; + public _pdAllocationForm: FormGroup; + public pdCentralOfficerList: any = []; + errorMessage: any; + notifier : NotifierService; + selectedItem:any; + isDisabled: boolean; + constructor( notifier: NotifierService, + private _fb: FormBuilder, + private dialogRef: MatDialogRef, + private _pd: PdTrigerService, + @Inject(MAT_DIALOG_DATA) public data: any) { + this.notifier=notifier; + } + + ngOnInit() { + this.isDisabled=true; + this.getPDOfficerList(this.data.pd_id); + + } + +// pd officer list + getPDOfficerList(pdID:string){ + this._pd.getPdOfficerList(pdID).subscribe( + data => { + if (data.status == 200) { + this.pdCentralOfficerList= data.records.centralpdofficers; + + } + }, error => this.errorMessage = error); + + } + // select pd officer list + selectPdOfficer(selected:any){ + this.isDisabled=false; + this.selectedItem=selected; + // this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + + } + /** To update pd officer*/ + updatePdOfficer(allocateDate:any) { + if(this.isDisabled){ + this.notifier.notify('warning', 'Please Choose PD Officer.!'); + } + else { + let updateData = { + "pd_id":this.data.pd_id, + "central_pd_officer_id":allocateDate.fk_user_id, + } + this._pd.updatePdOfficer(updateData).subscribe( + result => { + if (result.status == 200) { + this.notifier.notify('success', 'PD Allocated.!'); + this.dialogRef.close(); + } + else { + this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + this.errorMessage = "Something Wents Wrong Try Again.!"; + } + }, error => { + this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + this.errorMessage = "Some Thing Wents Wrong Try Again.!"; + // this.dialogRef.close(); + }); + } + } +/** For Popup Close Button */ + closeAllocationComponent(): void { + this.dialogRef.close(); + } +} + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html index a0dfcc36d..234582cf1 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html @@ -16,8 +16,11 @@ - person{{master.pd_allocated_to | titlecase}}    + person{{master.pd_allocated_to | titlecase}} + person{{master.executive_name | titlecase}}/{{master.centralofficer | titlecase}} + person{{master.centralofficer | titlecase}} + +    {{master.pd_status | titlecase}}  On {{master.scheduled_on}} {{master.pd_status | titlecase}} QC Completed diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts index 34a139eee..0f38ac44e 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts @@ -6,6 +6,7 @@ import { NotifierService } from 'angular-notifier'; import { PdTrigerService } from '../../../pd-service/pd-triger.service'; import { PdAllocationComponent } from '../pd-allocation/pd-allocation.component'; import { SmartPdAllocationComponent } from '../smart-pd-allocation/smart-pd-allocation.component'; +import { TelePdAllocationComponent } from './../tele-pd-allocation/tele-pd-allocation.component'; import { ListPdComponent } from '../list-pd.component'; import { SchedulePdComponent } from '../schedule-pd/schedule-pd.component'; import { EditPdApplicantComponent } from '../edit-pd-applicant/edit-pd-applicant.component'; @@ -110,7 +111,7 @@ export class ViewPdComponent implements OnInit, OnDestroy { } // pd allocation to pdAllocationTo(pdData:any) { - if(pdData.fk_pd_type != 2){ + if(pdData.fk_pd_type == 1){ const dialogRef = this.dialog.open(PdAllocationComponent, { data: pdData, disableClose: true @@ -133,6 +134,18 @@ export class ViewPdComponent implements OnInit, OnDestroy { this.viewPdDetails(this.viewID) }); } + else if(pdData.fk_pd_type == 3){ + const dialogRef = this.dialog.open(TelePdAllocationComponent, { + data: pdData, + disableClose: true, + }); + dialogRef.afterClosed() + .subscribe(dataresult => { + // this.notifier.notify('success', 'Successfully allocated.!'); + + this.viewPdDetails(this.viewID) + }); + } } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts b/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts index aa37696d8..4ccb8e100 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts @@ -60,6 +60,8 @@ import {EmploymentInfoComponent} from "./list-pd/start-pd/forms/employment-info/ import {BusinessInfoComponent} from "./list-pd/start-pd/forms/business-info/business-info.component"; import {FinancialInfoComponent} from "./list-pd/start-pd/forms/financial-info/financial-info.component"; +import { TelePdAllocationComponent } from './list-pd/tele-pd-allocation/tele-pd-allocation.component'; + /** * Custom angular notifier options */ @@ -132,7 +134,8 @@ const pdCustomNotifierOptions: NotifierOptions = { // AgmCoreModule.forRoot({apiKey: 'AIzaSyBtdO5k6CRntAMJCF-H5uZjTCoSGX95cdk'}), OwlDateTimeModule, // OwlNativeDateTimeModule, // ], - declarations: [FinancialInfoComponent, BusinessInfoComponent, EmploymentInfoComponent, StockComponent, BankingDetailsComponent, ListPdComponent, FamilyDetailsComponent, AddressComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, CurrentLoanComponent, AssetsInfoComponent, LoanDetailsComponent, OtherIncomeComponent, SupplierInfoComponent, PersonalInfoComponent], + declarations: [TelePdAllocationComponent, FinancialInfoComponent, BusinessInfoComponent, EmploymentInfoComponent, StockComponent, BankingDetailsComponent, ListPdComponent, FamilyDetailsComponent, AddressComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, CurrentLoanComponent, AssetsInfoComponent, LoanDetailsComponent, OtherIncomeComponent, SupplierInfoComponent, PersonalInfoComponent], + // exports: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent], // providers: [PdTrigerService, GetGeometricLocationService], // entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent], @@ -164,7 +167,7 @@ const pdCustomNotifierOptions: NotifierOptions = { // declarations: [ListPdComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent, AssetsInfoComponent], exports: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent], providers: [PdTrigerService, GetGeometricLocationService], - entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent] + entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent] }) export class ManagePdModule { } diff --git a/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts b/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts index aa5c94ce0..212ab19e0 100644 --- a/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts +++ b/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts @@ -46,8 +46,9 @@ export class PdTrigerService { catchError(this.handleError('role', [])) ) } - saveForm(records): Observable { + saveForm(records: any): Observable { console.log('table', records); + records.fk_createdby = this._aws.getlocale(); let params = {records} return this._http.post(this.apiUrl + 'savePDFormDetails', params) .pipe( @@ -265,7 +266,7 @@ getPDFormDetailsWithID(pdID, formID ):Observable { // saveData[0].fk_updatedby = this._aws.getlocale(); // saveData[0].updatedon = currentdate; - return this._http.post(this.apiUrl+"savePDQuestions",{"records1":saveData}) + return this._http.post(this.apiUrl+"savePDQuestions",{"records":saveData}) .pipe( catchError(this.handleError('operation', [])) ) diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.html b/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.html index 7ea892711..db51c2644 100644 --- a/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.html +++ b/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.html @@ -1,5 +1,9 @@ +
+ +
@@ -33,8 +37,8 @@
- +

{{mainApplicantName}}

{{pdMasterList.customer_segment_name}} @@ -122,7 +126,7 @@
-
+
skip_previous chevron_left @@ -225,7 +229,7 @@
-
+
skip_previous chevron_left @@ -321,7 +325,7 @@
-
+
skip_previous chevron_left diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.scss b/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.scss index 0e5aa8a36..fc7ac8814 100644 --- a/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.scss +++ b/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.scss @@ -116,8 +116,3 @@ $product-bg-color-hover: rgba(103, 58, 183, 0.7); mat-icon{ color: #ff3636; } -.start_close_btn { - position: fixed; - right: 69px; - top: 112px; -} \ No newline at end of file diff --git a/ng6-seed/src/app/template/questions/edit/edit.component.html b/ng6-seed/src/app/template/questions/edit/edit.component.html index 20fea4322..f39261d1d 100644 --- a/ng6-seed/src/app/template/questions/edit/edit.component.html +++ b/ng6-seed/src/app/template/questions/edit/edit.component.html @@ -12,14 +12,14 @@ You must Select Category.
-
+
@@ -82,7 +82,7 @@
+ class="mr-1 mb-1 hover-icon" (click)="addLanguage(null, null, null, null, $event); false">add
diff --git a/ng6-seed/src/app/template/questions/edit/edit.component.ts b/ng6-seed/src/app/template/questions/edit/edit.component.ts index 4db0e5967..843c2d2eb 100644 --- a/ng6-seed/src/app/template/questions/edit/edit.component.ts +++ b/ng6-seed/src/app/template/questions/edit/edit.component.ts @@ -93,7 +93,7 @@ export class EditComponent implements OnInit { question: [this.data.question, Validators.compose([Validators.required])], description: [this.data.description, Validators.compose([Validators.required])], fk_question_category: [this.data.fk_question_category, Validators.compose([Validators.required])], - fk_question_group_id: [this.data.fk_question_group_id, Validators.compose([Validators.required])], + // fk_question_group_id: [this.data.fk_question_group_id, Validators.compose([Validators.required])], fk_question_answertype: [this.data.fk_question_answertype, Validators.compose([Validators.required])], isactive: [this.data.isactive], answers: this._formBuilder.array([ @@ -115,7 +115,7 @@ export class EditComponent implements OnInit { return this._formBuilder.group({ answer: [ans, Validators.compose([Validators.required])], question_answer_id: [fk_id], - fk_question_group_id: [fk_question_group_id], + // fk_question_group_id: [fk_question_group_id], isactive: [isAct] }); }