diff --git a/_fonts.scss b/_fonts.scss
deleted file mode 100644
index 2c1cdf2..0000000
--- a/_fonts.scss
+++ /dev/null
@@ -1,35 +0,0 @@
-/* You can add fonts */
-
-@font-face {
- font-family: "CharterITCW05";
- src: url("assets/fonts/CharterITCW05-Regular.woff") format("woff");
-}
-
-/*@font-face {
- font-family: "HelveticaNeue";
- src: url("assets/fonts/HelveticaNeue-Regular.ttf") format("truetype");
-}
-
-@font-face {
- font-family: "PragmaticaMedium";
- src: url("assets/fonts/PragmaticaMedium.otf") format("opentype");
-}*/
-
-
-:host ::ng-deep {
- h1, h2, h3, h4, h5, h6 {
- font-family: "CharterITCW05";
- }
-
- /*label, .p-button, th {
- font-family: "PragmaticaMedium";
- font-weight: 100;
- }*/
-
- /** {
- :not(h1, h2, h3, h4, h5, h6, label, .p-button, th, .pi) {
- font-family: "HelveticaNeue";
- font-weight: 600;
- }
- }*/
-}
diff --git a/_general.scss b/_general.scss
deleted file mode 100644
index e06252b..0000000
--- a/_general.scss
+++ /dev/null
@@ -1,1263 +0,0 @@
-/* You can add general styles */
-@import 'pallete';
-
-body {
- margin: 0;
- padding: 0;
-}
-
-a {
- text-decoration: none;
-}
-
-h1 {
- font-size: 40px; // Desktop 38/40/45px // Mobile 24px;
- line-height: 1.3em; // Mobile 1.2em
-}
-
-h2 {
- font-size: 38px; // Desktop 38/40/45px // Mobile 24px;
- line-height: 1.3em; // Mobile 1.2em
-}
-
-h3 {
- &.sub-title {
- padding: 0px 30px 10px;
- margin: 0px;
- border-bottom: 2px solid $black;
- }
-}
-
-.container {
- max-width: 1440px;
- position: relative;
- left: 50%;
- transform: translateX(-50%);
-}
-
-// Header
-.header {
- padding: 30px 30px 0px;
-}
-
-// Main Content
-.main-content {
- padding: 30px;
-
- h1 {
- text-align: center;
- color: $orange;
- margin-top: 0px;
- }
- //sub-content
- .sub-content {
- padding: 30px;
- }
-}
-// Helper
-.readonly {
- label {
- margin-right: 0.5rem;
- font-weight: 600;
- }
-
- span {
- color: $orange;
- }
-}
-
-.one-button {
- min-width: 55px !important;
-}
-
-.two-buttons {
- min-width: 117px !important;
-}
-
-.three-buttons {
- min-width: 163px !important;
-}
-
-.four-buttons {
- min-width: 209px !important;
-}
-
-.float-right {
- float: right !important;
-}
-
-.float-left {
- float: left !important;
-}
-
-//progressSpinner
-.progress-spinner {
- position: relative;
- width: 100%;
- height: 420px;
-
- .spinner {
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- }
-
- :host ::ng-deep .p-component {
- @keyframes p-progress-spinner-color {
- 100%, 0% {
- stroke: $orange;
- }
-
- 40% {
- stroke: $tangerine;
- }
-
- 66% {
- stroke: $light-tangerine-1;
- }
-
- 80%, 90% {
- stroke: $light-tangerine-2;
- }
- }
- }
-}
-
-// selectbutton
-.p-selectbutton {
- //button
- .p-button {
- background: $white;
- border: 2px solid $black;
- color: $black;
-
- &:not(.p-disabled) {
- &:not(.p-highlight) {
- &:hover {
- background: $light-grey;
- border-color: $black;
- color: $black;
- }
- }
- }
-
- &:focus {
- box-shadow: unset;
- }
- //highlight
- &.p-highlight {
- background: $tangerine;
- border-color: $tangerine;
- color: $black;
-
- &:hover {
- background: $dark-tangerine-1;
- border-color: $dark-tangerine-1;
- color: $white;
- }
- }
- //button-label
- .p-button-label {
- font-weight: 600;
- line-height: 1;
- }
- }
-}
-
-// Buttons
-.p-button {
- padding: 0.5rem 2rem;
- font-weight: 600;
-
- &:enabled {
- background: $black;
- color: $white;
- border: 1px solid $black;
-
- &:hover {
- background: $black;
- color: $orange;
- border: 1px solid $black;
- }
-
- &:focus {
- box-shadow: 0 0 0 0.1rem $orange;
- }
-
- &.p-button-primary {
- background: $black;
- color: $white;
- border: 1px solid $black;
-
- &:hover {
- background: $black;
- color: $orange;
- border: 1px solid $black;
- }
-
- &:focus {
- box-shadow: 0 0 0 0.1rem $orange;
- }
-
- &.p-button-outlined {
- background: none;
- color: $black;
- border: 2px solid $black;
-
- &:hover {
- color: $orange;
- border: 2px solid $orange;
- }
-
- &:focus {
- box-shadow: 0 0 0 0.1rem $orange;
- }
- }
- }
-
- &.p-button-secondary {
- background: $tangerine;
- color: $white;
- border: 1px solid $tangerine;
-
- &:hover {
- background: $dark-tangerine-1;
- color: $white;
- border: 1px solid $dark-tangerine-1;
- }
-
- &:focus {
- box-shadow: 0 0 0 0.1rem $tangerine;
- }
-
- &.p-button-outlined {
- background: none;
- color: $black;
- border: 2px solid $black;
-
- &:hover {
- color: $tangerine;
- border: 2px solid $tangerine;
- }
-
- &:focus {
- box-shadow: 0 0 0 0.1rem $light-tangerine-1;
- }
- }
- }
-
- &.p-button-warning {
- background: $light-tangerine-2;
- color: $black;
- border: 1px solid $light-tangerine-2;
-
- &:hover {
- background: $light-tangerine-1;
- color: $black;
- border: 1px solid $light-tangerine-1;
- }
-
- &:focus {
- box-shadow: 0 0 0 0.1rem $light-tangerine-2;
- }
-
- &.p-button-outlined {
- background: none;
- color: $black;
- border: 2px solid $black;
-
- &:hover {
- color: $light-tangerine-1;
- border: 2px solid $light-tangerine-1;
- }
-
- &:focus {
- box-shadow: 0 0 0 0.1rem $light-tangerine-2;
- }
- }
- }
-
- &.p-button-danger {
- background: $dark-orange-1;
- color: $white;
- border: 1px solid $dark-orange-1;
-
- &:hover {
- background: $dark-orange-2;
- color: $white;
- border: 1px solid $dark-orange-2;
- }
-
- &:focus {
- box-shadow: 0 0 0 0.1rem $dark-orange-1;
- }
-
- &.p-button-outlined {
- background: none;
- color: $black;
- border: 2px solid $black;
-
- &:hover {
- color: $orange;
- border: 2px solid $orange;
- }
-
- &:focus {
- box-shadow: 0 0 0 0.1rem $orange;
- }
- }
- }
- }
-
- &:disabled {
- background: $black;
- color: $white;
- border: 1px solid $black;
-
- &:hover {
- background: $black;
- color: $white;
- border: 1px solid $black;
- }
-
- &.p-button-icon-only {
- &.p-button-outlined {
- &:hover {
- transform: rotate(0deg);
- }
- }
- }
-
- &:focus {
- box-shadow: unset;
- }
-
- &.p-button-primary {
- background: $black;
- color: $white;
- border: 1px solid $black;
-
- &:hover {
- background: $black;
- color: $white;
- border: 1px solid $black;
- }
-
- &:focus {
- box-shadow: unset;
- }
-
- &.p-button-outlined {
- background: none;
- color: $black;
- border: 2px solid $black;
-
- &:hover {
- color: $black;
- border: 2px solid $black;
- }
-
- &:focus {
- box-shadow: unset;
- }
- }
- }
-
- &.p-button-secondary {
- background: $tangerine;
- color: $white;
- border: 1px solid $tangerine;
-
- &:hover {
- background: $tangerine;
- color: $white;
- border: 1px solid $tangerine;
- }
-
- &:focus {
- box-shadow: unset;
- }
-
- &.p-button-outlined {
- background: none;
- color: $black;
- border: 2px solid $black;
-
- &:hover {
- color: $black;
- border: 2px solid $black;
- }
-
- &:focus {
- box-shadow: unset;
- }
- }
- }
-
- &.p-button-warning {
- background: $dark-orange-1;
- color: $white;
- border: 1px solid $dark-orange-1;
-
- &:hover {
- background: $dark-orange-1;
- color: $white;
- border: 1px solid $dark-orange-1;
- }
-
- &:focus {
- box-shadow: unset;
- }
-
- &.p-button-outlined {
- background: none;
- color: $black;
- border: 2px solid $black;
-
- &:hover {
- color: $black;
- border: 2px solid $black;
- }
-
- &:focus {
- box-shadow: unset;
- }
- }
- }
-
- &.p-button-danger {
- background: $dark-orange-1;
- color: $white;
- border: 1px solid $dark-orange-1;
-
- &:hover {
- background: $dark-orange-1;
- color: $white;
- border: 1px solid $dark-orange-1;
- }
-
- &:focus {
- box-shadow: unset;
- }
-
- &.p-button-outlined {
- background: none;
- color: $black;
- border: 2px solid $black;
-
- &:hover {
- color: $black;
- border: 2px solid $black;
- }
-
- &:focus {
- box-shadow: unset;
- }
- }
- }
- }
-
- &.p-button-icon-only {
- padding: 0.5rem;
- transform: rotate(0deg);
- transition: 0.5s;
-
- &.p-button-outlined {
- &:hover {
- transform: rotate(360deg);
- }
- }
- }
-}
-
-//form
-.p-field {
- label {
- font-weight: 600;
- }
-}
-
-.p-formgrid-inline {
- label {
- margin-right: 0.5rem;
- }
-}
-
-:host ::ng-deep .p-component {
- //disabled elements
- &:disabled {
- opacity: 0.5 !important;
- cursor: not-allowed !important;
- border-color: $light-grey;
- }
- //fieldset
- &.p-fieldset {
- border-width: 2px;
- border: 2px solid $black;
- background: $white;
- color: $black;
- margin: 0;
- //font-weight: 600;
- .p-fieldset-legend {
- border: 2px solid $black;
- background: $black;
- padding: 0.5rem 1rem;
- color: $white;
- transition: color 0.2s, border 0.2s, background 0.2s;
- }
-
- &.p-fieldset-toggleable {
- .p-fieldset-legend {
- padding: 0;
-
- &:hover {
- background: $white;
-
- a {
- color: $black;
- }
- }
-
- a {
- color: $white;
- padding: 0.5rem 1rem;
-
- &:focus {
- box-shadow: unset;
- }
- }
- }
- }
-
- .p-field {
-
- &:first-child {
- margin-left: 0px;
- }
-
- &:last-child {
- margin-right: 0px;
- }
-
- input {
- &[type="checkbox"] {
- margin: 0;
- vertical-align: middle;
-
- i {
- color: red;
- }
-
- + label {
- margin-right: 0px;
- margin-left: 0.5rem;
- vertical-align: middle;
- }
- }
-
- &[disabled] {
- border: 1px solid $light-grey;
-
- &:hover {
- border: 1px solid $light-grey;
- }
- }
- }
- }
- }
- //form-inline
- .p-formgroup-inline {
- margin-top: 1rem;
- }
- //inputtext
- .p-inputtext {
- border: 1px solid $black;
- transition: border 0.2s, box-shadow 0.2s;
- color: $black;
- padding: 0.5rem 1rem;
-
- &:hover {
- border: 1px solid $tangerine;
- }
-
- &:focus {
- box-shadow: 0 0 0 0.1rem $dark-tangerine-1;
- border-color: $dark-tangerine-1;
- }
- }
- //inputswitch
- .p-inputswitch {
- .p-inputswitch-slider {
- background: $light-grey;
- }
-
- &.p-inputswitch-checked {
- .p-inputswitch-slider {
- background: $tangerine;
- }
- }
- }
- //dropdown
- .p-dropdown {
- border: 1px solid $black;
- transition: border 0.2s, box-shadow 0.2s;
-
- &:hover {
- border: 1px solid $tangerine;
- }
-
- &.p-focus {
- box-shadow: 0 0 0 0.1rem $dark-tangerine-1;
- border-color: $dark-tangerine-1;
- }
-
- .p-dropdown-label {
- &.p-placeholder {
- color: $grey;
- }
- }
-
- .p-inputtext {
- border: 1px solid transparent;
- padding: 0.4rem 1rem;
-
- &:hover {
- border: 1px solid transparent;
- }
- }
-
- .p-dropdown-trigger {
- color: $black;
- }
-
- &.p-disabled {
- cursor: not-allowed !important;
- opacity: 0.5 !important;
- border-color: $light-grey;
- pointer-events: visible;
- }
- }
- //dropdown-panel
- .p-dropdown-panel {
- .p-dropdown-items {
- .p-dropdown-item {
- color: $black;
- transition: background 0.2s, color 0.2s;
-
- &:hover {
- background: $light-grey;
- color: $black;
- }
-
- &.p-highlight {
- color: $black;
- background: $light-tangerine-2;
- }
- }
- }
- }
- //field-checkbox
- .p-field-checkbox {
- label {
- margin-left: 0.5rem;
- margin-right: 0.5rem;
- opacity: 1;
- color: $black;
- font-weight: 600;
- }
- }
- //checkbox
- .p-checkbox {
-
- &.p-checkbox-disabled {
-
- .p-checkbox-box {
- &.p-disabled {
- cursor: not-allowed !important;
- opacity: 0.5 !important;
- border-color: $light-grey;
- pointer-events: visible;
- }
- }
- }
-
- .p-checkbox-box {
- border: 1px solid $black;
-
- &:hover {
- border: 1px solid $tangerine;
-
- &.p-highlight {
- background: $dark-tangerine-1;
- border: 1px solid $dark-tangerine-1;
-
- &.p-focus {
- box-shadow: 0 0 0 0.1rem $tangerine;
- }
- }
-
- .p-checkbox-icon {
- color: $white;
- }
- }
-
- &.p-focus {
- box-shadow: 0 0 0 0.1rem $tangerine;
- border: 1px solid $tangerine;
- }
-
- &.p-highlight {
- border: 1px solid $tangerine;
- background: $tangerine;
- }
-
- .p-checkbox-icon {
- color: $black;
- }
- }
- }
- //datepicker
- .p-calendar-w-btn {
- .p-datepicker-trigger {
- background: $tangerine;
- border: 1px solid $tangerine;
- color: $black;
- left: -1px;
-
- &:hover {
- background: $dark-tangerine-1;
- border: 1px solid $dark-tangerine-1;
- color: $white;
- }
-
- &:focus {
- box-shadow: 0 0 0 0.1rem $tangerine;
- }
- }
- }
- //multiselect
- &.p-multiselect {
- border: 1px solid $black;
- transition: border 0.2s, box-shadow 0.2s;
-
- &:hover {
- border: 1px solid $tangerine;
- }
-
- &.p-focus {
- box-shadow: 0 0 0 0.1rem $dark-tangerine-1;
- border-color: $dark-tangerine-1;
- }
-
- .p-multiselect-label {
- &.p-placeholder {
- color: $grey;
- }
- }
-
- .p-multiselect-panel {
- .p-multiselect-header {
- color: $black;
- }
-
- .p-multiselect-items-wrapper {
- .p-multiselect-items {
- padding: 0;
-
- .p-multiselect-item {
- color: $black;
-
- &:not(.p-disabled) {
- &:not(.p-highlight) {
- &:hover {
- background: $light-grey;
- color: $black;
- }
- }
- }
-
- &:focus {
- box-shadow: unset;
- }
-
- }
- }
- }
- }
- }
- //datepicker
- .p-datepicker {
- color: $black;
-
- .p-datepicker-header {
- color: $black;
- border-bottom: 2px solid $light-grey;
-
- .p-datepicker-prev, .p-datepicker-next {
- color: $black;
-
- &:focus {
- box-shadow: 0 0 0 0.1rem $light-tangerine-2;
- }
-
- &:hover {
- background: $light-grey;
- }
- }
- }
-
- .p-datepicker-calendar-container {
- table {
- td {
- &.p-datepicker-today {
- span {
- color: $black;
- background: $light-grey;
-
- &.p-highlight {
- background: $light-tangerine-2;
- color: $black;
-
- &:hover {
- color: $black;
- }
- }
-
- &:hover {
- color: $white;
- }
- }
- }
-
- span {
- transition: 0.2s;
- color: $black;
-
- &:hover {
- background: $grey;
- color: $white;
- }
- }
- }
- }
-
- .p-highlight {
- background: $light-tangerine-2;
-
- &:hover {
- background: $light-tangerine-2;
- color: $black;
- }
- }
- }
-
- .p-datepicker-buttonbar {
- border-top: 2px solid $light-grey;
-
- .p-button-set-today {
- background: $light-grey;
- color: $black;
- border: 1px solid $light-grey;
-
- &:hover {
- background: $grey;
- color: $white;
- border: 1px solid $grey;
- }
-
- &:focus {
- box-shadow: 0 0 0 0.1rem $light-grey;
- }
- }
-
- .p-button-clear-date {
- background: $light-tangerine-2;
- color: $black;
- border: 1px solid $light-tangerine-2;
-
- &:hover {
- background: $light-tangerine-1;
- color: $black;
- border: 1px solid $light-tangerine-1;
- }
-
- &:focus {
- box-shadow: 0 0 0 0.1rem $light-tangerine-2;
- }
- }
- }
- }
-}
-
-//breadcrumb
-.p-breadcrumb {
- border: 2px solid $black;
- background: $black;
- border-radius: 2px;
- padding: 5px 15px;
-
- ul {
- font-size: 0.8rem;
-
- li {
- &.p-breadcrumb-home {
-
- .p-menuitem-link {
- &:hover {
- .p-menuitem-icon {
- color: $orange;
- }
- }
-
- &:focus {
- box-shadow: unset;
- border-radius: unset;
- }
- }
- }
-
- &.p-breadcrumb-chevron {
- color: $white;
- font-size: 0.8rem;
- }
-
- .p-menuitem-link {
-
- &:hover {
- .p-menuitem-icon {
- color: $orange;
- }
-
- .p-menuitem-text {
- color: $orange;
- }
- }
-
- &:focus {
- box-shadow: unset;
- border-radius: unset;
- }
-
- .p-menuitem-icon {
- color: $white;
- transition: 0.2s;
- font-size: 0.8rem;
- margin-right: 0.5rem;
- }
-
- .p-menuitem-text {
- color: $white;
- transition: 0.2s;
- }
- }
- }
- }
-}
-
-//accordion
-.p-accordion {
- .p-accordion-tab {
- .p-accordion-header {
-
- .p-accordion-header-link {
- transition: 0.2s;
-
- &:focus {
- box-shadow: unset;
- }
-
- }
-
- &:not(.p-disabled) {
- .p-accordion-header-link {
- background: $light-grey;
- color: $black;
- }
-
- &.p-highlight {
- .p-accordion-header-link {
- background: $black;
- color: $white;
- border-color: $black;
-
- .accrordion-title {
- width: 100%;
- }
-
- .p-button-accordion-tab {
- background: none;
- color: $white;
- border: 1px solid $white;
-
- &:hover {
- background: none;
- color: $tangerine;
- border: 1px solid $tangerine;
- }
-
- &:focus {
- box-shadow: 0 0 0 0.1rem $light-tangerine-1;
- }
-
- &.p-button-outlined {
- background: none;
- color: $white;
- border: 2px solid $white;
-
- &:hover {
- color: $tangerine;
- border: 2px solid $tangerine;
- }
-
- &:focus {
- box-shadow: 0 0 0 0.1rem $light-tangerine-1;
- }
- }
- }
- }
-
- &:hover {
- .p-accordion-header-link {
- background: $light-grey;
- color: $black;
- border-color: $black;
- }
-
- .p-button-accordion-tab {
- color: $black;
- border: 1px solid $black;
-
- &.p-button-outlined {
- color: $black;
- border: 2px solid $black;
- }
- }
- }
- }
-
- &:not(.p-highlight) {
- .p-accordion-header-link {
- background: $light-grey;
- color: $black;
- border-color: $black;
- }
-
- &:hover {
- .p-accordion-header-link {
- background: $black;
- color: $white;
- border-color: $black;
- }
- }
- }
- }
- }
-
- .p-accordion-content {
- border: 1px solid $black;
- border-top: 0px;
- color: $black;
- padding: 2rem;
- }
- }
-}
-
-//toolbar
-.p-toolbar {
- color: $black;
- border: 1px solid $medium-grey;
- background: $light-grey;
-}
-
-//Dialog Mask
-:host ::ng-deep .p-dialog-mask {
- background: rgba($black, 0.5);
-}
-
-//Dialog
-.p-dialog {
- //confirm dialog
- &.p-confirm-dialog {
- .p-confirm-dialog-message {
- margin-left: 0px;
- }
- }
- //dialog-header
- .p-dialog-header {
- color: $black;
-
- .p-dialog-header-icon {
- color: $black;
-
- &:enabled {
- &:hover {
- color: $black;
- background: $light-grey;
- }
-
- &:focus {
- box-shadow: 0 0 0 0.1rem $light-tangerine-2;
- }
- }
- }
- }
- //dialog-content
- .p-dialog-content {
- color: $black;
-
- .p-dropdown {
- border: 1px solid $black;
- transition: border 0.2s, box-shadow 0.2s;
-
- &:hover {
- border: 1px solid $tangerine;
- }
-
- &.p-focus {
- box-shadow: 0 0 0 0.1rem $dark-tangerine-1;
- border-color: $dark-tangerine-1;
- }
-
- .p-dropdown-label {
- &.p-placeholder {
- color: $grey;
- }
- }
-
- .p-inputtext {
- border: 1px solid transparent;
- padding: 0.4rem 1rem;
-
- &:hover {
- border: 1px solid transparent;
- }
- }
-
- .p-dropdown-trigger {
- color: $black;
- }
- }
-
- .p-inputtext {
- border: 1px solid $black;
- transition: border 0.2s, box-shadow 0.2s;
- color: $black;
- padding: 0.5rem 1rem;
-
- &:hover {
- border: 1px solid $tangerine;
- }
-
- &:focus {
- box-shadow: 0 0 0 0.1rem $dark-tangerine-1;
- border-color: $dark-tangerine-1;
- }
- }
- }
-
- .p-dialog-footer {
- text-align: center;
- }
-}
-
-//datatable
-.p-datatable {
-
- .p-paginator {
- padding: 1rem 1rem;
- color: $black;
- border: none !important;
-
- .p-paginator-element {
- &:not(.p-disabled) {
-
- &:not(.p-highlight) {
-
- &:hover {
- background: $light-grey;
- }
-
- &:focus {
- box-shadow: 0 0 0 0.1rem $light-grey;
- }
- }
-
- &.p-highlight {
- background: $light-tangerine-2;
- border-color: $light-tangerine-2;
-
- &:focus {
- box-shadow: 0 0 0 0.1rem $light-tangerine-2;
- }
- }
- }
- }
- }
-
- &.p-datatable-hoverable-rows {
- .p-datatable-tbody {
- tr:not(.p-highlight) {
- &:hover {
- background: $light-grey;
- color: $black;
- }
- }
- }
- }
-
- .p-datatable-thead {
-
- tr {
-
- th {
- text-align: center;
- border-width: 1px !important;
- border-style: solid;
- border-left-color: $light-grey;
- border-top-color: $light-grey;
- border-bottom-color: $light-grey;
- border-right-color: $light-grey;
- font-weight: 600;
- color: $white;
- background: $dark-orange-1;
-
- &:first-child {
- border-left-color: $light-grey;
- }
-
- &:last-child {
- border-right-color: $light-grey;
- }
- }
- }
- }
-
- .p-datatable-tbody {
- tr {
- color: $black;
- transition: 0.2s;
-
- &:hover {
- &:nth-child(even) {
- td {
- background: $light-grey;
- }
- }
- }
-
- &:nth-child(even) {
- td {
- background: #f8f8f8;
- }
- }
-
- td {
- border: 1px solid $light-grey;
- text-align: center;
- transition: 0.2s;
- padding: 0.5rem 0.5rem;
- }
- }
- }
-}
diff --git a/_media.scss b/_media.scss
deleted file mode 100644
index 208882c..0000000
--- a/_media.scss
+++ /dev/null
@@ -1,32 +0,0 @@
-/* You can add media styles */
-
-@media (max-width: 991px) {
-
- //header
- .header {
- padding: 10px;
- }
-
- //main-content
- .main-content {
- padding: 10px;
- }
-
-}
-
-@media (max-width: 961px) {
-
- .hidden-left-panel {
- display: none !important;
- }
-
-}
-
-@media (min-width: 961px) {
-
- .hidden-horizontal-menu {
- display: none !important;
- }
-
-}
-
diff --git a/_pallete.scss b/_pallete.scss
deleted file mode 100644
index 9e55a37..0000000
--- a/_pallete.scss
+++ /dev/null
@@ -1,65 +0,0 @@
-/* You can add reusable colors */
-
-// Primary
-$dark-orange-1: #933401;
-$dark-orange-2: #571F01;
-$orange: #D04A02;
-$light-orange-1: #FD6412;
-$light-orange-2: #FEB791;
-
-$dark-tangerine-1: #AE6800;
-$dark-tangerine-2: #714300;
-$tangerine: #EB8C00;
-$light-tangerine-1: #FFA929;
-$light-tangerine-2: #FFDCA9;
-
-$dark-yellow-1: #C28A00;
-$dark-yellow-2: #855F00;
-$yellow: #FFB600;
-$light-yellow-1: #FFC83D;
-$light-yellow-2: #FFECBD;
-
-$dark-rose-1: #A43E50;
-$dark-rose-2: #6E2A35;
-$rose: #DB536A;
-$light-rose-1: #E27588;
-$light-rose-2: #F1BAC3;
-
-$dark-red-1: #AA2417;
-$dark-red-2: #741910;
-$red: #E0301E;
-$light-red-1: #E86153;
-$Light-red-2: #F7C8C4;
-
-$white: white;
-$black: black;
-$dark-grey: #2D2D2D;
-$medium-grey: #464646;
-$grey: #7D7D7D;
-$light-grey: #DEDEDE;
-
-// Secondary
-$dark-purple-1: #6A1CE2;
-$dark-purple-2: #4B06B2;
-$purple: #9013FE;
-$light-purple-1: #B15AFE;
-$light-purple-2: #DEB8FF;
-
-$dark-blue-1: #0060D7;
-$dark-blue-2: #003DAB;
-$blue: #0089EB;
-$light-blue-1: #4DACF1;
-$light-blue-2: #B3DCF9;
-
-$dark-green-1: #2C8646;
-$dark-green-2: #175C2C;
-$green: #4EB523;
-$light-green-1: #86DB4F;
-$light-green-2: #C4FC9F;
-$rose-for-white-type: #D93954;
-
-// Status Colors
-$status-red: #E0301E;
-$status-yellow: #FFB600;
-$status-green: #175C2C;
-
diff --git a/app/app-routing.module.ts b/app/app-routing.module.ts
deleted file mode 100644
index 1496bff..0000000
--- a/app/app-routing.module.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { NgModule } from '@angular/core';
-import { Routes, RouterModule } from '@angular/router';
-
-const routes: Routes = [];
-
-@NgModule({
- imports: [RouterModule.forRoot(routes)],
- exports: [RouterModule]
-})
-export class AppRoutingModule { }
diff --git a/app/app.component.html b/app/app.component.html
deleted file mode 100644
index f5052ee..0000000
--- a/app/app.component.html
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
diff --git a/app/app.component.scss b/app/app.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/app.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/app.component.spec.ts b/app/app.component.spec.ts
deleted file mode 100644
index b2929bb..0000000
--- a/app/app.component.spec.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-import { TestBed } from '@angular/core/testing';
-import { RouterTestingModule } from '@angular/router/testing';
-import { AppComponent } from './app.component';
-
-describe('AppComponent', () => {
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- imports: [
- RouterTestingModule
- ],
- declarations: [
- AppComponent
- ],
- }).compileComponents();
- });
-
- it('should create the app', () => {
- const fixture = TestBed.createComponent(AppComponent);
- const app = fixture.componentInstance;
- expect(app).toBeTruthy();
- });
-
- it(`should have as title 'RTA-Admin-UI'`, () => {
- const fixture = TestBed.createComponent(AppComponent);
- const app = fixture.componentInstance;
- expect(app.title).toEqual('RTA-Admin-UI');
- });
-
- it('should render title', () => {
- const fixture = TestBed.createComponent(AppComponent);
- fixture.detectChanges();
- const compiled = fixture.nativeElement;
- expect(compiled.querySelector('.content span').textContent).toContain('RTA-Admin-UI app is running!');
- });
-});
diff --git a/app/app.component.ts b/app/app.component.ts
deleted file mode 100644
index 3f8e304..0000000
--- a/app/app.component.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { AuthService } from './shared/services/auth.service';
-import { Component, OnInit } from '@angular/core';
-import { PrimeNGConfig } from 'primeng/api';
-
-@Component({
- selector: 'app-root',
- templateUrl: './app.component.html',
- styleUrls: ['./app.component.scss']
-})
-export class AppComponent implements OnInit {
-
- constructor(private primengConfig: PrimeNGConfig, private authService: AuthService) { }
-
-
- ngOnInit(): void {
- this.primengConfig.ripple = true;
- this.authService.initializeOAuth2Login();
- }
-}
diff --git a/app/app.module.ts b/app/app.module.ts
deleted file mode 100644
index 59f73a4..0000000
--- a/app/app.module.ts
+++ /dev/null
@@ -1,61 +0,0 @@
-import { ToastModule } from 'primeng/toast';
-import { OAuthModule, OAuthStorage } from 'angular-oauth2-oidc';
-import { environment } from './../environments/environment';
-import { HttpClientModule, HttpClient } from '@angular/common/http';
-import { BrowserModule } from '@angular/platform-browser';
-import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
-import { NgModule } from '@angular/core';
-
-import { AppRoutingModule } from './app-routing.module';
-import { AppComponent } from './app.component';
-import { CoreModule } from './core/core.module';
-import { FeaturesModule } from './features/features.module';
-import { SharedModule } from './shared/shared.module';
-import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
-import { TranslateHttpLoader } from '@ngx-translate/http-loader';
-import { ConfirmationService, MessageService } from 'primeng/api';
-import { SearchListStateService } from './shared/back-button/search-list-state.service';
-
-export function HttpLoaderFactory(http: HttpClient): TranslateHttpLoader {
- return new TranslateHttpLoader(http);
-}
-
-// Settings localStorage as OAuth2 storage.
-// We need a factory, since localStorage is not available during AOT build time.
-export function storageFactory(): OAuthStorage {
- return localStorage;
-}
-
-
-@NgModule({
- declarations: [
- AppComponent
- ],
- imports: [
- BrowserModule,
- BrowserAnimationsModule,
- AppRoutingModule,
- CoreModule,
- FeaturesModule,
- SharedModule,
- HttpClientModule,
- ToastModule,
- OAuthModule.forRoot({
- resourceServer: {
- allowedUrls: [environment.baseApiUrl],
- sendAccessToken: true
- }
- }),
- TranslateModule.forRoot({
- loader: {
- provide: TranslateLoader,
- useFactory: HttpLoaderFactory,
- deps: [HttpClient]
- },
- defaultLanguage: environment.defaultLanguage,
- }),
- ],
- providers: [ConfirmationService, { provide: OAuthStorage, useFactory: storageFactory }, MessageService, SearchListStateService],
- bootstrap: [AppComponent]
-})
-export class AppModule { }
diff --git a/app/core/core.module.ts b/app/core/core.module.ts
deleted file mode 100644
index ee8c617..0000000
--- a/app/core/core.module.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { NgModule } from '@angular/core';
-import { CommonModule } from '@angular/common';
-import { FormsModule } from '@angular/forms';
-import { SharedModule } from 'primeng/api';
-import { PrimengSharedModule } from './../shared/primeng-shared/primeng-shared.module';
-import { ErrorHandlingModule } from './error-handling/error-handling.module';
-
-import { HeaderComponent } from './header/header.component';
-import { MainPageComponent } from './main-page/main-page.component';
-
-@NgModule({
- declarations: [HeaderComponent, MainPageComponent],
- imports: [
- CommonModule,
- FormsModule,
- PrimengSharedModule,
- SharedModule,
- ErrorHandlingModule
- ],
- exports: [
- HeaderComponent,
- MainPageComponent
- ]
-})
-export class CoreModule { }
diff --git a/app/core/error-handling/error-handling.module.ts b/app/core/error-handling/error-handling.module.ts
deleted file mode 100644
index c5482ca..0000000
--- a/app/core/error-handling/error-handling.module.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { HttpErrorInterceptor } from './http-error.interceptor';
-import { GlobalErrorHandler } from './global-error-handler';
-import { NgModule, ErrorHandler } from '@angular/core';
-import { CommonModule } from '@angular/common';
-import { HTTP_INTERCEPTORS } from '@angular/common/http';
-
-@NgModule({
- declarations: [],
- imports: [CommonModule],
- providers: [
- { provide: ErrorHandler, useClass: GlobalErrorHandler },
- { provide: HTTP_INTERCEPTORS, useClass: HttpErrorInterceptor, multi: true }
- ]
-})
-export class ErrorHandlingModule { }
diff --git a/app/core/error-handling/global-error-handler.ts b/app/core/error-handling/global-error-handler.ts
deleted file mode 100644
index befbfab..0000000
--- a/app/core/error-handling/global-error-handler.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import { environment } from 'src/environments/environment';
-import { HttpErrorResponse } from '@angular/common/http';
-import { ErrorHandlingService } from './../../shared/services/error-handling/error-handling.service';
-import { ErrorHandler, Injectable, NgZone } from '@angular/core';
-
-@Injectable()
-export class GlobalErrorHandler implements ErrorHandler {
- constructor(private errorHandlingService: ErrorHandlingService, private zone: NgZone) {}
-
- handleError(error: Error): void {
-
- this.zone.run(() => {
- if (!(error instanceof HttpErrorResponse) && environment.enableGlobalErrorToast){
- this.errorHandlingService.showErrorMessage(error.message);
- }
- });
-
-
- console.error('Error from global error handler', error);
- }
-}
diff --git a/app/core/error-handling/http-error.interceptor.ts b/app/core/error-handling/http-error.interceptor.ts
deleted file mode 100644
index 5ec5c90..0000000
--- a/app/core/error-handling/http-error.interceptor.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-import { ErrorHandlingService } from './../../shared/services/error-handling/error-handling.service';
-import {
- HttpHandler,
- HttpRequest,
- HttpEvent,
- HttpErrorResponse,
- HttpInterceptor
-} from '@angular/common/http';
-import { Observable, throwError } from 'rxjs';
-import { catchError } from 'rxjs/operators';
-import { Injectable, Injector } from '@angular/core';
-
-@Injectable()
-export class HttpErrorInterceptor implements HttpInterceptor {
- constructor(
- private injector: Injector,
- ) {}
-
- intercept(
- request: HttpRequest,
- next: HttpHandler
- ): Observable> {
- return next.handle(request).pipe(
- catchError((error: HttpErrorResponse) => {
- // We don't inject an HttpClient dependent service directly to an http interceptor's constructor,
- // or we'll get cyclic dependency errors
- const errorHandlingService = this.injector.get(ErrorHandlingService);
-
- errorHandlingService.showHttpResponseError(error);
- return throwError(error);
- })
- ) as Observable>;
- }
-}
diff --git a/app/core/header/header.component.html b/app/core/header/header.component.html
deleted file mode 100644
index 771e3dc..0000000
--- a/app/core/header/header.component.html
+++ /dev/null
@@ -1,14 +0,0 @@
-
diff --git a/app/core/header/header.component.scss b/app/core/header/header.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/core/header/header.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/core/header/header.component.spec.ts b/app/core/header/header.component.spec.ts
deleted file mode 100644
index f872216..0000000
--- a/app/core/header/header.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { HeaderComponent } from './header.component';
-
-describe('HeaderComponent', () => {
- let component: HeaderComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ HeaderComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(HeaderComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/core/header/header.component.ts b/app/core/header/header.component.ts
deleted file mode 100644
index ab91c5b..0000000
--- a/app/core/header/header.component.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import { Language } from './../../shared/models/language.interface';
-import { environment } from './../../../environments/environment';
-import { AuthService } from './../../shared/services/auth.service';
-import { Component, OnInit } from '@angular/core';
-import { MenuItem } from 'primeng/api';
-import { TranslateService } from '@ngx-translate/core';
-import {Router} from "@angular/router";
-
-@Component({
- selector: 'app-header',
- templateUrl: './header.component.html',
- styleUrls: ['./header.component.scss']
-})
-export class HeaderComponent implements OnInit {
-
- languages: Language[] = environment.languages;
- selectedLang = environment.defaultLanguage;
-
- constructor(private auth: AuthService, private translateService: TranslateService, private router: Router) {
- }
-
- ngOnInit(): void {
- }
-
- changeLanguage($event): void {
- this.translateService.use($event);
- }
-}
diff --git a/app/core/main-page/main-page.component.html b/app/core/main-page/main-page.component.html
deleted file mode 100644
index 6c46b1d..0000000
--- a/app/core/main-page/main-page.component.html
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/app/core/main-page/main-page.component.scss b/app/core/main-page/main-page.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/core/main-page/main-page.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/core/main-page/main-page.component.spec.ts b/app/core/main-page/main-page.component.spec.ts
deleted file mode 100644
index a529e24..0000000
--- a/app/core/main-page/main-page.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { MainPageComponent } from './main-page.component';
-
-describe('MainPageComponent', () => {
- let component: MainPageComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ MainPageComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(MainPageComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/core/main-page/main-page.component.ts b/app/core/main-page/main-page.component.ts
deleted file mode 100644
index cc7bddf..0000000
--- a/app/core/main-page/main-page.component.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import { Router } from '@angular/router';
-import { AuthService } from 'src/app/shared/services/auth.service';
-import { Component, OnInit } from '@angular/core';
-
-@Component({
- selector: 'app-main-page',
- templateUrl: './main-page.component.html',
- styleUrls: ['./main-page.component.scss']
-})
-export class MainPageComponent implements OnInit {
-
- constructor(private auth: AuthService, private router: Router) { }
-
- ngOnInit(): void {
- this.auth.authStatusChanged.subscribe((isAuthenticated) => {
- if (!isAuthenticated) {
- this.router.navigateByUrl('login');
- }
- });
- }
-
-}
diff --git a/app/features/administration/administration.component.html b/app/features/administration/administration.component.html
deleted file mode 100644
index 65b6867..0000000
--- a/app/features/administration/administration.component.html
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
-
{{'ADMINISTRATION' | translate}}
-
-
-
-
- {{section.title}}
-
-
-
-
-
diff --git a/app/features/administration/administration.component.scss b/app/features/administration/administration.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/administration/administration.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/administration/administration.component.spec.ts b/app/features/administration/administration.component.spec.ts
deleted file mode 100644
index 492f119..0000000
--- a/app/features/administration/administration.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { AdministrationComponent } from './administration.component';
-
-describe('WelcomeComponent', () => {
- let component: AdministrationComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [AdministrationComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(AdministrationComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/administration/administration.component.ts b/app/features/administration/administration.component.ts
deleted file mode 100644
index bf92252..0000000
--- a/app/features/administration/administration.component.ts
+++ /dev/null
@@ -1,103 +0,0 @@
-import { AuthService } from './../../shared/services/auth.service';
-import { Component, OnInit } from '@angular/core';
-import { CardItem } from './../../shared/models/card-item.interface';
-import { AdministrationSection } from './../../shared/models/administration-section.interface';
-
-@Component({
- selector: 'app-administration',
- templateUrl: './administration.component.html',
- styleUrls: ['./administration.component.scss']
-})
-export class AdministrationComponent implements OnInit {
-
- data: CardItem;
- adminSections: AdministrationSection[];
-
- constructor(public authService: AuthService) { }
-
- ngOnInit(): void {
- this.initializeData();
- }
-
- initializeData() {
- this.adminSections = [
- {
- title: 'Monitoring',
- subSections: [
- {
- title: 'Downloads Monitoring',
- subtitle: 'View File\'s Downloading Process and Manage...',
- headerImage: 'pi-image',
- footerImage: 'pi-desktop',
- path: '/pages/administration/downloads-monitoring'
- }
- ]
- },
- {
- title: 'Configurations',
- subSections: [
- {
- title: 'Categories Managenent',
- subtitle: 'View File\'s Downloading Process and Manage...',
- headerImage: 'pi-image',
- footerImage: 'pi-cog',
- path: '/pages/administration/categories-management'
- },
- {
- title: 'Templates Managenent',
- subtitle: 'View File\'s Downloading Process and Manage...',
- headerImage: 'pi-image',
- footerImage: 'pi-cog',
- path: '/pages/administration/templates-management'
- },
- {
- title: 'Verification Managenent',
- subtitle: 'View File\'s Downloading Process and Manage...',
- headerImage: 'pi-image',
- footerImage: 'pi-cog',
- path: '/pages/administration/verification-management'
- },
- {
- title: 'Configurator',
- subtitle: 'View File\'s Downloading Process and Manage...',
- headerImage: 'pi-image',
- footerImage: 'pi-cog',
- path: '/pages/administration/configurator'
- }
- ]
- },
- {
- title: 'Access',
- subSections: [
- {
- title: 'Users Managenent',
- subtitle: 'View File\'s Downloading Process and Manage...',
- headerImage: 'pi-image',
- footerImage: 'pi-key',
- path: '/pages/administration/users-management'
- },
- {
- title: 'Roles Managenent',
- subtitle: 'View File\'s Downloading Process and Manage...',
- headerImage: 'pi-image',
- footerImage: 'pi-key',
- path: '/pages/administration/roles-management'
- }
- ]
- },
- {
- title: 'Exception Handling',
- subSections: [
- {
- title: 'Application Level Exceptions',
- subtitle: 'View Application Level exceptions thrown by the Platform',
- headerImage: 'pi-image',
- footerImage: 'pi-exclamation-triangle',
- path: '/pages/administration/application-level-exceptions'
- }
- ]
- }
- ];
- }
-
-}
diff --git a/app/features/administration/application-level-exceptions/application-level-dialog/application-level-dialog.component.html b/app/features/administration/application-level-exceptions/application-level-dialog/application-level-dialog.component.html
deleted file mode 100644
index 0bf8424..0000000
--- a/app/features/administration/application-level-exceptions/application-level-dialog/application-level-dialog.component.html
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
- {{this.trace}}
-
-
-
-
-
-
-
diff --git a/app/features/administration/application-level-exceptions/application-level-dialog/application-level-dialog.component.scss b/app/features/administration/application-level-exceptions/application-level-dialog/application-level-dialog.component.scss
deleted file mode 100644
index 0da3d37..0000000
--- a/app/features/administration/application-level-exceptions/application-level-dialog/application-level-dialog.component.scss
+++ /dev/null
@@ -1,13 +0,0 @@
-@import 'src/styles';
-
-pre {
- width: 900px !important;
-}
-
-@media (max-width: 991px) {
-
- pre {
- width: 420px !important;
- }
-
-}
diff --git a/app/features/administration/application-level-exceptions/application-level-dialog/application-level-dialog.component.spec.ts b/app/features/administration/application-level-exceptions/application-level-dialog/application-level-dialog.component.spec.ts
deleted file mode 100644
index e691e01..0000000
--- a/app/features/administration/application-level-exceptions/application-level-dialog/application-level-dialog.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { ApplicationLevelDialogComponent } from './application-level-dialog.component';
-
-describe('ApplicationLevelDialogComponent', () => {
- let component: ApplicationLevelDialogComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ ApplicationLevelDialogComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(ApplicationLevelDialogComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/administration/application-level-exceptions/application-level-dialog/application-level-dialog.component.ts b/app/features/administration/application-level-exceptions/application-level-dialog/application-level-dialog.component.ts
deleted file mode 100644
index d35eb54..0000000
--- a/app/features/administration/application-level-exceptions/application-level-dialog/application-level-dialog.component.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
-import { ApplicationLevelExceptionService } from 'src/app/shared/services/administration/application-level-exception.service';
-
-@Component({
- selector: 'app-application-level-dialog',
- templateUrl: './application-level-dialog.component.html',
- styleUrls: ['./application-level-dialog.component.scss']
-})
-export class ApplicationLevelDialogComponent implements OnInit {
- @Input() displayDialog: boolean;
- @Input() header: string;
- @Input() trace: string;
- @Output() cancelled = new EventEmitter();
-
- constructor() { }
-
- ngOnInit(): void {
- }
-
- cancel() {
- this.cancelled.emit(true);
- }
-
-}
diff --git a/app/features/administration/application-level-exceptions/application-level-exceptions.component.html b/app/features/administration/application-level-exceptions/application-level-exceptions.component.html
deleted file mode 100644
index 4a792d8..0000000
--- a/app/features/administration/application-level-exceptions/application-level-exceptions.component.html
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
{{'APPLICATION-LEVEL-EXCEPTIONS' | translate}}
-
-
-
-
-
-
-
-
-
diff --git a/app/features/administration/application-level-exceptions/application-level-exceptions.component.scss b/app/features/administration/application-level-exceptions/application-level-exceptions.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/administration/application-level-exceptions/application-level-exceptions.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/administration/application-level-exceptions/application-level-exceptions.component.spec.ts b/app/features/administration/application-level-exceptions/application-level-exceptions.component.spec.ts
deleted file mode 100644
index f81b6da..0000000
--- a/app/features/administration/application-level-exceptions/application-level-exceptions.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { ApplicationLevelExceptionsComponent } from './application-level-exceptions.component';
-
-describe('ApplicationLevelExceptionsComponent', () => {
- let component: ApplicationLevelExceptionsComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ ApplicationLevelExceptionsComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(ApplicationLevelExceptionsComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/administration/application-level-exceptions/application-level-exceptions.component.ts b/app/features/administration/application-level-exceptions/application-level-exceptions.component.ts
deleted file mode 100644
index 288afcc..0000000
--- a/app/features/administration/application-level-exceptions/application-level-exceptions.component.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-import { Page } from 'src/app/shared/models/paging/page.interface';
-import { SystemException } from 'src/app/shared/models/system-exception.interface';
-
-@Component({
- selector: 'app-application-level-exceptions',
- templateUrl: './application-level-exceptions.component.html',
- styleUrls: ['./application-level-exceptions.component.scss']
-})
-export class ApplicationLevelExceptionsComponent implements OnInit {
-
- searchResults: Page = null;
- paginationEventRequest: { page: number, offset: number } ;
- loading: boolean;
-
- constructor() { }
-
- ngOnInit(): void {
- }
-
- searchMade(results) {
- this.searchResults = results;
- }
-
- passloading(loading) {
- this.loading = loading;
- }
-
- paginationEvent(paginationEvent) {
- this.paginationEventRequest = paginationEvent;
- }
-
-}
diff --git a/app/features/administration/application-level-exceptions/application-level-search-form/application-level-search-form.component.html b/app/features/administration/application-level-exceptions/application-level-search-form/application-level-search-form.component.html
deleted file mode 100644
index 17f5531..0000000
--- a/app/features/administration/application-level-exceptions/application-level-search-form/application-level-search-form.component.html
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
diff --git a/app/features/administration/application-level-exceptions/application-level-search-form/application-level-search-form.component.scss b/app/features/administration/application-level-exceptions/application-level-search-form/application-level-search-form.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/administration/application-level-exceptions/application-level-search-form/application-level-search-form.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/administration/application-level-exceptions/application-level-search-form/application-level-search-form.component.spec.ts b/app/features/administration/application-level-exceptions/application-level-search-form/application-level-search-form.component.spec.ts
deleted file mode 100644
index e8e2dbb..0000000
--- a/app/features/administration/application-level-exceptions/application-level-search-form/application-level-search-form.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { ApplicationLevelSearchFormComponent } from './application-level-search-form.component';
-
-describe('ApplicationLevelSearchFormComponent', () => {
- let component: ApplicationLevelSearchFormComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ ApplicationLevelSearchFormComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(ApplicationLevelSearchFormComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/administration/application-level-exceptions/application-level-search-form/application-level-search-form.component.ts b/app/features/administration/application-level-exceptions/application-level-search-form/application-level-search-form.component.ts
deleted file mode 100644
index 8a83912..0000000
--- a/app/features/administration/application-level-exceptions/application-level-search-form/application-level-search-form.component.ts
+++ /dev/null
@@ -1,59 +0,0 @@
-import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
-import { USER_RIGHTS } from 'src/app/shared/enums/USER_RIGHTS.enum';
-import { Page } from 'src/app/shared/models/paging/page.interface';
-import { SystemException } from 'src/app/shared/models/system-exception.interface';
-import { AuthService } from 'src/app/shared/services/auth.service';
-import { ApplicationLevelExceptionService } from 'src/app/shared/services/administration/application-level-exception.service';
-import { ErrorHandlingService } from 'src/app/shared/services/error-handling/error-handling.service';
-import { environment } from 'src/environments/environment';
-import { ApplicationLevelFormComponent } from '../../forms/application-level-form/application-level-form.component';
-
-@Component({
- selector: 'app-application-level-search-form',
- templateUrl: './application-level-search-form.component.html',
- styleUrls: ['./application-level-search-form.component.scss']
-})
-export class ApplicationLevelSearchFormComponent implements OnInit {
-
- @Input() set paginationEventRequest(value: { page: number, offset: number }) {
-
- // This setter may be called on page setup without arguments.
- if (!value) {
- return;
- }
- // this._value = Object.assign(value);
- this.search(value.page, value.offset);
- }
-
- @Output() searchResults = new EventEmitter>();
- @Output() loading = new EventEmitter();
- @ViewChild(ApplicationLevelFormComponent)
- private searchCriteriaForm: ApplicationLevelFormComponent;
- _value : {page: number , offset: number};
-
- constructor(private applicationLevelService: ApplicationLevelExceptionService,private errorHandlingService: ErrorHandlingService, private auth: AuthService) { }
-
- ngOnInit(): void {
- }
-
- search(pageNumber = 0, pageSize = 10) {
- this.loading.emit(true);
- this.applicationLevelService.searchByCriteriaPaged(pageNumber, pageSize, this.searchCriteriaForm?.formValue(), 'search').subscribe((results: Page) => {
- this.searchResults.emit(results);
- this.loading.emit(false);
- },
- err => {
- this.errorHandlingService.showHttpResponseError(err)
- this.loading.emit(false);
- });
- }
-
- canPreviewLevelExceptions(): boolean {
- return this.auth.userHasRightForClient(USER_RIGHTS.K01, environment.globalRightsClientID);
- }
-
- clear() {
- this.searchCriteriaForm.resetForm();
- }
-
-}
diff --git a/app/features/administration/application-level-exceptions/application-level-table/application-level-table.component.html b/app/features/administration/application-level-exceptions/application-level-table/application-level-table.component.html
deleted file mode 100644
index 2570687..0000000
--- a/app/features/administration/application-level-exceptions/application-level-table/application-level-table.component.html
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
-
-
- Date-Time
- Process Id
- Job Name
- File Code
- iPower Client Code
- Message
- Cause
- Trace
-
-
-
-
- {{systemException.creationDatetime|date: "dd/MM/yyyy HH:mm"}}
- {{systemException.processId}}
- {{systemException.jobName}}
- {{systemException.dmsFileCode}}
- {{systemException.clientId}}
- {{systemException.message}}
- {{systemException.cause}}
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/features/administration/application-level-exceptions/application-level-table/application-level-table.component.scss b/app/features/administration/application-level-exceptions/application-level-table/application-level-table.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/administration/application-level-exceptions/application-level-table/application-level-table.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/administration/application-level-exceptions/application-level-table/application-level-table.component.spec.ts b/app/features/administration/application-level-exceptions/application-level-table/application-level-table.component.spec.ts
deleted file mode 100644
index 8f8c650..0000000
--- a/app/features/administration/application-level-exceptions/application-level-table/application-level-table.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { ApplicationLevelTableComponent } from './application-level-table.component';
-
-describe('ApplicationLevelTableComponent', () => {
- let component: ApplicationLevelTableComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ ApplicationLevelTableComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(ApplicationLevelTableComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/administration/application-level-exceptions/application-level-table/application-level-table.component.ts b/app/features/administration/application-level-exceptions/application-level-table/application-level-table.component.ts
deleted file mode 100644
index fef9646..0000000
--- a/app/features/administration/application-level-exceptions/application-level-table/application-level-table.component.ts
+++ /dev/null
@@ -1,64 +0,0 @@
-import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
-import { TranslateService } from '@ngx-translate/core';
-import { LazyLoadEvent } from 'primeng/api';
-import { Page } from 'src/app/shared/models/paging/page.interface';
-import { SystemException } from 'src/app/shared/models/system-exception.interface';
-import { ApplicationLevelExceptionService } from 'src/app/shared/services/administration/application-level-exception.service';
-import { ErrorHandlingService } from 'src/app/shared/services/error-handling/error-handling.service';
-
-@Component({
- selector: 'app-application-level-table',
- templateUrl: './application-level-table.component.html',
- styleUrls: ['./application-level-table.component.scss']
-})
-export class ApplicationLevelTableComponent implements OnInit {
-
- @Output() paginationEvent = new EventEmitter<{ page: number, offset: number }>(); // TODO: Use interface.
- @Input() loading: boolean;
- @Input() set searchResultsPage(results: Page) {
-
- // This setter may be called on page setup without arguments.
- if (!results) {
- return;
- }
-
- this._searchResultsPage = results;
- this.totalRecords = results.totalElements;
- // this.loading = false;
- }
- _searchResultsPage: Page;
- totalRecords: number;
- rows: number = 10;
- header: string;
- trace: string;
- displayTraceDialog: boolean;
-
- constructor(private errorHandlingService: ErrorHandlingService, private applicationLevelService: ApplicationLevelExceptionService) { }
-
- ngOnInit(): void {
- }
-
- onLazyLoad(event: LazyLoadEvent) {
- let pageToRequest = Math.floor(event.first / event.rows);
- let pageSize = event.rows;
- this.paginationEvent.emit({ page: pageToRequest, offset: pageSize });
- }
-
- edit(id: number) {
- this.header = "Trace";
- if(id){
- this.applicationLevelService.getById(id).subscribe(result => {
- this.trace = result.trace;
- this.displayTraceDialog = true;
- },
- err => {
- this.errorHandlingService.showHttpResponseError(err)
- });
- }
- }
-
- cancelEditLevelException() {
- this.displayTraceDialog = false;
- this.trace = null;
- }
-}
diff --git a/app/features/administration/categories-management/categories-management.component.html b/app/features/administration/categories-management/categories-management.component.html
deleted file mode 100644
index fbff52c..0000000
--- a/app/features/administration/categories-management/categories-management.component.html
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
-
-
{{'CATEGORIES-MANAGEMENT' | translate}}
-
-
-
-
-
-
-
-
-
diff --git a/app/features/administration/categories-management/categories-management.component.scss b/app/features/administration/categories-management/categories-management.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/administration/categories-management/categories-management.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/administration/categories-management/categories-management.component.spec.ts b/app/features/administration/categories-management/categories-management.component.spec.ts
deleted file mode 100644
index 9d71e6f..0000000
--- a/app/features/administration/categories-management/categories-management.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { CategoriesManagementComponent } from './categories-management.component';
-
-describe('CategoriesManagementComponent', () => {
- let component: CategoriesManagementComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ CategoriesManagementComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(CategoriesManagementComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/administration/categories-management/categories-management.component.ts b/app/features/administration/categories-management/categories-management.component.ts
deleted file mode 100644
index 9191526..0000000
--- a/app/features/administration/categories-management/categories-management.component.ts
+++ /dev/null
@@ -1,59 +0,0 @@
-import { environment } from './../../../../environments/environment.prod';
-import { USER_RIGHTS } from 'src/app/shared/enums/USER_RIGHTS.enum';
-import { AuthService } from './../../../shared/services/auth.service';
-import { Category } from 'src/app/shared/models/category.interface';
-import { Component, OnInit } from '@angular/core';
-import { Page } from '../../../shared/models/paging/page.interface';
-import { TranslateService } from '@ngx-translate/core';
-
-@Component({
- selector: 'app-categories-management',
- templateUrl: './categories-management.component.html',
- styleUrls: ['./categories-management.component.scss']
-})
-export class CategoriesManagementComponent implements OnInit {
-
- displayCategoryCreationDialog: boolean = false;
- searchResults: Page = null;
- paginationEventRequest: { page: number, offset: number } = { page: 10, offset: 0 };
- header: string;
- passChange: boolean;
- valueOfTableChanged: any;
- loading: boolean;
-
- constructor(private authService: AuthService, private translate: TranslateService) { }
-
- ngOnInit(): void {
- }
-
- searchMade(results) {
- this.searchResults = results;
- }
-
- passLoadingForTable(loading) {
- this.loading = loading;
- }
-
- paginationEvent(paginationEvent) {
- this.paginationEventRequest = paginationEvent;
- }
-
- canAddNewCategory(): boolean {
- return this.authService.userHasRightForClient(USER_RIGHTS.H02, environment.globalRightsClientID);
- }
-
- addCategory(): void {
- this.header = this.translate.instant('ADD-NEW-CATEGORY');
- this.displayCategoryCreationDialog = true;
- }
-
- passEvent(passEvent: any) {
- if (passEvent) {
- this.valueOfTableChanged = passEvent;
- }
- }
-
- passloading(loading) {
- this.loading = loading;
- }
-}
diff --git a/app/features/administration/categories-management/categories-search-results/categories-search-results.component.html b/app/features/administration/categories-management/categories-search-results/categories-search-results.component.html
deleted file mode 100644
index 2bd19ce..0000000
--- a/app/features/administration/categories-management/categories-search-results/categories-search-results.component.html
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
-
-
-
-
- Document Classification
- Category Name
- Category Code
-
- Actions
-
-
-
-
- {{category.documentClassification.classificationName}}
- {{category.categoryName}}
- {{category.categoryCode}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/features/administration/categories-management/categories-search-results/categories-search-results.component.scss b/app/features/administration/categories-management/categories-search-results/categories-search-results.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/administration/categories-management/categories-search-results/categories-search-results.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/administration/categories-management/categories-search-results/categories-search-results.component.spec.ts b/app/features/administration/categories-management/categories-search-results/categories-search-results.component.spec.ts
deleted file mode 100644
index 95e5839..0000000
--- a/app/features/administration/categories-management/categories-search-results/categories-search-results.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { CategoriesSearchResultsComponent } from './categories-search-results.component';
-
-describe('CategoriesSearchResultsComponent', () => {
- let component: CategoriesSearchResultsComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ CategoriesSearchResultsComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(CategoriesSearchResultsComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/administration/categories-management/categories-search-results/categories-search-results.component.ts b/app/features/administration/categories-management/categories-search-results/categories-search-results.component.ts
deleted file mode 100644
index 8b89f6a..0000000
--- a/app/features/administration/categories-management/categories-search-results/categories-search-results.component.ts
+++ /dev/null
@@ -1,103 +0,0 @@
-import { AuthService } from './../../../../shared/services/auth.service';
-import { environment } from './../../../../../environments/environment.prod';
-import { ErrorHandlingService } from './../../../../shared/services/error-handling/error-handling.service';
-import { CategoriesService } from 'src/app/shared/services/administration/categories.service';
-import { Category } from './../../../../shared/models/category.interface';
-import { Component, Input, OnInit, Output, EventEmitter } from '@angular/core';
-import { ConfirmationService, LazyLoadEvent } from 'primeng/api';
-import { Page } from '../../../../shared/models/paging/page.interface';
-import { USER_RIGHTS } from 'src/app/shared/enums/USER_RIGHTS.enum';
-import { TranslateService } from '@ngx-translate/core';
-import { NotificationsHandlingService } from 'src/app/shared/services/notifications-handling/notifications-handling.service';
-
-@Component({
- selector: 'app-categories-search-results',
- templateUrl: './categories-search-results.component.html',
- styleUrls: ['./categories-search-results.component.scss']
-})
-export class CategoriesSearchResultsComponent implements OnInit {
-
- @Output() paginationEvent = new EventEmitter<{ page: number, offset: number }>(); // TODO: Use interface.
- @Output() valueChange = new EventEmitter();
- @Input() loading: boolean;
- @Input() set searchResultsPage(results: Page) {
-
- // This setter may be called on page setup without arguments.
- if (!results) {
- return;
- }
-
- this._searchResultsPage = results;
- this.totalRecords = results.totalElements;
- }
-
- _searchResultsPage: Page;
- totalRecords: number;
- rows: number = 10;
- header: string;
-
- displayEditCategoryDialog: boolean;
- categoryToEdit: Category;
-
- constructor(
- private categoriesService: CategoriesService,
- private errorHandlingService: ErrorHandlingService,
- private authService: AuthService,
- private translate: TranslateService,
- private confirmationService: ConfirmationService,
- private notifications: NotificationsHandlingService
- ) { }
-
- ngOnInit(): void {
- }
-
- onLazyLoad(event: LazyLoadEvent) {
- let pageToRequest = Math.floor(event.first / event.rows);
- let pageSize = event.rows;
- this.paginationEvent.emit({ page: pageToRequest, offset: pageSize });
- }
-
- edit(category: Category) {
- this.header = this.translate.instant('EDIT-CATEGORY');
- this.categoryToEdit = category;
- this.displayEditCategoryDialog = true;
- }
-
- cancelEditCategory() {
- this.displayEditCategoryDialog = false;
- this.categoryToEdit = null;
- }
-
- delete(category: Category): void {
- this.confirmationService.confirm({
- accept: () => {
- this.categoriesService.delete(category.id).subscribe((success) => {
- this.valueChange.emit(success);
- this.notifications.showDeleteCategorySuccess();
- },
- err => this.errorHandlingService.showHttpResponseError(err)
- );
- // Actual logic to perform a confirmation
- }, reject: () => {
-
- }
- });
- }
-
- /*
- * UserRights-check Methods
- */
- canEditCategories(): boolean {
- return this.authService.userHasRightForClient(USER_RIGHTS.H03, environment.globalRightsClientID);
- }
-
- canDeleteCategories(): boolean {
- return this.authService.userHasRightForClient(USER_RIGHTS.H04, environment.globalRightsClientID);
- }
-
- passEvent(passEvent : any) {
- if(passEvent){
- this.valueChange.emit(passEvent);
- }
- }
-}
diff --git a/app/features/administration/categories-management/categories-search/categories-search.component.html b/app/features/administration/categories-management/categories-search/categories-search.component.html
deleted file mode 100644
index 85d5ee3..0000000
--- a/app/features/administration/categories-management/categories-search/categories-search.component.html
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
diff --git a/app/features/administration/categories-management/categories-search/categories-search.component.scss b/app/features/administration/categories-management/categories-search/categories-search.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/administration/categories-management/categories-search/categories-search.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/administration/categories-management/categories-search/categories-search.component.spec.ts b/app/features/administration/categories-management/categories-search/categories-search.component.spec.ts
deleted file mode 100644
index b7b296b..0000000
--- a/app/features/administration/categories-management/categories-search/categories-search.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { CategoriesSearchComponent } from './categories-search.component';
-
-describe('CategoriesSearchComponent', () => {
- let component: CategoriesSearchComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ CategoriesSearchComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(CategoriesSearchComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/administration/categories-management/categories-search/categories-search.component.ts b/app/features/administration/categories-management/categories-search/categories-search.component.ts
deleted file mode 100644
index 38dcbce..0000000
--- a/app/features/administration/categories-management/categories-search/categories-search.component.ts
+++ /dev/null
@@ -1,101 +0,0 @@
-import { environment } from './../../../../../environments/environment.prod';
-import { ErrorHandlingService } from './../../../../shared/services/error-handling/error-handling.service';
-import { AuthService } from 'src/app/shared/services/auth.service';
-import { CategoryFormComponent } from './../../forms/category-form/category-form.component';
-import { Category } from './../../../../shared/models/category.interface';
-import { DocumentClassificationsService } from './../../../../shared/services/administration/document-classifications.service';
-import { Component, OnInit, Output, EventEmitter, Input, ViewChild } from '@angular/core';
-import { FormBuilder } from '@angular/forms';
-import { CategoriesService } from 'src/app/shared/services/administration/categories.service';
-import { DocumentClassification } from 'src/app/shared/models/document-classification.interface';
-import { Page } from '../../../../shared/models/paging/page.interface';
-import { USER_RIGHTS } from 'src/app/shared/enums/USER_RIGHTS.enum';
-
-@Component({
- selector: 'app-categories-search',
- templateUrl: './categories-search.component.html',
- styleUrls: ['./categories-search.component.scss']
-})
-export class CategoriesSearchComponent implements OnInit {
-
- @Input() set paginationEventRequest(value: { page: number, offset: number }) {
-
- // This setter may be called on page setup without arguments.
- if (!value) {
- return;
- }
- this._value = Object.assign(value);
- this.search(value.page, value.offset);
- }
-
- @Input() set valueTableChange(results: any) {
- if (results) {
- this.search(this._value.page, this._value.offset);
- }
- }
-
- @Output() searchResults = new EventEmitter>();
- @Output() loading = new EventEmitter();
- @Output() searchInitiated = new EventEmitter();
- @Input() passChange: any;
-
- @ViewChild(CategoryFormComponent)
- private categoryForm: CategoryFormComponent;
- _value: { page: number, offset: number };
- lastSearchCriteria: { docClassificationId: number | string, categoryName: string, categoryCode: string };
-
- constructor(
- private categoriesService: CategoriesService,
- private authService: AuthService,
- private errorHandlingService: ErrorHandlingService
- ) { }
-
- ngOnInit(): void {
- }
-
- clear() {
- this.categoryForm.resetForm();
- }
-
- searchButtonClicked() {
-
- // Inform anyone interested there is a new search underway.
- this.searchInitiated.emit(true);
-
- // Remember the search for future pagination/whatever requests.
- let categoryFormValue = this.categoryForm.formValue();
- let docClassId = categoryFormValue.documentClassification ? categoryFormValue.documentClassification.classificationId : null;
- let catName = categoryFormValue.categoryName;
- let catCode = categoryFormValue.categoryCode;
-
- this.lastSearchCriteria = {
- docClassificationId: docClassId ? docClassId : '',
- categoryName: catName ? catName : '',
- categoryCode: catCode ? catCode : ''
- };
-
- // Then actually search.
- this.search();
- }
-
- search(pageNumber = 0, pageSize = 10) {
-this.loading.emit(true);
-
- // A search may be issued by the paginationEventRequest setter upon setting up the page.
- if (!this.lastSearchCriteria) {
- return;
- }
-
- this.categoriesService.searchByCriteriaPaged(pageNumber, pageSize, this.lastSearchCriteria, 'search').subscribe((results: Page) => {
- this.searchResults.emit(results);
- this.loading.emit(false);
- },err => {
- this.loading.emit(false);
- this.errorHandlingService.showHttpResponseError(err);
- });
- }
-
- canPreviewAllCategories(): boolean {
- return this.authService.userHasRightForClient(USER_RIGHTS.H01, environment.globalRightsClientID);
- }
-}
diff --git a/app/features/administration/categories-management/create-category-dialog/create-category-dialog.component.html b/app/features/administration/categories-management/create-category-dialog/create-category-dialog.component.html
deleted file mode 100644
index 08bb288..0000000
--- a/app/features/administration/categories-management/create-category-dialog/create-category-dialog.component.html
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
diff --git a/app/features/administration/categories-management/create-category-dialog/create-category-dialog.component.scss b/app/features/administration/categories-management/create-category-dialog/create-category-dialog.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/administration/categories-management/create-category-dialog/create-category-dialog.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/administration/categories-management/create-category-dialog/create-category-dialog.component.spec.ts b/app/features/administration/categories-management/create-category-dialog/create-category-dialog.component.spec.ts
deleted file mode 100644
index 40aff7d..0000000
--- a/app/features/administration/categories-management/create-category-dialog/create-category-dialog.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { CreateCategoryDialogComponent } from './create-category-dialog.component';
-
-describe('CreateCategoryComponent', () => {
- let component: CreateCategoryDialogComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ CreateCategoryDialogComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(CreateCategoryDialogComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/administration/categories-management/create-category-dialog/create-category-dialog.component.ts b/app/features/administration/categories-management/create-category-dialog/create-category-dialog.component.ts
deleted file mode 100644
index 3e5a891..0000000
--- a/app/features/administration/categories-management/create-category-dialog/create-category-dialog.component.ts
+++ /dev/null
@@ -1,86 +0,0 @@
-import { CategoryFormComponent } from './../../forms/category-form/category-form.component';
-import { Category } from './../../../../shared/models/category.interface';
-import { CategoriesService } from '../../../../shared/services/administration/categories.service';
-import { Component, Input, OnInit, Output, EventEmitter, ViewChild } from '@angular/core';
-import { NotificationsHandlingService } from 'src/app/shared/services/notifications-handling/notifications-handling.service';
-
-@Component({
- selector: 'app-create-category-dialog',
- templateUrl: './create-category-dialog.component.html',
- styleUrls: ['./create-category-dialog.component.scss']
-})
-export class CreateCategoryDialogComponent implements OnInit {
-
- @ViewChild(CategoryFormComponent) private categoryForm: CategoryFormComponent;
- @Input() displayDialog: boolean;
- @Input() header: string;
- @Input() categoryToEdit: Category;
- @Output() cancelled = new EventEmitter();
- @Output() valueChange = new EventEmitter();
-
- displayValidationMessagesEvenIfPristine: boolean;
-
- constructor(private categoriesService: CategoriesService,
- private notificationHandling: NotificationsHandlingService) { }
-
- ngOnInit(): void {
- this.reset(); // Make sure everything is cleanly initialised.
- }
-
- reset() {
- this.displayValidationMessagesEvenIfPristine = false;
- this.categoryForm?.resetForm();
- }
-
- onShow() {
- // If a categoryToEdit was provided.
- if (this.categoryToEdit) {
- this.categoryForm.setValue(this.categoryToEdit);
- }
- }
-
- cancel() {
- this.cancelled.emit(true);
- }
-
- addCategory() {
- // If the form is not valid, make sure validator messages are displayed and then return without doing anything.
- if (!this.categoryForm.isValid()) {
- this.displayValidationMessagesEvenIfPristine = true;
- return;
- }
-
- // TODO: What is returned from backend on create()??
- this.categoriesService.createNewCategory(this.categoryForm.formValue()).subscribe(result => {
- this.valueChange.emit(result);
- this.notificationHandling.showCreateCategorySuccess();
- this.cancel();
- this.notificationHandling.showCreateNewCategorySuccess();
-
- },
- error => {
-
- });
-
- }
-
- editCategory() {
- // If the form is not valid, make sure validator messages are displayed and then return without doing anything.
- if (!this.categoryForm.isValid()) {
- this.displayValidationMessagesEvenIfPristine = true;
- return;
- }
-
- // TODO: What is returned from backend on create()??
- // TODO: It's to ugly having to provide the categoryId separately.
- this.categoriesService.updateCategory(this.categoryForm.formValue()).subscribe(result => {
- this.valueChange.emit(result);
- this.cancel();
- this.notificationHandling.showUpdateCategorySuccess();
-
- },
- error => {
-
- });
- }
-}
diff --git a/app/features/administration/configurator/configurator-edit-value/configurator-edit-value.component.html b/app/features/administration/configurator/configurator-edit-value/configurator-edit-value.component.html
deleted file mode 100644
index 6f604d8..0000000
--- a/app/features/administration/configurator/configurator-edit-value/configurator-edit-value.component.html
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/app/features/administration/configurator/configurator-edit-value/configurator-edit-value.component.scss b/app/features/administration/configurator/configurator-edit-value/configurator-edit-value.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/administration/configurator/configurator-edit-value/configurator-edit-value.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/administration/configurator/configurator-edit-value/configurator-edit-value.component.spec.ts b/app/features/administration/configurator/configurator-edit-value/configurator-edit-value.component.spec.ts
deleted file mode 100644
index f2b2cee..0000000
--- a/app/features/administration/configurator/configurator-edit-value/configurator-edit-value.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { ConfiguratorEditValueComponent } from './configurator-edit-value.component';
-
-describe('ConfiguratorEditValueComponent', () => {
- let component: ConfiguratorEditValueComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ ConfiguratorEditValueComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(ConfiguratorEditValueComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/administration/configurator/configurator-edit-value/configurator-edit-value.component.ts b/app/features/administration/configurator/configurator-edit-value/configurator-edit-value.component.ts
deleted file mode 100644
index c60bfbe..0000000
--- a/app/features/administration/configurator/configurator-edit-value/configurator-edit-value.component.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
-import {ConfiguratorParameter} from "../../../../shared/models/configurator-parameter.interface";
-
-@Component({
- selector: 'app-configurator-edit-value',
- templateUrl: './configurator-edit-value.component.html',
- styleUrls: ['./configurator-edit-value.component.scss']
-})
-export class ConfiguratorEditValueComponent implements OnInit {
-
- @Input() editParameterRequestInput: ConfiguratorParameter;
- @Output() newConfiguratorParameter = new EventEmitter();
-
- selectedParameter: ConfiguratorParameter = null;
-
-
- constructor() { }
-
- ngOnInit(): void {
- console.log('editParameterRequestInput in edit: ' + JSON.stringify(this.editParameterRequestInput));
- }
-
- passValueChange(newConfigurator: ConfiguratorParameter) {
- this.newConfiguratorParameter.emit(newConfigurator);
- }
-
-
-}
diff --git a/app/features/administration/configurator/configurator-list-of-parameters/configurator-list-of-parameters.component.html b/app/features/administration/configurator/configurator-list-of-parameters/configurator-list-of-parameters.component.html
deleted file mode 100644
index c7b5995..0000000
--- a/app/features/administration/configurator/configurator-list-of-parameters/configurator-list-of-parameters.component.html
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-
-
-
-
- Parameter Name
- Parameter Type
- Parameter Value
-
-
-
-
-
-
-
- {{parameter.configurationVariable}}
- {{parameter.variableType}}
-
- {{parameter.integerValue}}
- {{parameter.stringValue}}
-
-
-
-
-
-
-
-
diff --git a/app/features/administration/configurator/configurator-list-of-parameters/configurator-list-of-parameters.component.scss b/app/features/administration/configurator/configurator-list-of-parameters/configurator-list-of-parameters.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/administration/configurator/configurator-list-of-parameters/configurator-list-of-parameters.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/administration/configurator/configurator-list-of-parameters/configurator-list-of-parameters.component.spec.ts b/app/features/administration/configurator/configurator-list-of-parameters/configurator-list-of-parameters.component.spec.ts
deleted file mode 100644
index 528eb47..0000000
--- a/app/features/administration/configurator/configurator-list-of-parameters/configurator-list-of-parameters.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { ConfiguratorListOfParametersComponent } from './configurator-list-of-parameters.component';
-
-describe('ConfiguratorListOfParametersComponent', () => {
- let component: ConfiguratorListOfParametersComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ ConfiguratorListOfParametersComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(ConfiguratorListOfParametersComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/administration/configurator/configurator-list-of-parameters/configurator-list-of-parameters.component.ts b/app/features/administration/configurator/configurator-list-of-parameters/configurator-list-of-parameters.component.ts
deleted file mode 100644
index 0669164..0000000
--- a/app/features/administration/configurator/configurator-list-of-parameters/configurator-list-of-parameters.component.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-import {AfterViewChecked, AfterViewInit, Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
-import {ConfiguratorParameter} from '../../../../shared/models/configurator-parameter.interface';
-import {Page} from '../../../../shared/models/paging/page.interface';
-import {LazyLoadEvent} from 'primeng/api';
-
-@Component({
- selector: 'app-configurator-list-of-parameters',
- templateUrl: './configurator-list-of-parameters.component.html',
- styleUrls: ['./configurator-list-of-parameters.component.scss']
-})
-export class ConfiguratorListOfParametersComponent implements OnInit {
-
- @Input() parametersListInput: ConfiguratorParameter[];
- @Input() loadingInput: boolean;
- @Output() editEventRequest = new EventEmitter();
-
- editParameterRequest: ConfiguratorParameter;
- parametersList: ConfiguratorParameter[];
- selectedParameterRequest: ConfiguratorParameter;
- totalRecords: number;
- rows = 10;
-
- constructor() { }
-
- ngOnInit(): void {
- const initParameter: ConfiguratorParameter = {
- configurationId: null,
- configurationVariable: null,
- variableType: null,
- integerValue: null,
- stringValue: null
- };
- this.editEventRequest.emit(initParameter);
- }
-
- passSelectedConfigurator(parameter: ConfiguratorParameter) {
- this.editEventRequest.emit(parameter);
- }
-
-}
diff --git a/app/features/administration/configurator/configurator.component.html b/app/features/administration/configurator/configurator.component.html
deleted file mode 100644
index 4f760f3..0000000
--- a/app/features/administration/configurator/configurator.component.html
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
{{'CONFIGURATOR' | translate}}
-
-
-
-
-
-
-
-
-
diff --git a/app/features/administration/configurator/configurator.component.scss b/app/features/administration/configurator/configurator.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/administration/configurator/configurator.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/administration/configurator/configurator.component.spec.ts b/app/features/administration/configurator/configurator.component.spec.ts
deleted file mode 100644
index bb442f4..0000000
--- a/app/features/administration/configurator/configurator.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { ConfiguratorComponent } from './configurator.component';
-
-describe('ConfiguratorComponent', () => {
- let component: ConfiguratorComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ ConfiguratorComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(ConfiguratorComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/administration/configurator/configurator.component.ts b/app/features/administration/configurator/configurator.component.ts
deleted file mode 100644
index b50a139..0000000
--- a/app/features/administration/configurator/configurator.component.ts
+++ /dev/null
@@ -1,51 +0,0 @@
-import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
-import { ErrorHandlingService } from 'src/app/shared/services/error-handling/error-handling.service';
-import {ConfiguratorParameter} from '../../../shared/models/configurator-parameter.interface';
-import {ConfiguratorService} from "../../../shared/services/administration/configurator.service";
-
-@Component({
- selector: 'app-configurator',
- templateUrl: './configurator.component.html',
- styleUrls: ['./configurator.component.scss']
-})
-export class ConfiguratorComponent implements OnInit {
-
- // @Input() parametersListInput: [ConfiguratorParameter];
- // @Input() editParameterRequestInput: ConfiguratorParameter;
- // @Output() editEventRequest = new EventEmitter();
-
- parametersList: ConfiguratorParameter[];
- editEventRequest: ConfiguratorParameter;
- loading = true;
-
- constructor(private configuratorService: ConfiguratorService, private errorHandlingService: ErrorHandlingService) { }
-
- ngOnInit(): void {
-
- this.initData();
- console.log('this.parametersList: ' + JSON.stringify(this.parametersList));
- }
-
- initData() {
- this.loading = true;
- this.configuratorService.getConfiguratorParameters().subscribe(values => {
- this.parametersList = values;
- this.loading = false;
- console.log('IN this.parametersList: ' + JSON.stringify(this.parametersList));
- },
- err => {
- this.errorHandlingService.showHttpResponseError(err);
- this.loading = false;
- });
- }
-
- editEvent(request) {
- this.editEventRequest = request;
- }
-
- passNewConfigurator(newConfigurator: ConfiguratorParameter){
- this.initData();
-
- }
-
-}
diff --git a/app/features/administration/forms/application-level-form/application-level-form.component.html b/app/features/administration/forms/application-level-form/application-level-form.component.html
deleted file mode 100644
index 4834a21..0000000
--- a/app/features/administration/forms/application-level-form/application-level-form.component.html
+++ /dev/null
@@ -1,101 +0,0 @@
-
diff --git a/app/features/administration/forms/application-level-form/application-level-form.component.scss b/app/features/administration/forms/application-level-form/application-level-form.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/administration/forms/application-level-form/application-level-form.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/administration/forms/application-level-form/application-level-form.component.spec.ts b/app/features/administration/forms/application-level-form/application-level-form.component.spec.ts
deleted file mode 100644
index 56492ad..0000000
--- a/app/features/administration/forms/application-level-form/application-level-form.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { ApplicationLevelFormComponent } from './application-level-form.component';
-
-describe('ApplicationLevelFormComponent', () => {
- let component: ApplicationLevelFormComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ ApplicationLevelFormComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(ApplicationLevelFormComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/administration/forms/application-level-form/application-level-form.component.ts b/app/features/administration/forms/application-level-form/application-level-form.component.ts
deleted file mode 100644
index 329d07c..0000000
--- a/app/features/administration/forms/application-level-form/application-level-form.component.ts
+++ /dev/null
@@ -1,111 +0,0 @@
-import { Component, Input, OnInit } from '@angular/core';
-import { FormBuilder } from '@angular/forms';
-import { IPowerClient } from 'src/app/shared/models/ipower-client.interface';
-import { SearchSystemException} from 'src/app/shared/models/request/search-system-exceptions.interface';
-import { IpowerClientsService } from 'src/app/shared/services/administration/ipower-clients.service';
-
-@Component({
- selector: 'app-application-level-form',
- templateUrl: './application-level-form.component.html',
- styleUrls: ['./application-level-form.component.scss']
-})
-export class ApplicationLevelFormComponent implements OnInit {
-
- iPowerClientNameSuggestions: any;
- iPowerClientCodeSuggestions: any;
- private iPowerClientSuggestions: IPowerClient[];
- private selectedIPowerClient: IPowerClient;
-
- searchCriteriaForm = this.fb.group({
- processId: [null],
- clientId: [null],
- clientName: [null],
- jobName: [null],
- dmsFileCode: [null],
- dateFrom: [null],
- dateTo: [null],
- });
-
- constructor(private fb: FormBuilder, private iPowerClientsService: IpowerClientsService) { }
-
-
-
- ngOnInit(): void {
- }
-
- public formValue(): SearchSystemException {
- let formValue: SearchSystemException = {
- processId: this.searchCriteriaForm.get('processId').value,
- clientId: this.searchCriteriaForm.get('clientId').value,
- jobName: this.searchCriteriaForm.get('jobName').value,
- dmsFileCode: this.searchCriteriaForm.get('dmsFileCode').value,
- dateFrom: this.searchCriteriaForm.get('dateFrom').value,
- dateTo: this.searchCriteriaForm.get('dateTo').value
- };
-
- formValue.dateFrom = new Date(Date.UTC(formValue.dateFrom?.getFullYear(), formValue.dateFrom?.getMonth(), formValue.dateFrom?.getDate()));
- formValue.dateTo = new Date(Date.UTC(formValue.dateTo?.getFullYear(), formValue.dateTo?.getMonth(),formValue.dateTo?.getDate() + 1));
- formValue.dateTo?.setMilliseconds(formValue.dateTo?.getMilliseconds() -1);
-
-
- return formValue;
- }
-
- /*
- * Auto-suggest & Auto-complete IPower Client
- */
- autosuggestIPowerClientName(event): void {
-
- if (!event.query || event.query.length < 3) {
- this.iPowerClientNameSuggestions = [];
- return;
- }
-
- this.iPowerClientsService.getClientsByNameOnly(event.query).subscribe(
- (values: IPowerClient[]) => {
- this.iPowerClientSuggestions = values;
-
- const temp: string[] = [];
- values.map(val => temp.push(val.name));
- this.iPowerClientNameSuggestions = temp;
- },
- err => console.error(err) // TODO: Handle this via a Messaging Service
- );
-}
-
-autosuggestIPowerClientCode(event): void {
-
- if (event.query.length < 3) {
- this.iPowerClientCodeSuggestions = [];
- return;
- }
-
- this.iPowerClientsService.getClientsByCodeOnly(event.query).subscribe(
- (values: IPowerClient[]) => {
- this.iPowerClientSuggestions = values;
-
- const temp: string[] = [];
- values.map(val => temp.push(val.clientCode));
- this.iPowerClientCodeSuggestions = temp;
- },
- err => console.error(err)
- );
-}
-
-iPowerClientNameSelected(name: string): void {
- this.selectedIPowerClient = this.iPowerClientSuggestions.find(client => client.name === name);
- this.searchCriteriaForm.get('clientId').patchValue(this.selectedIPowerClient ? this.selectedIPowerClient.clientCode : '');
- this.searchCriteriaForm.updateValueAndValidity();
-}
-
-iPowerClientCodeSelected(code: string): void {
- this.selectedIPowerClient = this.iPowerClientSuggestions.find(client => client.clientCode === code);
- this.searchCriteriaForm.get('clientName').patchValue(this.selectedIPowerClient ? this.selectedIPowerClient.name : '');
- this.searchCriteriaForm.updateValueAndValidity();
-}
-
-resetForm() {
- this.searchCriteriaForm.reset();
-}
-
-}
diff --git a/app/features/administration/forms/category-form/category-form.component.html b/app/features/administration/forms/category-form/category-form.component.html
deleted file mode 100644
index b98b145..0000000
--- a/app/features/administration/forms/category-form/category-form.component.html
+++ /dev/null
@@ -1,72 +0,0 @@
-
diff --git a/app/features/administration/forms/category-form/category-form.component.scss b/app/features/administration/forms/category-form/category-form.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/administration/forms/category-form/category-form.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/administration/forms/category-form/category-form.component.spec.ts b/app/features/administration/forms/category-form/category-form.component.spec.ts
deleted file mode 100644
index 37a585f..0000000
--- a/app/features/administration/forms/category-form/category-form.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { CategoryFormComponent } from './category-form.component';
-
-describe('CategoryFormComponent', () => {
- let component: CategoryFormComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ CategoryFormComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(CategoryFormComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/administration/forms/category-form/category-form.component.ts b/app/features/administration/forms/category-form/category-form.component.ts
deleted file mode 100644
index b53c7da..0000000
--- a/app/features/administration/forms/category-form/category-form.component.ts
+++ /dev/null
@@ -1,183 +0,0 @@
-import { Category } from './../../../../shared/models/category.interface';
-import { Component, Input, OnInit } from '@angular/core';
-import { FormBuilder, Validators, FormGroup } from '@angular/forms';
-import { DocumentClassification } from 'src/app/shared/models/document-classification.interface';
-import { CategoriesService } from 'src/app/shared/services/administration/categories.service';
-import { DocumentClassificationsService } from 'src/app/shared/services/administration/document-classifications.service';
-import { ErrorHandlingService } from 'src/app/shared/services/error-handling/error-handling.service';
-
-@Component({
- selector: 'app-category-form',
- templateUrl: './category-form.component.html',
- styleUrls: ['./category-form.component.scss']
-})
-export class CategoryFormComponent implements OnInit {
-
- /*
- * Inputs
- */
- @Input() dialogLayout: boolean = false; // Controls .scss classes to allow for better dispay in a dialog.
- @Input() requiredFields: string[] | boolean = false; // True/False indicates that all/none are required. String[] specifies the form controls required.
- @Input() displayValidationMessagesEvenIfPristine: boolean = false; // Serves for manually treating the controls as dirty.
- @Input() autosuggestInputs: boolean = false;
-
- /*
- * Reactive Form
- */
- categoryForm = this.fb.group({
- documentClassification: [null],
- categoryName: [null],
- categoryCode: [null]
- });
-
- setFormValue: Category = null;
- selectedCategory: Category;
-
- /*
- * Other Variables
- */
- documentClassificationsList: DocumentClassification[];
-
- categoryNameSuggestions: string[];
- categoryCodeSuggestions: string[];
- categorySuggestions: Category[];
-
- /*
- * Constructor & Initialisers
- */
- constructor(
- private fb: FormBuilder,
- private categoriesService: CategoriesService,
- private documentClassificationsService: DocumentClassificationsService,
- private errorHandlingService: ErrorHandlingService
- ) { }
-
- ngOnInit(): void {
- this.initData();
- this.initValidators()
- }
-
- initData() {
- this.documentClassificationsService.getAll().subscribe(
- value => this.documentClassificationsList = value,
- err => this.errorHandlingService.showHttpResponseError(err)
- );
- }
-
- // TODO: Have this mechanism offer the use of custom validators too.
- initValidators() {
-
- if (!this.requiredFields) { return; }
-
- // In a true/false case.
- if (typeof this.requiredFields == 'boolean') {
- // If true, enable the required validator for all controls and sub-controls.
- if (this.requiredFields) {
- this.setRequiredValidatorRecursively(this.categoryForm);
- }
-
- // If false, do nothing.
- return;
- }
-
- // If it was a string array, enable the validators for all provided field-names. TODO: This ONLY supports 1st level controls and not nested ones.
- (this.requiredFields).forEach(field => this.categoryForm.controls[field].setValidators(Validators.required))
- }
-
- setRequiredValidatorRecursively(group: FormGroup) {
- Object.keys(group.controls).forEach(key => {
- group.controls[key].setValidators(Validators.required);
-
- if (group.controls[key]['controls']) {
- this.setRequiredValidatorRecursively(group.controls[key])
- }
- });
- }
-
- /*
- * Auto-suggest & Auto-complete Category
- */
- autosuggestCategoryName(event) {
-
- if (!event.query || event.query.length < 3) {
- this.categoryNameSuggestions = [];
- return;
- }
-
- let classId = this.categoryForm.get('documentClassification').value ? this.categoryForm.get('documentClassification').value.classificationId : null;
- this.categoriesService.autosuggestCategoryName(event.query, classId).subscribe(
- (values: Category[]) => {
- let temp: string[] = [];
- this.categorySuggestions = values;
- values.map(val => temp.push(val.categoryName));
- this.categoryNameSuggestions = temp
- },
- err => this.errorHandlingService.showHttpResponseError(err)
- );
- }
-
- autosuggestCategoryCode(event) {
-
- if (event.query.length < 3) {
- this.categoryCodeSuggestions = [];
- return;
- }
-
- let classId = this.categoryForm.get('documentClassification').value ? this.categoryForm.get('documentClassification').value.classificationId : null;
- this.categoriesService.autosuggestCategoryCode(event.query, classId).subscribe(
- (values: Category[]) => {
- let temp: string[] = [];
- this.categorySuggestions = values;
- values.map(val => temp.push(val.categoryCode));
- this.categoryCodeSuggestions = temp
- },
- err => this.errorHandlingService.showHttpResponseError(err)
- );
- }
-
- categoryNameSelected(name: string) {
- this.selectedCategory = this.categorySuggestions.find(cat => cat.categoryName == name);
- this.categoryForm.get('categoryCode').patchValue(this.selectedCategory.categoryCode);
- this.categoryForm.updateValueAndValidity();
- }
-
- categoryCodeSelected(code: string) {
- this.selectedCategory = this.categorySuggestions.find(cat => cat.categoryCode == code);
- this.categoryForm.get('categoryName').patchValue(this.selectedCategory.categoryName);
- this.categoryForm.updateValueAndValidity();
- }
-
- /*
- * API methods
- */
- public resetForm(): void {
- this.categoryForm.reset();
- }
-
- public formValue(): Category {
- let formValue: Category = {
- id: this.setFormValue ? this.setFormValue.id : null,
- documentClassification: this.categoryForm.get('documentClassification').value,
- categoryName: this.categoryForm.get('categoryName').value,
- categoryCode: this.categoryForm.get('categoryCode').value
- };
-
- return formValue;
- }
-
- public setValue(value: Category): void {
- if (!value) {
- return;
- }
-
- this.setFormValue = value;
- this.categoryForm.get('documentClassification').setValue(value.documentClassification);
- this.categoryForm.get('categoryName').setValue(value.categoryName);
- this.categoryForm.get('categoryCode').setValue(value.categoryCode);
- this.categoryForm.updateValueAndValidity();
- }
-
- public isValid(): boolean {
- return this.categoryForm.valid;
- }
-}
diff --git a/app/features/administration/forms/configurator-form/configurator-form.component.html b/app/features/administration/forms/configurator-form/configurator-form.component.html
deleted file mode 100644
index 6129b70..0000000
--- a/app/features/administration/forms/configurator-form/configurator-form.component.html
+++ /dev/null
@@ -1,60 +0,0 @@
-
diff --git a/app/features/administration/forms/configurator-form/configurator-form.component.scss b/app/features/administration/forms/configurator-form/configurator-form.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/administration/forms/configurator-form/configurator-form.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/administration/forms/configurator-form/configurator-form.component.spec.ts b/app/features/administration/forms/configurator-form/configurator-form.component.spec.ts
deleted file mode 100644
index 4b86384..0000000
--- a/app/features/administration/forms/configurator-form/configurator-form.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { ConfiguratorFormComponent } from './configurator-form.component';
-
-describe('ConfiguratorFormComponent', () => {
- let component: ConfiguratorFormComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ ConfiguratorFormComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(ConfiguratorFormComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/administration/forms/configurator-form/configurator-form.component.ts b/app/features/administration/forms/configurator-form/configurator-form.component.ts
deleted file mode 100644
index 78f136d..0000000
--- a/app/features/administration/forms/configurator-form/configurator-form.component.ts
+++ /dev/null
@@ -1,69 +0,0 @@
-import { AfterViewChecked, Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
-import { FormBuilder } from '@angular/forms';
-import { ConfiguratorParameter } from '../../../../shared/models/configurator-parameter.interface';
-import { ConfiguratorService } from "../../../../shared/services/administration/configurator.service";
-import { Category } from "../../../../shared/models/category.interface";
-import { Router } from "@angular/router";
-import { NotificationsHandlingService } from 'src/app/shared/services/notifications-handling/notifications-handling.service';
-import { AuthService } from 'src/app/shared/services/auth.service';
-import { USER_RIGHTS } from 'src/app/shared/enums/USER_RIGHTS.enum';
-import { environment } from 'src/environments/environment';
-
-@Component({
- selector: 'app-configurator-form',
- templateUrl: './configurator-form.component.html',
- styleUrls: ['./configurator-form.component.scss']
-})
-export class ConfiguratorFormComponent implements OnInit {
-
- @Input() dialogLayout: boolean = false; // Controls .scss classes to allow for better dispay in a dialog.
- @Input() displayValidationMessagesEvenIfPristine: boolean = false; // Serves for manually treating the controls as dirty.
- @Input() editableParameter: ConfiguratorParameter;
- @Output() valueChange = new EventEmitter();
-
- /*
- * Reactive Form
- */
- configuratorForm = this.fb.group({
- parameterName: null,
- parameterType: null,
- parameterValue: null
- });
-
- constructor(private fb: FormBuilder, private configuratorService: ConfiguratorService, private router: Router, private notificationService: NotificationsHandlingService,
- private authService: AuthService) { }
-
- ngOnInit(): void {
- }
-
- ngOnChanges(): void {
- }
-
- public formValue(): ConfiguratorParameter {
- let formValue: ConfiguratorParameter = {
- configurationId: this.editableParameter.configurationId,
- configurationVariable: this.editableParameter.configurationVariable,
- variableType: this.editableParameter.variableType,
- integerValue: this.editableParameter.variableType === 'Integer' ? Number(this.configuratorForm.get('parameterValue').value) : null,
- stringValue: this.editableParameter.variableType === 'String' ? String(this.configuratorForm.get('parameterValue').value) : null
- };
-
- return formValue;
- }
-
- updateButtonClicked(): void {
- if (this.editableParameter.configurationId !== null) {
- this.configuratorService.updateConfiguratorParameter(this.formValue()).subscribe(result => {
- this.valueChange.emit(this.formValue());
- this.notificationService.showUpdateConfiguratorParameterSuccess();
- },
- error => {
- });
- }
- }
-
- canEditParameterValue(): boolean {
- return this.authService.userHasRightForClient(USER_RIGHTS.J01, environment.globalRightsClientID) && this.editableParameter.configurationVariable != null;
- }
-
-}
diff --git a/app/features/administration/forms/template-form/template-form.component.html b/app/features/administration/forms/template-form/template-form.component.html
deleted file mode 100644
index c2c22ec..0000000
--- a/app/features/administration/forms/template-form/template-form.component.html
+++ /dev/null
@@ -1,138 +0,0 @@
-
diff --git a/app/features/administration/forms/template-form/template-form.component.scss b/app/features/administration/forms/template-form/template-form.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/administration/forms/template-form/template-form.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/administration/forms/template-form/template-form.component.spec.ts b/app/features/administration/forms/template-form/template-form.component.spec.ts
deleted file mode 100644
index af67224..0000000
--- a/app/features/administration/forms/template-form/template-form.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { TemplateFormComponent } from './template-form.component';
-
-describe('TemplateFormComponent', () => {
- let component: TemplateFormComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ TemplateFormComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(TemplateFormComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/administration/forms/template-form/template-form.component.ts b/app/features/administration/forms/template-form/template-form.component.ts
deleted file mode 100644
index 5dcec04..0000000
--- a/app/features/administration/forms/template-form/template-form.component.ts
+++ /dev/null
@@ -1,369 +0,0 @@
-import { DocumentClassification } from './../../../../shared/models/document-classification.interface';
-import { Category } from './../../../../shared/models/category.interface';
-import { DocumentSubclassificationsService } from './../../../../shared/services/administration/document-subclassifications.service';
-import { DocumentSubclassification } from './../../../../shared/models/document-subclassification.interface';
-import { IPowerClient } from './../../../../shared/models/ipower-client.interface';
-import { Template } from './../../../../shared/models/template.interface';
-import { Component, Input, OnInit } from '@angular/core';
-import { FormBuilder, Validators } from '@angular/forms';
-import { CategoriesService } from 'src/app/shared/services/administration/categories.service';
-import { DocumentClassificationsService } from 'src/app/shared/services/administration/document-classifications.service';
-import { IpowerClientsService } from 'src/app/shared/services/administration/ipower-clients.service';
-import { ErrorHandlingService } from 'src/app/shared/services/error-handling/error-handling.service';
-
-@Component({
- selector: 'app-template-form',
- templateUrl: './template-form.component.html',
- styleUrls: ['./template-form.component.scss']
-})
-export class TemplateFormComponent implements OnInit {
-
- /*
- * Inputs
- */
- @Input() dialogLayout: boolean = false; // Controls .scss classes to allow for better dispay in a dialog.
- @Input() requiredFields: string[] | boolean = false; // True/False indicates that all/none are required. String[] specifies the form controls required.
- @Input() displayValidationMessagesEvenIfPristine: boolean = false; // Serves for manually treating the controls as dirty.
- @Input() excludedFormControls: string[]; // Specifies the form controls to be removed and NOT displayed.
-
- /*
- * Reactive Form
- */
- templateForm = this.fb.group({
- documentClassification: [null],
- categoryName: [null],
- categoryCode: [null],
- iPowerClientName: [null],
- iPowerClientCode: [null],
- documentSubclassification: [null],
- abbyyTemplateCode: [null]
- });
- initiallySetFormValue: Template;
-
- /*
- * Other Variables
- */
- documentClassificationsList: DocumentClassification[];
-
- categoryNameSuggestions: string[];
- categoryCodeSuggestions: string[];
- categorySuggestions: Category[];
- selectedCategory: Category;
-
- iPowerClientNameSuggestions: string[];
- iPowerClientCodeSuggestions: string[];
- iPowerClientSuggestions: IPowerClient[];
- selectedIPowerClient: IPowerClient;
-
- documentSubclassificationsList: DocumentSubclassification[];
- availableDocumentSubclassifications: DocumentSubclassification[];
- subCategoryCodeDisabled: boolean = true;
-
- /*
- * Constructor & Initialisers
- */
- constructor(
- private fb: FormBuilder,
- private documentClassificationsService: DocumentClassificationsService,
- private categoriesService: CategoriesService,
- private iPowerClientsService: IpowerClientsService,
- private documentSubclassificationsService: DocumentSubclassificationsService,
- private errorHandlingService: ErrorHandlingService
- ) { }
-
- ngOnInit(): void {
- this.initData();
- this.initValidators()
- this.excludeFields();
- }
-
- initData() {
- this.documentClassificationsService.getAll().subscribe(
- value => this.documentClassificationsList = value,
- err => this.errorHandlingService.showHttpResponseError(err)
- );
-
- // This is NOT the list of Subclassifications used for the dropdown.
- this.documentSubclassificationsService.getAll().subscribe(
- value => this.documentSubclassificationsList = value,
- err => this.errorHandlingService.showHttpResponseError(err)
- );
- }
-
- // TODO: Have this mechanism offer the use of custom validators too.
- initValidators() {
-
- if (!this.requiredFields) { return; }
-
- // In a true/false case.
- if (typeof this.requiredFields == 'boolean') {
- // If true, enable the required validator for all controls.
- if (this.requiredFields) {
- Object.keys(this.templateForm.controls).forEach(key => this.templateForm.controls[key].setValidators(Validators.required));
- }
-
- // If false, do nothing.
- return;
- }
-
- // If it was a string array, enable the validators for all provided field-names.
- (this.requiredFields).forEach(field => this.templateForm.controls[field].setValidators(Validators.required))
- }
-
- excludeFields() {
- if (!this.excludedFormControls) { return; }
- this.excludedFormControls.forEach(field => this.templateForm.removeControl(field));
- }
-
- /*
- * Auto-suggest & Auto-complete Category
- */
- autosuggestCategoryName(event) {
-
- if (!event.query || event.query.length < 3) {
- this.categoryNameSuggestions = [];
- return;
- }
-
- let classId = this.templateForm.get('documentClassification').value ? this.templateForm.get('documentClassification').value.classificationId : null;
- this.categoriesService.autosuggestCategoryName(event.query, classId).subscribe(
- (values: Category[]) => {
- let temp: string[] = [];
- this.categorySuggestions = values;
- values.map(val => temp.push(val.categoryName));
- this.categoryNameSuggestions = temp
- },
- err => this.errorHandlingService.showHttpResponseError(err)
- );
- }
-
- autosuggestCategoryCode(event) {
-
- if (event.query.length < 3) {
- this.categoryCodeSuggestions = [];
- return;
- }
-
- let classId = this.templateForm.get('documentClassification').value ? this.templateForm.get('documentClassification').value.classificationId : null;
- this.categoriesService.autosuggestCategoryCode(event.query, classId).subscribe(
- (values: Category[]) => {
- let temp: string[] = [];
- this.categorySuggestions = values;
- values.map(val => temp.push(val.categoryCode));
- this.categoryCodeSuggestions = temp
- },
- err => this.errorHandlingService.showHttpResponseError(err)
- );
- }
-
- categoryNameSelected(name: string) {
- this.selectedCategory = this.categorySuggestions.find(cat => cat.categoryName == name);
- this.templateForm.get('categoryCode')?.patchValue(this.selectedCategory.categoryCode);
- this.templateForm.updateValueAndValidity();
- }
-
- categoryCodeSelected(code: string) {
- this.selectedCategory = this.categorySuggestions.find(cat => cat.categoryCode == code);
- this.templateForm.get('categoryName')?.patchValue(this.selectedCategory?.categoryName);
- this.templateForm.updateValueAndValidity();
- }
-
- /*
- * Auto-suggest & Auto-complete IPower Client
- */
- autosuggestIPowerClientName(event): void {
-
- if (!event.query || event.query.length < 3) {
- this.iPowerClientNameSuggestions = [];
- return;
- }
-
- this.iPowerClientsService.getClientsByNameOnly(event.query).subscribe(
- (values: IPowerClient[]) => {
- this.iPowerClientSuggestions = values;
-
- const temp: string[] = [];
- values.map(val => temp.push(val.name));
- this.iPowerClientNameSuggestions = temp;
- },
- err => this.errorHandlingService.showHttpResponseError(err)
- );
-}
-
- autosuggestIPowerClientCode(event): void {
-
- if (event.query.length < 3) {
- this.iPowerClientCodeSuggestions = [];
- return;
- }
-
- this.iPowerClientsService.getClientsByCodeOnly(event.query).subscribe(
- (values: IPowerClient[]) => {
- this.iPowerClientSuggestions = values;
-
- const temp: string[] = [];
- values.map(val => temp.push(val.clientCode));
- this.iPowerClientCodeSuggestions = temp;
- },
- err => this.errorHandlingService.showHttpResponseError(err)
- );
- }
-
- iPowerClientNameSelected(name: string) {
- this.selectedIPowerClient = this.iPowerClientSuggestions.find(client => client.name == name);
- this.templateForm.get('iPowerClientCode')?.patchValue(this.selectedIPowerClient ? this.selectedIPowerClient.clientCode : '');
- this.templateForm.updateValueAndValidity();
- }
-
- iPowerClientCodeSelected(code: string) {
- this.selectedIPowerClient = this.iPowerClientSuggestions.find(client => client.clientCode == code);
- this.templateForm.get('iPowerClientName')?.patchValue(this.selectedIPowerClient ? this.selectedIPowerClient.name : '');
- this.templateForm.updateValueAndValidity();
- }
-
- /*
- * Other Methods
- */
- documentClassificationSelected(selection: DocumentClassification) {
- this.availableDocumentSubclassifications = this.documentSubclassificationsList.filter(element => element.documentClassification.classificationId == selection.classificationId);
- this.templateForm.get('documentSubclassification')?.setValue(this.availableDocumentSubclassifications[0]); //TODO CHECK
- this.subCategoryCodeDisabled = false;
- }
-
- /*
- * Utility Methods
- */
- // Auto-suggest inputs - We have to ensure our reactive form holds values that represent the selectedCategory, otherwise truncate it.
- syncSelectedCategory() {
-
- // Ιf our form has no value, truncate the selectedCategory either way.
- if (!this.templateForm.get('categoryName')?.value && !this.templateForm.get('categoryCode').value) {
- this.selectedCategory = null;
- return;
- }
-
- // If both or either of our form's values match the selectedCategory's and the other one doesn't have a value, all is good.
- // Just sync the values in case one is missing. Otherwise truncate the selectedCategory.
- if (
- this.templateForm.get('categoryName')?.value == this.selectedCategory.categoryName
- || this.templateForm.get('categoryCode')?.value == this.selectedCategory.categoryCode
- ) {
- this.selectedCategory.categoryName = this.templateForm.get('categoryName')?.value;
- this.selectedCategory.categoryCode = this.templateForm.get('categoryCode')?.value;
- }
-
- // If both our values were different from the selectedCategory's, truncate it. This is an extremely abnormal scenario.
- else {
- console.error('WARNING - syncSelectedCategory()', 'Both of our form\'s values were different from the selectedCategory\'s.');
- this.selectedCategory = null;
- this.templateForm.get('categoryName')?.setValue('');
- this.templateForm.get('categoryCode')?.setValue('');
- this.templateForm.updateValueAndValidity();
- }
- }
-
- // Auto-suggest inputs - We have to ensure our reactive form holds values that represent the selectedIPowerClient, otherwise truncate it.
- syncSelectedIPowerClient() {
-
- // Ιf our form has no value, truncate the selectedIPowerClient either way.
- if (!this.templateForm.get('iPowerClientName')?.value && !this.templateForm.get('iPowerClientCode')?.value) {
- this.selectedIPowerClient = null;
- return;
- }
-
- // If both or either of our form's values match the selectedIPowerClient's and the other one doesn't have a value, all is good.
- // Just sync the values in case one is missing. Otherwise truncate the selectedIPowerClient.
- if (
- this.templateForm.get('iPowerClientName')?.value == this.selectedIPowerClient.name
- || this.templateForm.get('iPowerClientCode')?.value == this.selectedIPowerClient.clientCode
- ) {
- this.selectedIPowerClient.name = this.templateForm.get('iPowerClientName')?.value;
- this.selectedIPowerClient.clientCode = this.templateForm.get('iPowerClientCode')?.value;
- }
-
- // If both our values were different from the selectedIPowerClient's, truncate it. This is an extremely abnormal scenario.
- else {
- console.error('WARNING - syncSelectedIPowerClient()', 'Both of our form\'s values were different from the selectedIPowerClient\'s.');
- this.selectedIPowerClient = null;
- this.templateForm.get('iPowerClientName')?.setValue('');
- this.templateForm.get('iPowerClientCode')?.setValue('');
- this.templateForm.updateValueAndValidity();
- }
- }
-
- /*
- * API methods
- */
- public resetForm(): void {
- this.templateForm.reset();
- this.selectedCategory = null;
- this.selectedIPowerClient = null;
- }
-
- public formValue(): Template {
-
- // A field ('documentSubclassification') may be excluded, so we have to check for that too.
- let subCatCode = this.templateForm.get('documentSubclassification') ? this.templateForm.get('documentSubclassification').value : null;
- let abbyy = this.templateForm.get('abbyyTemplateCode') ? this.templateForm.get('abbyyTemplateCode').value : null;
- let docClass = this.templateForm.get('documentClassification') ? this.templateForm.get('documentClassification').value : null;
-
- // We keep track of those two using object-variables separate from our ReactiveForm.
- // Thus, we now have to make sure the ReactiveForm really has values that match those objects, before we forward them.
- // Also, keep in mind that our auto-suggest inputs limit the user in choosing one of their values.
- this.syncSelectedCategory();
- this.syncSelectedIPowerClient();
-
- let formValue: Template = {
- id: this.initiallySetFormValue ? this.initiallySetFormValue.id : null,
- category: this.selectedCategory,
- subCategoryCode: subCatCode ? subCatCode.subclassificationName : '',
- abbyyTemplate: abbyy,
- client: this.selectedIPowerClient,
- documentClassification: docClass
- };
-
- return formValue;
- }
-
- public setValue(value: Template): void {
- if (!value) {
- return;
- }
-
- this.initiallySetFormValue = value;
-
- // If a documentClassification is already selected, enable the subclassification dropdown.
- this.subCategoryCodeDisabled = !value.documentClassification;
-
- this.templateForm.get('documentClassification')?.setValue(value.documentClassification);
- // Having set the documentClassification -and provided there was one- we must also set the availableDocumentSubclassifications.
- this.availableDocumentSubclassifications = this.documentSubclassificationsList.filter(element =>
- element.documentClassification.classificationId == value.documentClassification.classificationId
- );
-
- this.selectedCategory = value.category;
- this.templateForm.get('categoryName')?.setValue(value.category.categoryName);
- this.templateForm.get('categoryCode')?.setValue(value.category.categoryCode);
-
- this.selectedIPowerClient = value.client;
- this.templateForm.get('iPowerClientName')?.setValue(value.client.name);
- this.templateForm.get('iPowerClientCode')?.setValue(value.client.clientCode);
-
- this.templateForm.get('abbyyTemplateCode')?.setValue(value.abbyyTemplate);
-
- // To set the subcategory/subclassification we also have to make sure the documentClassification is the same.
- // WARNING: Since we have enabled the [forceSelection] option of the ,
- // if the availableDocumentSubclassifications are not set, documentSubclassification won't be displayed.
- this.templateForm.get('documentSubclassification').setValue(
- this.documentSubclassificationsList.find(subClass => (
- subClass.subclassificationName == value.subCategoryCode && subClass.documentClassification.classificationId == value.documentClassification.classificationId
- ))
- );
-
- this.templateForm.updateValueAndValidity();
- }
-
- public isValid(): boolean {
- return this.templateForm.valid;
- }
-}
diff --git a/app/features/administration/forms/verification-rule-form/create-verification-rule-form-value.interface.ts b/app/features/administration/forms/verification-rule-form/create-verification-rule-form-value.interface.ts
deleted file mode 100644
index 15effb2..0000000
--- a/app/features/administration/forms/verification-rule-form/create-verification-rule-form-value.interface.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { JournalVerification } from './../../../../shared/models/journal-verification.interface';
-import { CapturingVerification } from './../../../../shared/models/capturing-verification.interface';
-import { Template } from 'src/app/shared/models/template.interface';
-
-export interface CreateVerificationRuleFormValue {
- id: number;
- confidenceLevelMinThreshold: number;
- clientId: string
- categoryId: number;
- subCategoryCode: string;
- verificationRuleStatus: string;
- capturingVerification: CapturingVerification;
- journalVerification: JournalVerification;
- alteryxRoutineId: string;
- template: Template;
-}
diff --git a/app/features/administration/forms/verification-rule-form/verification-rule-form.component.html b/app/features/administration/forms/verification-rule-form/verification-rule-form.component.html
deleted file mode 100644
index 24a954f..0000000
--- a/app/features/administration/forms/verification-rule-form/verification-rule-form.component.html
+++ /dev/null
@@ -1,200 +0,0 @@
-
-
-
-
-
-
-
- Document Classification
-
-
-
-
-
-
-
-
-
-
-
- iPower Client Name
-
-
-
-
-
-
-
-
-
- iPower Client Code
-
-
-
-
-
-
-
-
-
-
-
- Category Name
-
-
-
-
-
-
-
-
-
- Category Code
-
-
-
-
-
-
-
-
-
-
-
- Sub-Category Name
-
-
-
-
-
-
-
-
-
-
-
- Capturing Verification
-
-
-
-
-
-
-
-
-
- Journal Verification
-
-
-
-
-
-
-
-
-
-
-
- Confidence Level
-
-
-
-
-
-
-
-
- Alteryx Routine Name
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/features/administration/forms/verification-rule-form/verification-rule-form.component.scss b/app/features/administration/forms/verification-rule-form/verification-rule-form.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/administration/forms/verification-rule-form/verification-rule-form.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/administration/forms/verification-rule-form/verification-rule-form.component.spec.ts b/app/features/administration/forms/verification-rule-form/verification-rule-form.component.spec.ts
deleted file mode 100644
index 72905b0..0000000
--- a/app/features/administration/forms/verification-rule-form/verification-rule-form.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { VerificationRuleFormComponent } from './verification-rule-form.component';
-
-describe('VerificationRuleFormComponent', () => {
- let component: VerificationRuleFormComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ VerificationRuleFormComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(VerificationRuleFormComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/administration/forms/verification-rule-form/verification-rule-form.component.ts b/app/features/administration/forms/verification-rule-form/verification-rule-form.component.ts
deleted file mode 100644
index 8cace4e..0000000
--- a/app/features/administration/forms/verification-rule-form/verification-rule-form.component.ts
+++ /dev/null
@@ -1,527 +0,0 @@
-import { Right } from './../../../../shared/models/right.interface';
-import { environment } from './../../../../../environments/environment';
-import { USER_RIGHTS } from './../../../../shared/enums/USER_RIGHTS.enum';
-import { AuthService } from 'src/app/shared/services/auth.service';
-import { CreateVerificationRuleFormValue } from './create-verification-rule-form-value.interface';
-import { JournalVerificationsService } from './../../../../shared/services/administration/journal-verifications.service';
-import { CapturingVerificationsService } from './../../../../shared/services/administration/capturing-verifications.service';
-import { DocumentSubclassificationsService } from 'src/app/shared/services/administration/document-subclassifications.service';
-import { IpowerClientsService } from 'src/app/shared/services/administration/ipower-clients.service';
-import { CategoriesService } from 'src/app/shared/services/administration/categories.service';
-import { DocumentClassificationsService } from 'src/app/shared/services/administration/document-classifications.service';
-import { FormBuilder, Validators } from '@angular/forms';
-import { DocumentSubclassification } from 'src/app/shared/models/document-subclassification.interface';
-import { Component, Input, OnInit } from '@angular/core';
-import { CapturingVerification } from '../../../../shared/models/capturing-verification.interface';
-import { Category } from '../../../../shared/models/category.interface';
-import { IPowerClient } from '../../../../shared/models/ipower-client.interface';
-import { JournalVerification } from '../../../../shared/models/journal-verification.interface';
-import { VerificationRule } from './../../../../shared/models/verification-rule.interface';
-import { DocumentClassification } from '../../../../shared/models/document-classification.interface';
-import { ErrorHandlingService } from 'src/app/shared/services/error-handling/error-handling.service';
-import { Observable } from 'rxjs';
-
-@Component({
- selector: 'app-verification-rule-form',
- templateUrl: './verification-rule-form.component.html',
- styleUrls: ['./verification-rule-form.component.scss']
-})
-export class VerificationRuleFormComponent implements OnInit {
-
- /*
- * Inputs
- */
- @Input() dialogLayout: boolean = false; // Controls .scss classes to allow for better dispay in a dialog.
- @Input() requiredFields: string[] | boolean = false; // True/False indicates that all/none are required. String[] specifies the form controls required.
- @Input() displayValidationMessagesEvenIfPristine: boolean = false; // Serves for manually treating the controls as dirty.
- @Input() excludedFormControls: string[]; // Specifies the form controls to be removed and NOT displayed.
-
- /*
- * Reactive Form
- */
- verificationRuleForm = this.fb.group({
- documentClassification: [null],
- ipowerName: [null],
- ipowerCode: [null],
- categoryName: [null],
- categoryCode: [null],
- subCategoryCode: [null], // This actually represents the complete DocumentSubclassification object.
- confidenceLevelMinThreshold: [null],
- capturingVerification: [null],
- journalVerification: [null],
- alteryxRoutineId: [null],
- verificationRuleStatus: [true],
- template: [null]
- });
- initiallySetFormValue: VerificationRule;
- editMode: boolean = false;
-
- /*
- * Other Variables
- */
- documentClassificationsList: DocumentClassification[];
-
- categoryNameSuggestions: string[];
- categoryCodeSuggestions: string[];
- categorySuggestions: Category[];
- selectedCategory: Category;
-
- iPowerClientNameSuggestions: string[];
- iPowerClientCodeSuggestions: string[];
- iPowerClientSuggestions: IPowerClient[];
- selectedIPowerClient: IPowerClient;
-
- capturingVerificationsList: CapturingVerification[];
- journalVerificationsList: JournalVerification[];
-
- documentSubclassificationsList: DocumentSubclassification[];
- availableDocumentSubclassifications: DocumentSubclassification[];
- subCategoryCodeDisabled: boolean = true;
-
- /*
- * Constructor & Initialisers
- */
- constructor(
- private fb: FormBuilder,
- private documentClassificationsService: DocumentClassificationsService,
- private categoriesService: CategoriesService,
- private iPowerClientsService: IpowerClientsService,
- private documentSubclassificationsService: DocumentSubclassificationsService,
- private capturingVerificationsService: CapturingVerificationsService,
- private journalVerificationsService: JournalVerificationsService,
- private authService: AuthService,
- private errorHandlingService: ErrorHandlingService
-
- ) { }
-
- ngOnInit(): void {
- this.initData();
- this.initValidators()
- this.excludeFields();
- }
-
- initData() {
- this.documentClassificationsService.getAll().subscribe(
- value => this.documentClassificationsList = value,
- err => this.errorHandlingService.showHttpResponseError(err)
- );
-
- // This is NOT the list of Subclassifications used for the dropdown.
- this.documentSubclassificationsService.getAll().subscribe(
- value => this.documentSubclassificationsList = value,
- err => this.errorHandlingService.showHttpResponseError(err)
- );
-
- this.journalVerificationsService.getJournalVerifications().subscribe(
- values => this.journalVerificationsList = values,
- err => this.errorHandlingService.showHttpResponseError(err)
- );
-
- this.capturingVerificationsService.getCapturingVerifications().subscribe(
- values => this.capturingVerificationsList = values,
- err => this.errorHandlingService.showHttpResponseError(err)
- );
- }
-
- // TODO: Have this mechanism offer the use of custom validators too.
- initValidators() {
-
- if (!this.requiredFields) { return; }
-
- // In a true/false case.
- if (typeof this.requiredFields == 'boolean') {
- // If true, enable the required validator for all controls.
- if (this.requiredFields) {
- Object.keys(this.verificationRuleForm.controls).forEach(key => this.verificationRuleForm.controls[key].setValidators(Validators.required));
- }
-
- // If false, do nothing.
- return;
- }
-
- // If it was a string array, enable the validators for all provided field-names.
- (this.requiredFields).forEach(field => this.verificationRuleForm.controls[field].setValidators(Validators.required))
- }
-
- excludeFields() {
- if (!this.excludedFormControls) { return; }
- this.excludedFormControls.forEach(field => this.verificationRuleForm.removeControl(field));
- }
-
- /*
- * Auto-suggest & Auto-complete Category
- */
- autosuggestCategoryName(event) {
-
- if (!event.query || event.query.length < 3) {
- this.categoryNameSuggestions = [];
- return;
- }
-
- let classId = this.verificationRuleForm.get('documentClassification').value ? this.verificationRuleForm.get('documentClassification').value.classificationId : null;
- this.categoriesService.autosuggestCategoryName(event.query, classId).subscribe(
- (values: Category[]) => {
- let temp: string[] = [];
- this.categorySuggestions = values;
- values.map(val => temp.push(val.categoryName));
- this.categoryNameSuggestions = temp
- },
- err => this.errorHandlingService.showHttpResponseError(err)
- );
- }
-
- autosuggestCategoryCode(event) {
-
- if (event.query.length < 3) {
- this.categoryCodeSuggestions = [];
- return;
- }
-
- let classId = this.verificationRuleForm.get('documentClassification').value ? this.verificationRuleForm.get('documentClassification').value.classificationId : null;
- this.categoriesService.autosuggestCategoryCode(event.query, classId).subscribe(
- (values: Category[]) => {
- let temp: string[] = [];
- this.categorySuggestions = values;
- values.map(val => temp.push(val.categoryCode));
- this.categoryCodeSuggestions = temp
- },
- err => this.errorHandlingService.showHttpResponseError(err)
- );
- }
-
- categoryNameSelected(name: string) {
- this.selectedCategory = this.categorySuggestions.find(cat => cat.categoryName == name);
- this.verificationRuleForm.get('categoryCode').patchValue(this.selectedCategory.categoryCode);
- this.verificationRuleForm.updateValueAndValidity();
- }
-
- categoryCodeSelected(code: string) {
- this.selectedCategory = this.categorySuggestions.find(cat => cat.categoryCode == code);
- this.verificationRuleForm.get('categoryName').patchValue(this.selectedCategory.categoryName);
- this.verificationRuleForm.updateValueAndValidity();
- }
-
- // /*
- // * Auto-suggest & Auto-complete IPower Client
- // */
- // /*
- // * Rights-check Warning:
- // * If we are NOT in editMode (and are thus on "addMode"), we should only suggest clients for which we actually CAN add a new rule.
- // * Note:
- // * I know that if on editMode the client-input is disabled and thus this check is redundant,
- // * but I think it is better to work with as an abstract perspective as possible, not entailing business logic that may either be unrelated or prone to changes.
- // */
- // autosuggestIPowerClientName(event) {
-
- // if (!event.query || event.query.length < 3) {
- // this.iPowerClientNameSuggestions = [];
- // return;
- // }
-
- // // If the user has the right to preview all rules (B01), we use the endpoint that returns all iPowerClients,
- // // otherwise, the one that checks for the user's User_Access too. Whether the user can see ANY rule has already been handled by the 'search' button.
- // let endpointToSubscribeTo: Observable = USER_RIGHTS.B01.isGrantedToUser(
- // this.authService.userRights.find(rbc => rbc.client.id == environment.globalRightsClientID)?.rights
- // )
- // ? this.iPowerClientsService.getClientsByNameOnly(event.query)
- // : this.iPowerClientsService.getClientsByNameDistinct(event.query);
-
- // endpointToSubscribeTo.subscribe(
- // (values: IPowerClient[]) => {
-
- // // ***See comment at method level***
- // if (!this.editMode) {
- // values = values.filter(client => USER_RIGHTS.B03.isGrantedToUser(
- // this.authService.userRights.find(rdc => rdc.client.id == client.id)?.rights
- // ));
- // }
-
- // let temp: string[] = [];
- // this.iPowerClientSuggestions = values;
- // values.map(val => temp.push(val.name));
- // this.iPowerClientNameSuggestions = temp
- // },
- // err => this.errorHandlingService.showHttpResponseError(err)
- // );
- // }
-
- // /*
- // * Rights-check Warning:
- // * If we are NOT in editMode (and are thus on "addMode"), we should only suggest clients for which we actually CAN add a new rule.
- // * Note:
- // * I know that if on editMode the client-input is disabled and thus this check is redundant,
- // * but I think it is better to work with as an abstract perspective as possible, not entailing business logic that may either be unrelated or prone to changes.
- // */
- // autosuggestIPowerClientCode(event) {
-
- // if (event.query.length < 3) {
- // this.iPowerClientCodeSuggestions = [];
- // return;
- // }
-
- // // If the user has the right to preview all rules (B01), we use the endpoint that returns all iPowerClients,
- // // otherwise, the one that checks for the user's User_Access too. Whether the user can see ANY rule has already been handled by the 'search' button.
- // let endpointToSubscribeTo: Observable = USER_RIGHTS.B01.isGrantedToUser(
- // this.authService.userRights.find(rbc => rbc.client.id == environment.globalRightsClientID)?.rights
- // )
- // ? this.iPowerClientsService.getClientsByCodeOnly(event.query): null;
-
- // endpointToSubscribeTo.subscribe(
- // (values: IPowerClient[]) => {
-
- // // ***See comment at method level***
- // if (!this.editMode) {
- // values = values;
- // }
-
- // let temp: string[] = [];
- // this.iPowerClientSuggestions = values;
- // values.map(val => temp.push(val.clientCode));
- // this.iPowerClientCodeSuggestions = temp
- // },
- // err => this.errorHandlingService.showHttpResponseError(err)
- // );
- // }
-
-
- /*
- * Auto-suggest & Auto-complete IPower Client
- */
- autosuggestIPowerClientName(event): void {
-
- if (!event.query || event.query.length < 3) {
- this.iPowerClientNameSuggestions = [];
- return;
- }
-
- this.iPowerClientsService.getClientsByNameOnly(event.query).subscribe(
- (values: IPowerClient[]) => {
- this.iPowerClientSuggestions = values;
-
- const temp: string[] = [];
- values.map(val => temp.push(val.name));
- this.iPowerClientNameSuggestions = temp;
- },
- err => this.errorHandlingService.showHttpResponseError(err)
- );
-}
-
- autosuggestIPowerClientCode(event): void {
-
- if (event.query.length < 3) {
- this.iPowerClientCodeSuggestions = [];
- return;
- }
-
- this.iPowerClientsService.getClientsByCodeOnly(event.query).subscribe(
- (values: IPowerClient[]) => {
- this.iPowerClientSuggestions = values;
-
- const temp: string[] = [];
- values.map(val => temp.push(val.clientCode));
- this.iPowerClientCodeSuggestions = temp;
- },
- err => this.errorHandlingService.showHttpResponseError(err)
- );
- }
-
- iPowerClientNameSelected(name: string) {
- this.selectedIPowerClient = this.iPowerClientSuggestions.find(client => client.name == name);
- this.verificationRuleForm.get('ipowerCode').patchValue(this.selectedIPowerClient.clientCode);
- this.verificationRuleForm.updateValueAndValidity();
- }
-
- iPowerClientCodeSelected(code: string) {
- this.selectedIPowerClient = this.iPowerClientSuggestions.find(client => client.clientCode == code);
- this.verificationRuleForm.get('ipowerName').patchValue(this.selectedIPowerClient.name);
- this.verificationRuleForm.updateValueAndValidity();
- }
-
- /*
- * Other Methods
- */
- documentClassificationSelected(selection) {
- this.availableDocumentSubclassifications = this.documentSubclassificationsList.filter(element => element.documentClassification.classificationId == selection.value.classificationId);
- this.verificationRuleForm.get('subCategoryCode').setValue(this.availableDocumentSubclassifications[0]);
- this.subCategoryCodeDisabled = false;
- }
-
- /*
- * Utility Methods
- */
- initiateEditMode() {
- // let controlsToDisableInEditMode = ['documentClassification', 'ipowerName', 'ipowerCode', 'categoryName', 'categoryCode', 'subCategoryCode']
- // controlsToDisableInEditMode.forEach(ctrl => this.verificationRuleForm.get(ctrl).disable());
- }
-
-
- // Auto-suggest inputs - We have to ensure our reactive form holds values that represent the selectedCategory, otherwise truncate it.
- syncSelectedCategory() {
-
- // Ιf our form has no value, truncate the selectedCategory either way.
- if (!this.verificationRuleForm.get('categoryName').value && !this.verificationRuleForm.get('categoryCode').value) {
- this.selectedCategory = null;
- return;
- }
-
- // If both or either of our form's values match the selectedCategory's and the other one doesn't have a value, all is good.
- // Just sync the values in case one is missing. Otherwise truncate the selectedCategory.
- if (
- this.verificationRuleForm.get('categoryName').value == this.selectedCategory.categoryName
- || this.verificationRuleForm.get('categoryCode').value == this.selectedCategory.categoryCode
- ) {
- this.selectedCategory.categoryName = this.verificationRuleForm.get('categoryName').value;
- this.selectedCategory.categoryCode = this.verificationRuleForm.get('categoryCode').value;
- }
-
- // If both our values were different from the selectedCategory's, truncate it. This is an extremely abnormal scenario.
- else {
- console.error('WARNING - syncSelectedCategory()', 'Both of our form\'s values were different from the selectedCategory\'s.');
- this.selectedCategory = null;
- this.verificationRuleForm.get('categoryName').setValue('');
- this.verificationRuleForm.get('categoryCode').setValue('');
- this.verificationRuleForm.updateValueAndValidity();
- }
- }
-
- // Auto-suggest inputs - We have to ensure our reactive form holds values that represent the selectedIPowerClient, otherwise truncate it.
- syncSelectedIPowerClient() {
-
- // Ιf our form has no value, truncate the selectedIPowerClient either way.
- if (!this.verificationRuleForm.get('ipowerName').value && !this.verificationRuleForm.get('ipowerCode').value) {
- this.selectedIPowerClient = null;
- return;
- }
-
- // If both or either of our form's values match the selectedIPowerClient's and the other one doesn't have a value, all is good.
- // Just sync the values in case one is missing. Otherwise truncate the selectedIPowerClient.
- if (
- this.verificationRuleForm.get('ipowerName').value == this.selectedIPowerClient.name
- || this.verificationRuleForm.get('ipowerCode').value == this.selectedIPowerClient.clientCode
- ) {
- this.selectedIPowerClient.name = this.verificationRuleForm.get('ipowerName').value;
- this.selectedIPowerClient.clientCode = this.verificationRuleForm.get('ipowerCode').value;
- }
-
- // If both our values were different from the selectedIPowerClient's, truncate it. This is an extremely abnormal scenario.
- else {
- console.error('WARNING - syncSelectedIPowerClient()', 'Both of our form\'s values were different from the selectedIPowerClient\'s.');
- this.selectedIPowerClient = null;
- this.verificationRuleForm.get('ipowerName').setValue('');
- this.verificationRuleForm.get('ipowerCode').setValue('');
- this.verificationRuleForm.updateValueAndValidity();
- }
- }
-
- /*
- * Rights-check Methods
- */
- canEditRuleStatus(): boolean {
- if (this.initiallySetFormValue) {
- return this.authService.userHasRightForClient(USER_RIGHTS.B06, environment.globalRightsClientID);
- }
- return false;
- }
-
- // canEditConfidenceLevel(): boolean {
- // if (this.initiallySetFormValue) {
- // return this.authService.userHasRightForClient(USER_RIGHTS.B07, this.initiallySetFormValue.client.id);
- // }
- // return false;
- // }
-
- /*
- * API methods
- */
- public resetForm(): void {
- this.verificationRuleForm.reset();
- this.selectedCategory = null;
- this.selectedIPowerClient = null;
- this.editMode = null;
- }
-
- public formValue(): CreateVerificationRuleFormValue {
-
- // We keep track of those two using object-variables separate from our ReactiveForm.
- // Thus, we now have to make sure the ReactiveForm really has values that match those objects, before we forward them.
- // Also, keep in mind that our auto-suggest inputs limit the user in choosing one of their values.
- this.syncSelectedCategory();
- this.syncSelectedIPowerClient();
-
- let formValue: CreateVerificationRuleFormValue = {
- id: this.initiallySetFormValue ? this.initiallySetFormValue.id : null,
- confidenceLevelMinThreshold: this.verificationRuleForm.get('confidenceLevelMinThreshold').value,
- clientId: this.selectedIPowerClient ? this.selectedIPowerClient.id : null,
- categoryId: this.selectedCategory ? this.selectedCategory.id : null,
- // The backend only requires the subcategory's name, and not the whole object. Don't ask me.
- subCategoryCode: this.verificationRuleForm.get('subCategoryCode').value ? this.verificationRuleForm.get('subCategoryCode').value['subclassificationName'] : '',
- capturingVerification: this.verificationRuleForm.get('capturingVerification').value,
- journalVerification: this.verificationRuleForm.get('journalVerification').value,
- alteryxRoutineId: this.verificationRuleForm.get('alteryxRoutineId').value,
- template: this.verificationRuleForm.get('template').value,
-
- // Convert 'verificationRuleStatus' from boolean to string.
- verificationRuleStatus: this.verificationRuleForm.get('verificationRuleStatus').value ? 'Enabled' : 'Disabled'
- };
-
- return formValue;
- }
-
- public setValue(value: VerificationRule): void {
- if (!value) {
- return;
- }
-
- this.editMode = true;
- this.initiateEditMode();
-
- this.initiallySetFormValue = value
-
- // If a documentClassification is already selected, enable the subclassification dropdown.
- this.subCategoryCodeDisabled = !value.docClassificationCategory;
-
- this.verificationRuleForm.get('documentClassification').setValue(value.docClassificationCategory);
- // Having set the documentClassification -and provided there was one- we must also set the availableDocumentSubclassifications.
- this.availableDocumentSubclassifications = this.documentSubclassificationsList.filter(element =>
- element.documentClassification.classificationId == value.docClassificationCategory.classificationId
- );
-
- this.verificationRuleForm.get('ipowerName').setValue(value.client.name);
- this.verificationRuleForm.get('ipowerCode').setValue(value.client.clientCode);
- this.selectedIPowerClient = value.client;
-
- this.verificationRuleForm.get('categoryName').setValue(value.template.category.categoryName);
- this.verificationRuleForm.get('categoryCode').setValue(value.template.category.categoryCode);
- this.selectedCategory = value.template.category;
-
- this.verificationRuleForm.get('confidenceLevelMinThreshold').setValue(value.confidenceLevelMinThreshold);
- this.verificationRuleForm.get('capturingVerification').setValue(value.capturingVerification);
- this.verificationRuleForm.get('journalVerification').setValue(value.journalVerification);
- this.verificationRuleForm.get('alteryxRoutineId').setValue(value.alteryxRoutineId);
- this.verificationRuleForm.get('template').setValue(value.template);
-
- // Convert 'verificationRuleStatus' from string to boolean.
- this.verificationRuleForm.get('verificationRuleStatus').setValue(value.verificationRuleStatus.trim().toLowerCase() == 'enabled');
-
- // To set the subcategory/subclassification we also have to make sure the documentClassification is the same.
- // WARNING: Since we have enabled the [forceSelection] option of the ,
- // if the availableDocumentSubclassifications are not set, documentSubclassification won't be displayed.
- this.verificationRuleForm.get('subCategoryCode').setValue(
- this.documentSubclassificationsList.find(subClass =>
- subClass.subclassificationName == value.template.subCategoryCode && subClass.documentClassification.classificationId == value.docClassificationCategory.classificationId
- )
- );
-
- this.verificationRuleForm.updateValueAndValidity();
- }
-
- public isValid(): boolean {
- return this.verificationRuleForm.valid;
- }
-
- public initForCreation() {
- this.editMode = false;
- this.verificationRuleForm.get('verificationRuleStatus').setValue(true); // The default value in creation mode.
- this.verificationRuleForm.get('template').setValidators(null); // 'template' is not required during the creation.
- }
-}
diff --git a/app/features/administration/forms/verification-rule-search-form/verification-rule-search-form-value.interface.ts b/app/features/administration/forms/verification-rule-search-form/verification-rule-search-form-value.interface.ts
deleted file mode 100644
index e85ce19..0000000
--- a/app/features/administration/forms/verification-rule-search-form/verification-rule-search-form-value.interface.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-export interface VerificationRuleSearchFormValue {
- clientId: string;
- categoryId: number;
- docClassificationId: number;
- docSubcategory: string;
-}
diff --git a/app/features/administration/forms/verification-rule-search-form/verification-rule-search-form.component.html b/app/features/administration/forms/verification-rule-search-form/verification-rule-search-form.component.html
deleted file mode 100644
index 8dc8f63..0000000
--- a/app/features/administration/forms/verification-rule-search-form/verification-rule-search-form.component.html
+++ /dev/null
@@ -1,93 +0,0 @@
-
diff --git a/app/features/administration/forms/verification-rule-search-form/verification-rule-search-form.component.scss b/app/features/administration/forms/verification-rule-search-form/verification-rule-search-form.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/administration/forms/verification-rule-search-form/verification-rule-search-form.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/administration/forms/verification-rule-search-form/verification-rule-search-form.component.spec.ts b/app/features/administration/forms/verification-rule-search-form/verification-rule-search-form.component.spec.ts
deleted file mode 100644
index 57f9051..0000000
--- a/app/features/administration/forms/verification-rule-search-form/verification-rule-search-form.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { VerificationRuleSearchFormComponent } from './verification-rule-search-form.component';
-
-describe('VerificationRuleSearchFormComponent', () => {
- let component: VerificationRuleSearchFormComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ VerificationRuleSearchFormComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(VerificationRuleSearchFormComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/administration/forms/verification-rule-search-form/verification-rule-search-form.component.ts b/app/features/administration/forms/verification-rule-search-form/verification-rule-search-form.component.ts
deleted file mode 100644
index 5a82974..0000000
--- a/app/features/administration/forms/verification-rule-search-form/verification-rule-search-form.component.ts
+++ /dev/null
@@ -1,358 +0,0 @@
-import { VerificationRulesService } from './../../../../shared/services/administration/verification-rules.service';
-import { VerificationRule } from './../../../../shared/models/verification-rule.interface';
-import { Component, Input, OnInit } from '@angular/core';
-import { AbstractControl, FormBuilder } from '@angular/forms';
-import { Category } from 'src/app/shared/models/category.interface';
-import { DocumentClassification } from 'src/app/shared/models/document-classification.interface';
-import { DocumentSubclassification } from 'src/app/shared/models/document-subclassification.interface';
-import { IPowerClient } from 'src/app/shared/models/ipower-client.interface';
-import { CategoriesService } from 'src/app/shared/services/administration/categories.service';
-import { DocumentClassificationsService } from 'src/app/shared/services/administration/document-classifications.service';
-import { DocumentSubclassificationsService } from 'src/app/shared/services/administration/document-subclassifications.service';
-import { IpowerClientsService } from 'src/app/shared/services/administration/ipower-clients.service';
-import { VerificationRuleSearchFormValue } from './verification-rule-search-form-value.interface';
-import { ErrorHandlingService } from 'src/app/shared/services/error-handling/error-handling.service';
-import { USER_RIGHTS } from 'src/app/shared/enums/USER_RIGHTS.enum';
-import { AuthService } from 'src/app/shared/services/auth.service';
-import { Observable } from 'rxjs';
-import { environment } from 'src/environments/environment';
-
-@Component({
- selector: 'app-verification-rule-search-form',
- templateUrl: './verification-rule-search-form.component.html',
- styleUrls: ['./verification-rule-search-form.component.scss']
-})
-export class VerificationRuleSearchFormComponent implements OnInit {
-
- @Input() disabled: boolean = false;
-
- documentClassificationsList: DocumentClassification[];
- documentSubclassificationsList: DocumentSubclassification[];
- availableDocumentSubclassifications: DocumentSubclassification[];
- previouslySelectedClassificationId: number;
-
- categoryNameSuggestions: string[];
- categoryCodeSuggestions: string[];
- categorySuggestions: Category[];
- selectedCategory: Category = null;
-
- ipowerClientNameSuggestions: string[];
- ipowerClientCodeSuggestions: string[];
- ipowerClientSuggestions: IPowerClient[];
- selectedIPowerClient: IPowerClient = null;
-
- displayValidationMessagesEvenIfPristine: boolean;
-
- verificationRuleForm = this.fb.group({
- ipowerName: [null],
- ipowerCode: [null],
- categoryName: [null],
- categoryCode: [null],
- documentClassification: [null],
- subCategoryCode: [null] // This actually represents the complete DocumentSubclassification object.
- });
-
- constructor(
- private fb: FormBuilder,
- private documentClassificationsService: DocumentClassificationsService,
- private documentSubclassificationsService: DocumentSubclassificationsService,
- private verificationRulesService: VerificationRulesService,
- private categoriesService: CategoriesService,
- private ipowerClientsService: IpowerClientsService,
- private errorHandlingService: ErrorHandlingService,
- private authService: AuthService
- ) { }
-
- ngOnInit(): void {
-
- if (this.disabled) {
- Object.keys(this.verificationRuleForm.controls).forEach(ctrl => this.verificationRuleForm.get(ctrl).disable());
- return; // Don't even bother initialising or requesting anything.
- }
-
- this.initData();
- }
-
- initData() {
- this.documentClassificationsService.getAll().subscribe(
- value => this.documentClassificationsList = value,
- err => this.errorHandlingService.showHttpResponseError(err)
- );
-
- // This is NOT the list of Subclassifications used for the dropdown.
- this.documentSubclassificationsService.getAll().subscribe(
- value => {
- this.documentSubclassificationsList = value;
- this.availableDocumentSubclassifications = value;
- },
- err => this.errorHandlingService.showHttpResponseError(err)
- );
- }
-
- clear() {
- this.verificationRuleForm.reset();
-
- this.selectedCategory = null;
- this.selectedIPowerClient = null;
- }
-
- documentClassificationSelected(selection: DocumentClassification) {
-
- // If a different Classification has been selected, reset the Subclassification's value.
- if (this.previouslySelectedClassificationId && selection.classificationId != this.previouslySelectedClassificationId) {
- this.verificationRuleForm.get('subCategoryCode').reset();
- }
- this.previouslySelectedClassificationId = this.verificationRuleForm.get('documentClassification').value.classificationId;
-
- this.availableDocumentSubclassifications = this.documentSubclassificationsList.filter(element => element.documentClassification.classificationId == selection.classificationId);
- }
-
- documentSubclassificationSelected(selection: DocumentSubclassification) {
- this.verificationRuleForm.get('documentClassification').setValue(selection.documentClassification);
- }
-
- /*
- * Auto-suggest/complete Categories
- */
- autosuggestCategoryName(event) {
-
- if (!event.query || event.query.length < 3) {
- this.categoryNameSuggestions = [];
- return;
- }
-
- let classId = this.verificationRuleForm.get('documentClassification').value ? this.verificationRuleForm.get('documentClassification').value.classificationId : null;
- this.categoriesService.autosuggestCategoryName(event.query, classId).subscribe(
- (values: Category[]) => {
- let temp: string[] = [];
- this.categorySuggestions = values;
- values.map(val => temp.push(val.categoryName));
- this.categoryNameSuggestions = temp
- },
- err => this.errorHandlingService.showHttpResponseError(err)
- );
- }
-
- autosuggestCategoryCode(event) {
-
- if (event.query.length < 3) {
- this.categoryCodeSuggestions = [];
- return;
- }
-
- let classId = this.verificationRuleForm.get('documentClassification').value ? this.verificationRuleForm.get('documentClassification').value.classificationId : null;
- this.categoriesService.autosuggestCategoryCode(event.query, classId).subscribe(
- (values: Category[]) => {
- let temp: string[] = [];
- this.categorySuggestions = values;
- values.map(val => temp.push(val.categoryCode));
- this.categoryCodeSuggestions = temp
- },
- err => this.errorHandlingService.showHttpResponseError(err)
- );
- }
-
- categoryNameSelected(name: string) {
- this.selectedCategory = this.categorySuggestions.find(cat => cat.categoryName == name);
- this.verificationRuleForm.get('categoryCode').patchValue(this.selectedCategory.categoryCode);
- this.verificationRuleForm.updateValueAndValidity();
- }
-
- categoryCodeSelected(code: string) {
- this.selectedCategory = this.categorySuggestions.find(cat => cat.categoryCode == code);
- this.verificationRuleForm.get('categoryName').patchValue(this.selectedCategory.categoryName);
- this.verificationRuleForm.updateValueAndValidity();
- }
-
- // /*
- // * Auto-suggest/complete iPower Clients
- // */
- // autosuggestIPowerClientName(event) {
-
- // if (!event.query || event.query.length < 3) {
- // this.ipowerClientNameSuggestions = [];
- // return;
- // }
-
- // this.ipowerClientsService.getClientsByNameDistinct(event.query).subscribe(
- // (values: IPowerClient[]) => {
- // let temp: string[] = [];
- // this.ipowerClientSuggestions = values;
- // values.map(val => temp.push(val.name));
- // this.ipowerClientNameSuggestions = temp
- // },
- // err => this.errorHandlingService.showHttpResponseError(err)
- // );
- // }
-
- // autosuggestIPowerClientCode(event) {
-
- // if (!event.query || event.query.length < 3) {
- // this.ipowerClientCodeSuggestions = [];
- // return;
- // }
-
- // this.ipowerClientsService.getClientsByCodeDistinct(event.query).subscribe(
- // (values: IPowerClient[]) => {
- // let temp: string[] = [];
- // this.ipowerClientSuggestions = values;
- // values.map(val => temp.push(val.clientCode));
- // this.ipowerClientCodeSuggestions = temp
- // },
- // err => this.errorHandlingService.showHttpResponseError(err)
- // );
- // }
-
- autosuggestIPowerClientCode(event) {
-
- if (event.query.length < 3) {
- this.ipowerClientCodeSuggestions = [];
- return;
- }
-
- // If the user has the right to Preview of Scheduling Procedure (A02), we use the endpoint that returns all iPowerClients,
- // otherwise, the one that checks for the user's User_Access too. Whether the user can see ANY rule has already been handled by the 'search' button.
- let endpointToSubscribeTo: Observable = this.authService.userHasRightForClient(USER_RIGHTS.B01, environment.globalRightsClientID)
- ? this.ipowerClientsService.getClientsByCodeOnly(event.query)
- : this.authService.userRights.find(rdc => USER_RIGHTS.B02.isGrantedToUser(rdc.rights)) != null ? this.ipowerClientsService.getClientsByCodeDistinct(event.query) : null;
-
- endpointToSubscribeTo.subscribe(
- (values: IPowerClient[]) => {
- let temp: string[] = [];
- this.ipowerClientSuggestions = values;
- values.map(val => temp.push(val.clientCode));
- this.ipowerClientCodeSuggestions = temp
- },
- err => this.errorHandlingService.showHttpResponseError(err)
- );
- }
-
- /*
- * Auto-suggest & Auto-complete IPower Client
- */
- autosuggestIPowerClientName(event): void {
-
- if (!event.query || event.query.length < 3) {
- this.ipowerClientNameSuggestions = [];
- return;
- }
-
- // If the user has the right to Preview of Scheduling Procedure (A02), we use the endpoint that returns all iPowerClients,
- // otherwise, the one that checks for the user's User_Access too. Whether the user can see ANY rule has already been handled by the 'search' button.
- let endpointToSubscribeTo: Observable = this.authService.userHasRightForClient(USER_RIGHTS.B01, environment.globalRightsClientID)
- ? this.ipowerClientsService.getClientsByNameOnly(event.query)
- : this.authService.userRights.find(rdc => USER_RIGHTS.B02.isGrantedToUser(rdc.rights)) != null ? this.ipowerClientsService.getClientsByNameDistinct(event.query) : null;
-
- endpointToSubscribeTo.subscribe(
- (values: IPowerClient[]) => {
- this.ipowerClientSuggestions = values;
-
- const temp: string[] = [];
- values.map(val => temp.push(val.name));
- this.ipowerClientNameSuggestions = temp;
- },
- err => this.errorHandlingService.showHttpResponseError(err)
- );
-}
-
- ipowerClientNameSelected(name: string) {
- this.selectedIPowerClient = this.ipowerClientSuggestions.find(client => client.name == name);
- this.verificationRuleForm.get('ipowerCode').patchValue(this.selectedIPowerClient.clientCode);
- this.verificationRuleForm.updateValueAndValidity();
- }
-
- ipowerClientCodeSelected(code: string) {
- this.selectedIPowerClient = this.ipowerClientSuggestions.find(client => client.clientCode == code);
- this.verificationRuleForm.get('ipowerName').patchValue(this.selectedIPowerClient.name);
- this.verificationRuleForm.updateValueAndValidity();
- }
-
- /*
- * Utility Methods
- */
- // Auto-suggest inputs - We have to ensure our reactive form holds values that represent the selectedCategory, otherwise truncate it.
- syncSelectedCategory() {
-
- // Ιf our form has no value, truncate the selectedCategory either way.
- if (!this.verificationRuleForm.get('categoryName').value && !this.verificationRuleForm.get('categoryCode').value) {
- this.selectedCategory = null;
- return;
- }
-
- // If both or either of our form's values match the selectedCategory's and the other one doesn't have a value, all is good.
- // Just sync the values in case one is missing. Otherwise truncate the selectedCategory.
- if (
- this.verificationRuleForm.get('categoryName').value == this.selectedCategory.categoryName
- || this.verificationRuleForm.get('categoryCode').value == this.selectedCategory.categoryCode
- ) {
- this.selectedCategory.categoryName = this.verificationRuleForm.get('categoryName').value;
- this.selectedCategory.categoryCode = this.verificationRuleForm.get('categoryCode').value;
- }
-
- // If both our values were different from the selectedCategory's, truncate it. This is an extremely abnormal scenario.
- else {
- console.error('WARNING - syncSelectedCategory()', 'Both of our form\'s values were different from the selectedCategory\'s.');
- this.selectedCategory = null;
- this.verificationRuleForm.get('categoryName').setValue('');
- this.verificationRuleForm.get('categoryCode').setValue('');
- this.verificationRuleForm.updateValueAndValidity();
- }
- }
-
- // Auto-suggest inputs - We have to ensure our reactive form holds values that represent the selectedIPowerClient, otherwise truncate it.
- syncSelectedIPowerClient() {
-
- // Ιf our form has no value, truncate the selectedIPowerClient either way.
- if (!this.verificationRuleForm.get('ipowerName').value && !this.verificationRuleForm.get('ipowerCode').value) {
- this.selectedIPowerClient = null;
- return;
- }
-
- // If both or either of our form's values match the selectedIPowerClient's and the other one doesn't have a value, all is good.
- // Just sync the values in case one is missing. Otherwise truncate the selectedIPowerClient.
- if (
- this.verificationRuleForm.get('ipowerName').value == this.selectedIPowerClient.name
- || this.verificationRuleForm.get('ipowerCode').value == this.selectedIPowerClient.clientCode
- ) {
- this.selectedIPowerClient.name = this.verificationRuleForm.get('ipowerName').value;
- this.selectedIPowerClient.clientCode = this.verificationRuleForm.get('ipowerCode').value;
- }
-
- // If both our values were different from the selectedIPowerClient's, truncate it. This is an extremely abnormal scenario.
- else {
- console.error('WARNING - syncSelectedIPowerClient()', 'Both of our form\'s values were different from the selectedIPowerClient\'s.');
- this.selectedIPowerClient = null;
- this.verificationRuleForm.get('ipowerName').setValue('');
- this.verificationRuleForm.get('ipowerCode').setValue('');
- this.verificationRuleForm.updateValueAndValidity();
- }
- }
-
- /*
- * API methods
- */
- public resetForm(): void {
- this.verificationRuleForm.reset();
- }
-
- // TODO: Set type
- public formValue(): VerificationRuleSearchFormValue {
-
- this.syncSelectedCategory();
- this.syncSelectedIPowerClient();
-
- let formValue: VerificationRuleSearchFormValue = {
- clientId: this.selectedIPowerClient ? this.selectedIPowerClient.id : '',
- categoryId: this.selectedCategory ? this.selectedCategory.id : null,
- docClassificationId: this.verificationRuleForm.get('documentClassification').value ? this.verificationRuleForm.get('documentClassification').value.classificationId : '',
- // The backend only requires the subcategory's name, and not the whole object. Don't ask me.
- docSubcategory: this.verificationRuleForm.get('subCategoryCode').value ? this.verificationRuleForm.get('subCategoryCode').value['subclassificationName'] : ''
- }
-
- return formValue;
- }
-
- public isValid(): boolean {
- return this.verificationRuleForm.valid;
- }
-}
diff --git a/app/features/administration/templates-management/create-template-dialog/create-template-dialog.component.html b/app/features/administration/templates-management/create-template-dialog/create-template-dialog.component.html
deleted file mode 100644
index b74e203..0000000
--- a/app/features/administration/templates-management/create-template-dialog/create-template-dialog.component.html
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
diff --git a/app/features/administration/templates-management/create-template-dialog/create-template-dialog.component.scss b/app/features/administration/templates-management/create-template-dialog/create-template-dialog.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/administration/templates-management/create-template-dialog/create-template-dialog.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/administration/templates-management/create-template-dialog/create-template-dialog.component.spec.ts b/app/features/administration/templates-management/create-template-dialog/create-template-dialog.component.spec.ts
deleted file mode 100644
index fed9ba9..0000000
--- a/app/features/administration/templates-management/create-template-dialog/create-template-dialog.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { CreateTemplateDialogComponent } from './create-template-dialog.component';
-
-describe('CreateTemplateDialogComponent', () => {
- let component: CreateTemplateDialogComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ CreateTemplateDialogComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(CreateTemplateDialogComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/administration/templates-management/create-template-dialog/create-template-dialog.component.ts b/app/features/administration/templates-management/create-template-dialog/create-template-dialog.component.ts
deleted file mode 100644
index 9ec20b0..0000000
--- a/app/features/administration/templates-management/create-template-dialog/create-template-dialog.component.ts
+++ /dev/null
@@ -1,92 +0,0 @@
-import { TemplateFormComponent } from './../../forms/template-form/template-form.component';
-import { CategoriesService } from 'src/app/shared/services/administration/categories.service';
-import { IpowerClientsService } from './../../../../shared/services/administration/ipower-clients.service';
-import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
-import { FormBuilder, Validators } from '@angular/forms';
-import { Category } from 'src/app/shared/models/category.interface';
-import { DocumentClassification } from 'src/app/shared/models/document-classification.interface';
-import { DocumentSubclassification } from 'src/app/shared/models/document-subclassification.interface';
-import { IPowerClient } from 'src/app/shared/models/ipower-client.interface';
-import { Template } from 'src/app/shared/models/template.interface';
-import { DocumentClassificationsService } from 'src/app/shared/services/administration/document-classifications.service';
-import { DocumentSubclassificationsService } from 'src/app/shared/services/administration/document-subclassifications.service';
-import { TemplatesService } from 'src/app/shared/services/administration/templates.service';
-import { NotificationsHandlingService } from 'src/app/shared/services/notifications-handling/notifications-handling.service';
-
-@Component({
- selector: 'app-create-template-dialog',
- templateUrl: './create-template-dialog.component.html',
- styleUrls: ['./create-template-dialog.component.scss']
-})
-export class CreateTemplateDialogComponent implements OnInit {
-
- @ViewChild(TemplateFormComponent) templateForm: TemplateFormComponent;
-
- @Input() displayDialog: boolean;
- @Input() header: string;
- @Input() templateToEdit: Template;
- @Output() cancelled = new EventEmitter();
- @Output() valueChange = new EventEmitter();
-
- displayValidationMessagesEvenIfPristine: boolean;
-
- constructor(private templatesService: TemplatesService, private notificationService: NotificationsHandlingService) { }
-
- ngOnInit(): void {
- this.reset(); // Make sure everything is cleanly initialised.
- }
-
- reset() {
- this.displayValidationMessagesEvenIfPristine = false;
- if (this.templateForm) {
- this.templateForm.resetForm();
- }
- }
-
- onShow() {
- // If a categoryToEdit was provided.
- if (this.templateToEdit) {
- this.templateForm.setValue(this.templateToEdit);
- }
- }
-
- cancel() {
- this.cancelled.emit(true);
- }
-
- addTemplate() {
- // If the form is not valid, make sure validator messages are displayed and then return without doing anything.
- if (!this.templateForm.isValid()) {
- this.displayValidationMessagesEvenIfPristine = true;
- return;
- }
-
- // TODO: What is returned from backend on create()??
- this.templatesService.createNewTemplate(this.templateForm.formValue()).subscribe(result => {
- this.valueChange.emit(result);
- this.cancel();
- this.notificationService.showCreateNewTemplateSuccess();
- },
- error => {
-
- });
- }
-
- editTemplate() {
- // If the form is not valid, make sure validator messages are displayed and then return without doing anything.
- if (!this.templateForm.isValid()) {
- this.displayValidationMessagesEvenIfPristine = true;
- return;
- }
-
- // TODO: What is returned from backend on create()??
- this.templatesService.updateTemplate(this.templateForm.formValue()).subscribe(result => {
- this.valueChange.emit(result);
- this.cancel();
- this.notificationService.showUpdateTemplateSuccess();
- },
- error => {
-
- });
- }
-}
diff --git a/app/features/administration/templates-management/templates-management.component.html b/app/features/administration/templates-management/templates-management.component.html
deleted file mode 100644
index 1a1c868..0000000
--- a/app/features/administration/templates-management/templates-management.component.html
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-
-
{{'TEMPLATES-MANAGEMENT' | translate}}
-
-
-
-
-
-
-
-
-
diff --git a/app/features/administration/templates-management/templates-management.component.scss b/app/features/administration/templates-management/templates-management.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/administration/templates-management/templates-management.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/administration/templates-management/templates-management.component.spec.ts b/app/features/administration/templates-management/templates-management.component.spec.ts
deleted file mode 100644
index 09d1b75..0000000
--- a/app/features/administration/templates-management/templates-management.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { TemplatesManagementComponent } from './templates-management.component';
-
-describe('TemplatesManagementComponent', () => {
- let component: TemplatesManagementComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ TemplatesManagementComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(TemplatesManagementComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/administration/templates-management/templates-management.component.ts b/app/features/administration/templates-management/templates-management.component.ts
deleted file mode 100644
index 50de905..0000000
--- a/app/features/administration/templates-management/templates-management.component.ts
+++ /dev/null
@@ -1,58 +0,0 @@
-import { AuthService } from './../../../shared/services/auth.service';
-import { Component, OnInit } from '@angular/core';
-import { Template } from 'src/app/shared/models/template.interface';
-import { Page } from '../../../shared/models/paging/page.interface';
-import { USER_RIGHTS } from 'src/app/shared/enums/USER_RIGHTS.enum';
-import { environment } from 'src/environments/environment';
-import { TranslateService } from '@ngx-translate/core';
-
-@Component({
- selector: 'app-templates-management',
- templateUrl: './templates-management.component.html',
- styleUrls: ['./templates-management.component.scss']
-})
-export class TemplatesManagementComponent implements OnInit {
-
- displayTemplateCreationDialog = false;
- searchResults: Page;
- paginationEventRequest: { page: number, offset: number } = { page: 0, offset: 10 };
- header: string;
- valueOfTableChanged: any;
- loading: boolean;
-
- constructor(private authService: AuthService, private translate: TranslateService) { }
-
- ngOnInit(): void {
- }
-
- searchMade(results): void {
- this.searchResults = results;
- }
-
- paginationEvent(paginationEvent): void {
- this.paginationEventRequest = paginationEvent;
- }
-
- passLoadingForTable(loading) {
- this.loading = loading;
- }
-
- canAddNewTemplate(): boolean {
- return this.authService.userHasRightForClient(USER_RIGHTS.I02, environment.globalRightsClientID);
- }
-
- addTemplate(): void {
- this.header = this.translate.instant('ADD-NEW-TEMPLATE');
- this.displayTemplateCreationDialog = true;
- }
-
- passEvent(passEvent: any) {
- if (passEvent) {
- this.valueOfTableChanged = passEvent;
- }
- }
-
- passloading(loading) {
- this.loading = loading;
- }
-}
diff --git a/app/features/administration/templates-management/templates-search-results/templates-search-results.component.html b/app/features/administration/templates-management/templates-search-results/templates-search-results.component.html
deleted file mode 100644
index 29b2bac..0000000
--- a/app/features/administration/templates-management/templates-search-results/templates-search-results.component.html
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
-
-
-
- Document Classification
- iPower Client Name
- iPower Client Code
- Category Name
- Sub-Classification Name
- ABBYY Template Code
-
- Actions
-
-
-
-
- {{template.documentClassification.classificationName}}
- {{template.client.name}}
- {{template.client.clientCode}}
- {{template.category.categoryName}}
- {{template.subCategoryCode}}
- {{template.abbyyTemplate}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/features/administration/templates-management/templates-search-results/templates-search-results.component.scss b/app/features/administration/templates-management/templates-search-results/templates-search-results.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/administration/templates-management/templates-search-results/templates-search-results.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/administration/templates-management/templates-search-results/templates-search-results.component.spec.ts b/app/features/administration/templates-management/templates-search-results/templates-search-results.component.spec.ts
deleted file mode 100644
index 8deb55f..0000000
--- a/app/features/administration/templates-management/templates-search-results/templates-search-results.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { TemplatesSearchResultsComponent } from './templates-search-results.component';
-
-describe('TemplatesSearchResultsComponent', () => {
- let component: TemplatesSearchResultsComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ TemplatesSearchResultsComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(TemplatesSearchResultsComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/administration/templates-management/templates-search-results/templates-search-results.component.ts b/app/features/administration/templates-management/templates-search-results/templates-search-results.component.ts
deleted file mode 100644
index c9a3f1c..0000000
--- a/app/features/administration/templates-management/templates-search-results/templates-search-results.component.ts
+++ /dev/null
@@ -1,103 +0,0 @@
-import { AuthService } from './../../../../shared/services/auth.service';
-import { TemplatesService } from 'src/app/shared/services/administration/templates.service';
-import { Template } from './../../../../shared/models/template.interface';
-import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
-import { ConfirmationService, LazyLoadEvent } from 'primeng/api';
-import { Page } from '../../../../shared/models/paging/page.interface';
-import { USER_RIGHTS } from 'src/app/shared/enums/USER_RIGHTS.enum';
-import { environment } from 'src/environments/environment';
-import { TranslateService } from '@ngx-translate/core';
-import { NotificationsHandlingService } from 'src/app/shared/services/notifications-handling/notifications-handling.service';
-
-@Component({
- selector: 'app-templates-search-results',
- templateUrl: './templates-search-results.component.html',
- styleUrls: ['./templates-search-results.component.scss']
-})
-export class TemplatesSearchResultsComponent implements OnInit {
-
- @Output() paginationEvent = new EventEmitter<{ page: number, offset: number }>(); // TODO: Use interface.
- @Output() valueChange = new EventEmitter();
- @Input() loading: boolean;
- @Input() set searchResultsPage(results: Page) {
-
- // This setter may be called on page setup without arguments.
- if (!results) {
- return;
- }
-
- this._searchResultsPage = results;
- this.totalRecords = results.totalElements;
- }
-
- _searchResultsPage: Page;
- totalRecords: number;
- rows: number = 10;
- header: string;
-
- displayEditTemplateDialog: boolean;
- templateToEdit: Template;
-
- constructor(
- private templatesService: TemplatesService,
- private authService: AuthService,
- private translate: TranslateService,
- private confirmationService: ConfirmationService,
- private notificationHandling: NotificationsHandlingService
- ) { }
-
- ngOnInit(): void {
- }
-
- onLazyLoad(event: LazyLoadEvent) {
- let pageToRequest = Math.floor(event.first / event.rows);
- let pageSize = event.rows;
-
- this.paginationEvent.emit({ page: pageToRequest, offset: pageSize });
- }
-
- edit(template: Template) {
- this.header = this.translate.instant('EDIT-TEMPLATE');
- this.templateToEdit = template;
- this.displayEditTemplateDialog = true;
- }
-
- cancelEditTemplate() {
- this.displayEditTemplateDialog = false;
- this.templateToEdit = null;
- }
-
- delete(template: Template): void {
- this.confirmationService.confirm({
- accept: () => {
- this.templatesService.delete(template.id).subscribe((success) => {
- this.valueChange.emit(success);
- this.notificationHandling.showDeleteTemplateSuccess();
- },
-
- (error) => console.error(error)
- );
- // Actual logic to perform a confirmation
- }, reject: () => {
-
- }
- });
- }
-
- /*
- * UserRights-check Methods
- */
- canEditTemplates(): boolean {
- return this.authService.userHasRightForClient(USER_RIGHTS.I03, environment.globalRightsClientID);
- }
-
- canDeleteTemplates(): boolean {
- return this.authService.userHasRightForClient(USER_RIGHTS.I04, environment.globalRightsClientID);
- }
-
- passEvent(passEvent : any) {
- if(passEvent){
- this.valueChange.emit(passEvent);
- }
- }
-}
diff --git a/app/features/administration/templates-management/templates-search/templates-search.component.html b/app/features/administration/templates-management/templates-search/templates-search.component.html
deleted file mode 100644
index 2048c43..0000000
--- a/app/features/administration/templates-management/templates-search/templates-search.component.html
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
diff --git a/app/features/administration/templates-management/templates-search/templates-search.component.scss b/app/features/administration/templates-management/templates-search/templates-search.component.scss
deleted file mode 100644
index 6633b5e..0000000
--- a/app/features/administration/templates-management/templates-search/templates-search.component.scss
+++ /dev/null
@@ -1,2 +0,0 @@
-@import 'src/styles';
-
diff --git a/app/features/administration/templates-management/templates-search/templates-search.component.spec.ts b/app/features/administration/templates-management/templates-search/templates-search.component.spec.ts
deleted file mode 100644
index 0f6a5d8..0000000
--- a/app/features/administration/templates-management/templates-search/templates-search.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { TemplatesSearchComponent } from './templates-search.component';
-
-describe('TemplatesSearchComponent', () => {
- let component: TemplatesSearchComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ TemplatesSearchComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(TemplatesSearchComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/administration/templates-management/templates-search/templates-search.component.ts b/app/features/administration/templates-management/templates-search/templates-search.component.ts
deleted file mode 100644
index c7a452e..0000000
--- a/app/features/administration/templates-management/templates-search/templates-search.component.ts
+++ /dev/null
@@ -1,111 +0,0 @@
-import { TemplateFormComponent } from './../../forms/template-form/template-form.component';
-import { TemplatesService } from 'src/app/shared/services/administration/templates.service';
-import { EventEmitter, Input, Output, ViewChild } from '@angular/core';
-import { Component, OnInit } from '@angular/core';
-import { Template } from 'src/app/shared/models/template.interface';
-import { Page } from '../../../../shared/models/paging/page.interface';
-import { ErrorHandlingService } from 'src/app/shared/services/error-handling/error-handling.service';
-import { USER_RIGHTS } from 'src/app/shared/enums/USER_RIGHTS.enum';
-import { AuthService } from 'src/app/shared/services/auth.service';
-import { environment } from 'src/environments/environment';
-
-@Component({
- selector: 'app-templates-search',
- templateUrl: './templates-search.component.html',
- styleUrls: ['./templates-search.component.scss']
-})
-export class TemplatesSearchComponent implements OnInit {
-
- @ViewChild(TemplateFormComponent) private templateForm: TemplateFormComponent;
-
- @Input() set paginationEventRequest(value: { page: number, offset: number }) {
-
- // This setter may be called on page setup without arguments.
- if (!value) {
- return;
- }
- this._value = Object.assign(value);
- this.search(value.page, value.offset);
- }
-
- @Input() set valueTableChange(results: any) {
- if (results) {
- this.search(this._value.page,this._value.offset);
- }
- }
-
- @Output() searchResults = new EventEmitter>();
- @Output() loading = new EventEmitter();
- @Output() searchInitiated = new EventEmitter();
-
- _value : {page: number , offset: number};
-
- // Dictated by the expectations of our backend. TODO: Use interface.
- lastSearchCriteria: {
- docClassificationId: number;
- clientId: string;
- categoryName: string;
- categoryCode: string;
- abbyyTemplate: string;
- };
-
- constructor(
- private templatesService: TemplatesService,
- private authService: AuthService,
- private errorHandlingService: ErrorHandlingService
- ) { }
-
- ngOnInit(): void {
- }
-
- clear() {
- this.templateForm.resetForm();
- }
-
- searchButtonClicked() {
-
- this.searchInitiated.emit(true);
-
- // Remember the search for future pagination/whatever requests.
- let templateFormValue: Template = this.templateForm.formValue();
-
- let docClassId = templateFormValue.documentClassification ? templateFormValue.documentClassification.classificationId : null;
- let clientId = templateFormValue.client ? templateFormValue.client.id : ''
- let catName = templateFormValue.category ? templateFormValue.category.categoryName : '';
- let catCode = templateFormValue.category ? templateFormValue.category.categoryCode : '';
- let abbyyTempCode = templateFormValue.abbyyTemplate;
-
- this.lastSearchCriteria = {
- docClassificationId: docClassId,
- clientId: clientId as any,
- categoryName: catName,
- categoryCode: catCode,
- abbyyTemplate: abbyyTempCode
- }
-
- // Then actually search.
- this.search();
- }
-
- search(pageNumber = 0, pageSize = 10) {
- this.loading.emit(true);
-
- if (!this.lastSearchCriteria) {
- return;
- }
-
- this.templatesService.searchByCriteriaPaged(pageNumber, pageSize, this.lastSearchCriteria, 'search').subscribe(
- (results: Page) => {
- this.searchResults.emit(results);
- this.loading.emit(false);
- },
- err => {
- this.loading.emit(false);
- this.errorHandlingService.showHttpResponseError(err);
- });
- }
-
- canPreviewAllTemplates(): boolean {
- return this.authService.userHasRightForClient(USER_RIGHTS.I01, environment.globalRightsClientID);
- }
-}
diff --git a/app/features/administration/verification-rules-configuration/create-verification-rule-dialog/create-verification-rule-dialog.component.html b/app/features/administration/verification-rules-configuration/create-verification-rule-dialog/create-verification-rule-dialog.component.html
deleted file mode 100644
index bae3555..0000000
--- a/app/features/administration/verification-rules-configuration/create-verification-rule-dialog/create-verification-rule-dialog.component.html
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
diff --git a/app/features/administration/verification-rules-configuration/create-verification-rule-dialog/create-verification-rule-dialog.component.scss b/app/features/administration/verification-rules-configuration/create-verification-rule-dialog/create-verification-rule-dialog.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/administration/verification-rules-configuration/create-verification-rule-dialog/create-verification-rule-dialog.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/administration/verification-rules-configuration/create-verification-rule-dialog/create-verification-rule-dialog.component.spec.ts b/app/features/administration/verification-rules-configuration/create-verification-rule-dialog/create-verification-rule-dialog.component.spec.ts
deleted file mode 100644
index 630cf47..0000000
--- a/app/features/administration/verification-rules-configuration/create-verification-rule-dialog/create-verification-rule-dialog.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { CreateVerificationRuleDialogComponent } from './create-verification-rule-dialog.component';
-
-describe('CreateVerificationRuleDialogComponent', () => {
- let component: CreateVerificationRuleDialogComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ CreateVerificationRuleDialogComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(CreateVerificationRuleDialogComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/administration/verification-rules-configuration/create-verification-rule-dialog/create-verification-rule-dialog.component.ts b/app/features/administration/verification-rules-configuration/create-verification-rule-dialog/create-verification-rule-dialog.component.ts
deleted file mode 100644
index 3d2712c..0000000
--- a/app/features/administration/verification-rules-configuration/create-verification-rule-dialog/create-verification-rule-dialog.component.ts
+++ /dev/null
@@ -1,87 +0,0 @@
-import { VerificationRule } from 'src/app/shared/models/verification-rule.interface';
-import { VerificationRulesService } from 'src/app/shared/services/administration/verification-rules.service';
-import { VerificationRuleFormComponent } from './../../forms/verification-rule-form/verification-rule-form.component';
-import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
-import { NotificationsHandlingService } from 'src/app/shared/services/notifications-handling/notifications-handling.service';
-
-@Component({
- selector: 'app-create-verification-rule-dialog',
- templateUrl: './create-verification-rule-dialog.component.html',
- styleUrls: ['./create-verification-rule-dialog.component.scss']
-})
-export class CreateVerificationRuleDialogComponent implements OnInit {
-
- @ViewChild(VerificationRuleFormComponent) verificationRuleForm: VerificationRuleFormComponent;
-
- @Input() displayDialog: boolean;
- @Input() header: string;
- @Input() verificationRuleToEdit: VerificationRule;
- @Output() cancelled = new EventEmitter();
- @Output() valueChange = new EventEmitter();
-
- displayValidationMessagesEvenIfPristine: boolean;
-
- constructor(private verificationRulesService: VerificationRulesService, private notificationService: NotificationsHandlingService) { }
-
- ngOnInit(): void {
- this.reset(); // Make sure everything is cleanly initialised.
- }
-
- reset() {
- this.displayValidationMessagesEvenIfPristine = false;
- if (this.verificationRuleForm) {
- this.verificationRuleForm.resetForm();
- }
- }
-
- initDisplay() {
- // First initialise the form for creation, and if a verificationRuleToEdit exists, it will overwrite any unwanted initialisations.
- this.verificationRuleForm.initForCreation();
-
- // If a verificationRuleToEdit was provided.
- if (this.verificationRuleToEdit) {
- this.verificationRuleForm.setValue(this.verificationRuleToEdit);
- }
- }
-
- cancel() {
- this.cancelled.emit(true);
- }
-
- addVerificationRule() {
- // If the form is not valid, make sure validator messages are displayed and then return without doing anything.
- if (!this.verificationRuleForm.isValid()) {
- this.displayValidationMessagesEvenIfPristine = true;
- return;
- }
-
- // TODO: What is returned from backend on create()??
- this.verificationRulesService.createNewVerificationRule(this.verificationRuleForm.formValue()).subscribe(result => {
- this.valueChange.emit(result);
- this.cancel();
- this.notificationService.showCreateNewVerificationRuleSuccess();
-
- },
- error => {
-
- });
- }
-
- editVerificationRule() {
- // If the form is not valid, make sure validator messages are displayed and then return without doing anything.
- if (!this.verificationRuleForm.isValid()) {
- this.displayValidationMessagesEvenIfPristine = true;
- return;
- }
-
- // TODO: What is returned from backend on create()??
- this.verificationRulesService.updateVerificationRule(this.verificationRuleForm.formValue()).subscribe(result => {
- this.valueChange.emit(result);
- this.cancel();
- this.notificationService.showUpdateVerificationRuleSuccess();
- },
- error => {
-
- });
- }
-}
diff --git a/app/features/administration/verification-rules-configuration/verification-rules-configuration.component.html b/app/features/administration/verification-rules-configuration/verification-rules-configuration.component.html
deleted file mode 100644
index b3ef82f..0000000
--- a/app/features/administration/verification-rules-configuration/verification-rules-configuration.component.html
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-
-
{{'VERIFICATION-RULES-MANAGEMENT' | translate}}
-
-
-
-
-
-
-
-
-
diff --git a/app/features/administration/verification-rules-configuration/verification-rules-configuration.component.scss b/app/features/administration/verification-rules-configuration/verification-rules-configuration.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/administration/verification-rules-configuration/verification-rules-configuration.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/administration/verification-rules-configuration/verification-rules-configuration.component.spec.ts b/app/features/administration/verification-rules-configuration/verification-rules-configuration.component.spec.ts
deleted file mode 100644
index 03f98af..0000000
--- a/app/features/administration/verification-rules-configuration/verification-rules-configuration.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { VerificationRulesConfigurationComponent } from './verification-rules-configuration.component';
-
-describe('VerificationRulesConfigurationComponent', () => {
- let component: VerificationRulesConfigurationComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ VerificationRulesConfigurationComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(VerificationRulesConfigurationComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/administration/verification-rules-configuration/verification-rules-configuration.component.ts b/app/features/administration/verification-rules-configuration/verification-rules-configuration.component.ts
deleted file mode 100644
index 55cfc85..0000000
--- a/app/features/administration/verification-rules-configuration/verification-rules-configuration.component.ts
+++ /dev/null
@@ -1,62 +0,0 @@
-import { Right } from './../../../shared/models/right.interface';
-import { USER_RIGHTS } from './../../../shared/enums/USER_RIGHTS.enum';
-import { AuthService } from 'src/app/shared/services/auth.service';
-import { VerificationRule } from './../../../shared/models/verification-rule.interface';
-import { Component, OnInit } from '@angular/core';
-import { Page } from '../../../shared/models/paging/page.interface';
-import { TranslateService } from '@ngx-translate/core';
-import { environment } from 'src/environments/environment';
-
-@Component({
- selector: 'app-verification-rules-configuration',
- templateUrl: './verification-rules-configuration.component.html',
- styleUrls: ['./verification-rules-configuration.component.scss']
-})
-export class VerificationRulesConfigurationComponent implements OnInit {
-
- displayTemplateCreationDialog = false;
- searchResults: Page;
- paginationEventRequest: { page: number, offset: number };
- header: string;
- valueOfTableChanged: any;
- loading: boolean;
-
- constructor(private authService: AuthService, private translate: TranslateService) { }
-
- ngOnInit(): void {
- }
-
- searchMade(results) {
- this.searchResults = results;
- }
-
- passLoadingForTable(loading) {
- this.loading = loading;
- }
-
- paginationEvent(paginationEvent) {
- this.paginationEventRequest = paginationEvent;
- }
-
- addRule(): void {
- this.header = this.translate.instant('ADD-NEW-RULE');
- this.displayTemplateCreationDialog = true;
- }
-
- /*
- * What would you do if they told you that, "if the user cannot add rules, disable this button", but the "add-new-rule" right is granted on a per-client basis?
- * But of course, you would check to see if the "add-new-rule" right is granted for ANY client and, if so, you would then allow him to proceed.
- */
- canAddAnyRule(): boolean {
- return this.authService.userHasRightForClient(USER_RIGHTS.B03, environment.globalRightsClientID);
- }
-
- passEvent(passEvent: any) {
- if (passEvent) {
- this.valueOfTableChanged = passEvent;
- }
-
-}
-
-
-}
diff --git a/app/features/administration/verification-rules-configuration/verification-rules-search-results/verification-rules-search-results.component.html b/app/features/administration/verification-rules-configuration/verification-rules-search-results/verification-rules-search-results.component.html
deleted file mode 100644
index c5da83a..0000000
--- a/app/features/administration/verification-rules-configuration/verification-rules-search-results/verification-rules-search-results.component.html
+++ /dev/null
@@ -1,79 +0,0 @@
-
-
-
-
-
-
- iPower Client Name
- iPower Client Code
- Category Name
- Category Code
- Doc Category
- Doc Subcategory
- Capturing Verification
- Confidence Level
- Journal Verification
- Alteryx Routine Name
- Enabled
-
- Actions
-
-
-
-
- {{verificationRule.client?.name}}
- {{verificationRule.client?.clientCode}}
- {{verificationRule.template?.category.categoryName}}
- {{verificationRule.template?.category.categoryCode}}
- {{verificationRule.docClassificationCategory?.classificationName}}
- {{verificationRule.template?.subCategoryCode}}
- {{verificationRule.capturingVerification?.capturingVerificationName}}
- {{verificationRule.confidenceLevelMinThreshold}}%
- {{verificationRule.journalVerification?.journalVerificationName}}
- {{verificationRule.alteryxRoutineId}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/features/administration/verification-rules-configuration/verification-rules-search-results/verification-rules-search-results.component.scss b/app/features/administration/verification-rules-configuration/verification-rules-search-results/verification-rules-search-results.component.scss
deleted file mode 100644
index a890cdd..0000000
--- a/app/features/administration/verification-rules-configuration/verification-rules-search-results/verification-rules-search-results.component.scss
+++ /dev/null
@@ -1,10 +0,0 @@
-@import 'src/styles';
-
-.clickable {
- cursor: pointer;
-}
-
-// TODO: FFS, do not use "!important".
-.align-center {
- text-align: center !important;
-}
diff --git a/app/features/administration/verification-rules-configuration/verification-rules-search-results/verification-rules-search-results.component.spec.ts b/app/features/administration/verification-rules-configuration/verification-rules-search-results/verification-rules-search-results.component.spec.ts
deleted file mode 100644
index 9f602dc..0000000
--- a/app/features/administration/verification-rules-configuration/verification-rules-search-results/verification-rules-search-results.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { VerificationRulesSearchResultsComponent } from './verification-rules-search-results.component';
-
-describe('VerificationRulesSearchResultsComponent', () => {
- let component: VerificationRulesSearchResultsComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ VerificationRulesSearchResultsComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(VerificationRulesSearchResultsComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/administration/verification-rules-configuration/verification-rules-search-results/verification-rules-search-results.component.ts b/app/features/administration/verification-rules-configuration/verification-rules-search-results/verification-rules-search-results.component.ts
deleted file mode 100644
index 3cebb27..0000000
--- a/app/features/administration/verification-rules-configuration/verification-rules-search-results/verification-rules-search-results.component.ts
+++ /dev/null
@@ -1,151 +0,0 @@
-import { AuthService } from 'src/app/shared/services/auth.service';
-import { USER_RIGHTS } from './../../../../shared/enums/USER_RIGHTS.enum';
-import { CreateVerificationRuleFormValue } from './../../forms/verification-rule-form/create-verification-rule-form-value.interface';
-
-import { VerificationRule } from './../../../../shared/models/verification-rule.interface';
-import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
-import { ConfirmationService, LazyLoadEvent } from 'primeng/api';
-import { VerificationRulesService } from 'src/app/shared/services/administration/verification-rules.service';
-import { Page } from '../../../../shared/models/paging/page.interface';
-import { TranslateService } from '@ngx-translate/core';
-import { NotificationsHandlingService } from 'src/app/shared/services/notifications-handling/notifications-handling.service';
-import { environment } from 'src/environments/environment';
-
-@Component({
- selector: 'app-verification-rules-search-results',
- templateUrl: './verification-rules-search-results.component.html',
- styleUrls: ['./verification-rules-search-results.component.scss']
-})
-export class VerificationRulesSearchResultsComponent implements OnInit {
-
- @Output() paginationEvent = new EventEmitter<{ page: number, offset: number }>(true); // TODO: Use interface.
- @Output() valueChange = new EventEmitter();
- @Input() loading: boolean;
- @Input() set searchResultsPage(results: Page) {
-
- // This setter may be called on page setup without arguments.
- if (!results) {
- return;
- }
-
- this._searchResultsPage = results;
-
- this.totalRecords = results.totalElements;
- }
-
- // tslint:disable-next-line:variable-name
- _searchResultsPage: Page;
- totalRecords: number;
- rows = 10;
- header: string;
- selectedValues: string[] = ['Enabled'];
-
- displayEditVerificationRuleDialog: boolean;
- verificationRuleToEdit: VerificationRule;
-
- constructor(
- private verificationRulesService: VerificationRulesService,
- private authService: AuthService,
- private translate: TranslateService,
- private confirmationService: ConfirmationService,
- private notificationHandling: NotificationsHandlingService
- ) { }
-
- ngOnInit(): void {
- }
-
- onLazyLoad(event: LazyLoadEvent): void {
- const pageToRequest = Math.floor(event.first / event.rows);
- const pageSize = event.rows;
-
- this.paginationEvent.emit({ page: pageToRequest, offset: pageSize });
- }
-
- edit(verificationRule: VerificationRule): void {
- this.verificationRuleToEdit = verificationRule;
- this.header = this.translate.instant('EDIT-RULE');
- this.displayEditVerificationRuleDialog = true;
- }
-
- cancelEditVerificationRule(): void {
- this.displayEditVerificationRuleDialog = false;
- this.verificationRuleToEdit = null;
- }
-
- delete(verificationRule: VerificationRule): void {
- this.confirmationService.confirm({
- accept: () => {
- this.verificationRulesService.delete(verificationRule.id).subscribe(
- (success) => {
- this.valueChange.emit(success);
- this.notificationHandling.showDeleteVerificationSuccess();
- },
- (error) => console.error(error)
- );
- // Actual logic to perform a confirmation
- }, reject: () => {
-
- }
- });
- }
-
- changeStatus(verificationRule: VerificationRule): void {
-
- this.loading = true;
-
- // Reverse its status.
- const newStatus = verificationRule.verificationRuleStatus.trim().toLowerCase() === 'enabled' ? 'Disabled' : 'Enabled';
-
- // First, transform the VerificationRule to a CreateVerificationRuleFormValue.
- const createRuleModel: CreateVerificationRuleFormValue = {
- id: verificationRule.id,
- confidenceLevelMinThreshold: verificationRule.confidenceLevelMinThreshold,
- clientId: verificationRule.client?.id,
- categoryId: verificationRule.template?.category?.id,
- subCategoryCode: verificationRule.template?.subCategoryCode,
- capturingVerification: verificationRule.capturingVerification,
- journalVerification: verificationRule.journalVerification,
- alteryxRoutineId: verificationRule.alteryxRoutineId,
- verificationRuleStatus: newStatus,
- template: verificationRule.template
- };
-
- // Update the rule and after we receive confirmation, also change its value in the table.
- this.verificationRulesService.updateVerificationRule(createRuleModel).subscribe(
- result => {
- this._searchResultsPage.data.find(rule => rule.id === verificationRule.id).verificationRuleStatus = newStatus
- this.valueChange.emit(result)
- this.notificationHandling.showUpdateVerificationRuleSuccess();
- },
- (error) => console.error(error), // TODO: Handle this via a Messaging Service
- () => this.loading = false
- );
- }
-
- /*
- * Rights-check Methods
- */
- canEditRuleByUA(rule: VerificationRule): boolean {
- return this.authService.userHasRightForClient(USER_RIGHTS.B08, rule.client.id);
- }
-
- canDeleteRule(): boolean {
- return this.authService.userHasRightForClient(USER_RIGHTS.B05, environment.globalRightsClientID);
- }
-
- canEditRuleStatus(): boolean {
- return this.authService.userHasRightForClient(USER_RIGHTS.B06, environment.globalRightsClientID);
- }
-
- canEditRuleAll(): boolean {
- return this.authService.userHasRightForClient(USER_RIGHTS.B04, environment.globalRightsClientID);
- }
-
- passEvent(passEvent: any) {
- if (passEvent) {
- this.valueChange.emit(passEvent);
- }
- }
-
-
-}
diff --git a/app/features/administration/verification-rules-configuration/verification-rules-search/verification-rules-search.component.html b/app/features/administration/verification-rules-configuration/verification-rules-search/verification-rules-search.component.html
deleted file mode 100644
index 8f240f7..0000000
--- a/app/features/administration/verification-rules-configuration/verification-rules-search/verification-rules-search.component.html
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
diff --git a/app/features/administration/verification-rules-configuration/verification-rules-search/verification-rules-search.component.scss b/app/features/administration/verification-rules-configuration/verification-rules-search/verification-rules-search.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/administration/verification-rules-configuration/verification-rules-search/verification-rules-search.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/administration/verification-rules-configuration/verification-rules-search/verification-rules-search.component.spec.ts b/app/features/administration/verification-rules-configuration/verification-rules-search/verification-rules-search.component.spec.ts
deleted file mode 100644
index b043299..0000000
--- a/app/features/administration/verification-rules-configuration/verification-rules-search/verification-rules-search.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { VerificationRulesSearchComponent } from './verification-rules-search.component';
-
-describe('VerificationRulesSearchComponent', () => {
- let component: VerificationRulesSearchComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ VerificationRulesSearchComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(VerificationRulesSearchComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/administration/verification-rules-configuration/verification-rules-search/verification-rules-search.component.ts b/app/features/administration/verification-rules-configuration/verification-rules-search/verification-rules-search.component.ts
deleted file mode 100644
index 20db23b..0000000
--- a/app/features/administration/verification-rules-configuration/verification-rules-search/verification-rules-search.component.ts
+++ /dev/null
@@ -1,106 +0,0 @@
-import { AuthService } from 'src/app/shared/services/auth.service';
-import { ErrorHandlingService } from './../../../../shared/services/error-handling/error-handling.service';
-import { VerificationRuleSearchFormValue } from './../../forms/verification-rule-search-form/verification-rule-search-form-value.interface';
-import { VerificationRule } from './../../../../shared/models/verification-rule.interface';
-import { VerificationRulesService } from './../../../../shared/services/administration/verification-rules.service';
-import { VerificationRuleSearchFormComponent } from './../../forms/verification-rule-search-form/verification-rule-search-form.component';
-import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
-import { Page } from '../../../../shared/models/paging/page.interface';
-import { USER_RIGHTS } from 'src/app/shared/enums/USER_RIGHTS.enum';
-import { environment } from 'src/environments/environment';
-
-@Component({
- selector: 'app-verification-rules-search',
- templateUrl: './verification-rules-search.component.html',
- styleUrls: ['./verification-rules-search.component.scss']
-})
-export class VerificationRulesSearchComponent implements OnInit {
-
- @ViewChild(VerificationRuleSearchFormComponent) private verificationRuleSearchForm: VerificationRuleSearchFormComponent;
-
- @Input() set paginationEventRequest(value: { page: number, offset: number }) {
-
- // This setter may be called on page setup without arguments.
- if (!value) {
- return;
- }
- this._value = Object.assign(value);
- this.search(value.page, value.offset);
- }
- @Input() set valueTableChange(results: any) {
- if (results) {
- this.search(this._value.page,this._value.offset);
- }
- }
-
- @Output() searchResults = new EventEmitter>();
- @Output() loading = new EventEmitter();
- @Output() searchInitiated = new EventEmitter();
-
- _value : {page: number , offset: number};
-
- lastSearchCriteria: VerificationRuleSearchFormValue;
-
- constructor(
- private verificationRulesService: VerificationRulesService,
- private authService: AuthService,
- private errorHandlingService: ErrorHandlingService
- ) { }
-
- ngOnInit(): void {
-
- }
-
- clear() {
- this.verificationRuleSearchForm.resetForm();
- }
-
- searchButtonClicked() {
-
- this.searchInitiated.emit(true);
-
- // Remember the search for future pagination/whatever requests.
- let verificationRulesSearchFormValue: VerificationRuleSearchFormValue = this.verificationRuleSearchForm.formValue();
- this.lastSearchCriteria = verificationRulesSearchFormValue;
-
- // Then actually search.
- this.search();
- }
-
- search(pageNumber = 0, pageSize = 10) {
- this.loading.emit(true);
-
- if (!this.lastSearchCriteria) {
- return;
- }
-
- /*
- * After realising the mistake in the UserRights we had to do some refactoring. Here, I have to add the currently logged-in user's ID to the search request.
- * I do not wish to add the user ID in the VerificationRuleSearchFormValue.interface since it doesn't make sense.
- * Neither do I want to set lastSearchCriteria's type to yet another new interface, let alone
- * a hardcoded-in-this-component object type that will not follow the changes made in VerificationRuleSearchFormValue.interface.
- * Therefore, the punchline thus is that, in the final end, you will NOT judge me.-
- */
- let whatISaidInTheComments: any = this.lastSearchCriteria;
- whatISaidInTheComments.userId = this.authService.userDetails.id;
-this.loading.emit(true);
-
- this.verificationRulesService.searchByCriteriaPaged(pageNumber, pageSize, whatISaidInTheComments, 'search').subscribe(
- (results: Page) => {
- this.searchResults.emit(results);
- this.loading.emit(false);
- },
- err => {
- this.loading.emit(false);
- this.errorHandlingService.showHttpResponseError(err);
- });
- }
-
- canPreviewByUA() : boolean{
- return this.authService.userRights.find(rdc => USER_RIGHTS.B02.isGrantedToUser(rdc.rights)) != null;
- }
-
- canPreviewAll(): boolean{
- return this.authService.userHasRightForClient(USER_RIGHTS.B01, environment.globalRightsClientID);
- }
-}
diff --git a/app/features/breadcrumb/breadcrumb.component.html b/app/features/breadcrumb/breadcrumb.component.html
deleted file mode 100644
index 274a8cf..0000000
--- a/app/features/breadcrumb/breadcrumb.component.html
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/app/features/breadcrumb/breadcrumb.component.scss b/app/features/breadcrumb/breadcrumb.component.scss
deleted file mode 100644
index e69de29..0000000
diff --git a/app/features/breadcrumb/breadcrumb.component.spec.ts b/app/features/breadcrumb/breadcrumb.component.spec.ts
deleted file mode 100644
index 06a1b73..0000000
--- a/app/features/breadcrumb/breadcrumb.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { BreadcrumbComponent } from './breadcrumb.component';
-
-describe('BreadcrumbComponent', () => {
- let component: BreadcrumbComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ BreadcrumbComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(BreadcrumbComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/breadcrumb/breadcrumb.component.ts b/app/features/breadcrumb/breadcrumb.component.ts
deleted file mode 100644
index 1cece84..0000000
--- a/app/features/breadcrumb/breadcrumb.component.ts
+++ /dev/null
@@ -1,61 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-import { Router } from '@angular/router';
-import { MenuItem } from 'primeng/api';
-
-@Component({
- selector: 'app-breadcrumb',
- templateUrl: './breadcrumb.component.html',
- styleUrls: ['./breadcrumb.component.scss']
-})
-export class BreadcrumbComponent implements OnInit {
- items: MenuItem[] = [];
- home: MenuItem;
- showBreadcrumb: boolean = false;
-
- constructor(private router: Router) { }
-
- ngOnInit(): void {
-
- let url = this.router.url;
- let chunks = url.split('/').filter(x => x !== '' && x !== 'pages');
-
- if (chunks.length <= 1) {
- this.showBreadcrumb = false;
- }
- else {
- let items: MenuItem[] = [];
- let home: MenuItem = {};
- let parent: string = '/pages/';
- let isHome: boolean = true;
-
- chunks.forEach(function (chunk) {
- let item: MenuItem = {};
- let path: string;
- let previousPath: string;
-
- item.label = chunk?.replace(/-/g, " ")?.toUpperCase();
- if (parent !== previousPath) {
- path = parent + chunk;
- previousPath = path + '/';
- parent = previousPath;
- }
- item.routerLink = path;
- if (isHome) {
- item.icon = 'pi pi-home';
- home = item;
- isHome = false;
- }
- else {
- items.push(item);
- }
-
- });
-
- this.items = items;
- this.home = home;
- this.showBreadcrumb = true;
- }
-
- }
-
-}
diff --git a/app/features/card/card.component.html b/app/features/card/card.component.html
deleted file mode 100644
index 402993d..0000000
--- a/app/features/card/card.component.html
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- {{data.title}}
-
-
- {{data.subtitle}}
-
-
-
-
diff --git a/app/features/card/card.component.scss b/app/features/card/card.component.scss
deleted file mode 100644
index 69f8973..0000000
--- a/app/features/card/card.component.scss
+++ /dev/null
@@ -1,95 +0,0 @@
-@import 'src/styles';
-
-:host ::ng-deep .p-component {
-
- &.p-card {
-
- &.custom {
- background-image: linear-gradient(45deg, $orange, $tangerine);
- border-radius: 6px;
- transition: 0.5s;
- min-height: 340px;
- max-width: 240px;
- position: relative;
- left: 50%;
- transform: translateX(-50%);
-
- &:hover {
- box-shadow: 0 4px 4px -1px rgba(0, 0, 0, 0.2);
- }
-
- .p-card-content {
- padding: 0;
-
- i {
- color: $white;
- }
-
- .header {
- text-align: center;
- margin-bottom: 10px;
-
- i {
- font-size: 8rem;
- }
- }
-
- .title {
- text-align: center;
- font-size: 16px;
- color: $black;
- padding-bottom: 10px;
- font-weight: 700;
- border-bottom: 2px solid $white;
- margin-bottom: 10px;
- }
-
- .sub-title {
- color: $medium-grey;
- }
-
- .footer {
- text-align: right;
- margin-top: 10px;
-
- i {
- font-size: 3rem;
- }
- }
- }
-
- }
- }
-}
-
-@media screen and (max-width: 1400px) {
- :host ::ng-deep .p-component {
-
- &.p-card {
-
- &.custom {
-
- .p-card-content {
-
- .header {
-
- i {
- font-size: 6rem;
- }
-
- }
-
- .footer {
-
- i {
- font-size: 2rem;
- }
-
- }
-
- }
-
- }
- }
- }
-}
diff --git a/app/features/card/card.component.spec.ts b/app/features/card/card.component.spec.ts
deleted file mode 100644
index 6f1aaaa..0000000
--- a/app/features/card/card.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { CardComponent } from './card.component';
-
-describe('CardComponent', () => {
- let component: CardComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ CardComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(CardComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/card/card.component.ts b/app/features/card/card.component.ts
deleted file mode 100644
index d2cd809..0000000
--- a/app/features/card/card.component.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-import { Component, OnInit, Input } from '@angular/core';
-
-@Component({
- selector: 'app-card',
- templateUrl: './card.component.html',
- styleUrls: ['./card.component.scss']
-})
-export class CardComponent implements OnInit {
-
- @Input() data: {
- title: string,
- subtitle: string,
- headerImage: string,
- footerImage: string,
- path: string
- };
-
- constructor() { }
-
- ngOnInit(): void {
- }
-
- calculateHeaderImageClasses() {
- return this.data.headerImage;
- }
-
- calculateFooterImageClasses() {
- return this.data.footerImage;
- }
-
-}
diff --git a/app/features/dashboard/dashboard-metrics/dashboard-metrics.component.html b/app/features/dashboard/dashboard-metrics/dashboard-metrics.component.html
deleted file mode 100644
index f17534a..0000000
--- a/app/features/dashboard/dashboard-metrics/dashboard-metrics.component.html
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
My Clients: {{section.totalClients}} iPower Clients
-
Ongoing:
-
- {{section.totalProcesses}} Processes in total
- {{section.totalExceptions}} Exceptions in total
- {{section.totalUnhandled}} Unhandled Records in total
-
-
-
-
-
diff --git a/app/features/dashboard/dashboard-metrics/dashboard-metrics.component.scss b/app/features/dashboard/dashboard-metrics/dashboard-metrics.component.scss
deleted file mode 100644
index 6100aa8..0000000
--- a/app/features/dashboard/dashboard-metrics/dashboard-metrics.component.scss
+++ /dev/null
@@ -1,13 +0,0 @@
-@import 'src/styles';
-
-.pie {
- float: right !important;
-}
-
-
-@media screen and (max-width: 575px) {
- .pie {
- margin-top: 1rem !important;
- float: left !important;
- }
-}
diff --git a/app/features/dashboard/dashboard-metrics/dashboard-metrics.component.spec.ts b/app/features/dashboard/dashboard-metrics/dashboard-metrics.component.spec.ts
deleted file mode 100644
index 99f0e76..0000000
--- a/app/features/dashboard/dashboard-metrics/dashboard-metrics.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { DashboardMetricsComponent } from './dashboard-metrics.component';
-
-describe('DashboardMetricsComponent', () => {
- let component: DashboardMetricsComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ DashboardMetricsComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(DashboardMetricsComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/dashboard/dashboard-metrics/dashboard-metrics.component.ts b/app/features/dashboard/dashboard-metrics/dashboard-metrics.component.ts
deleted file mode 100644
index 7ee6659..0000000
--- a/app/features/dashboard/dashboard-metrics/dashboard-metrics.component.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import { Component, OnInit, Input } from '@angular/core';
-import { DashboardSection } from './../../../shared/models/dashboard-section.interface';
-
-@Component({
- selector: 'app-dashboard-metrics',
- templateUrl: './dashboard-metrics.component.html',
- styleUrls: ['./dashboard-metrics.component.scss']
-})
-export class DashboardMetricsComponent implements OnInit {
-
- @Input() section: DashboardSection;
-
- constructor() { }
-
- ngOnInit(): void {
- }
-
-}
diff --git a/app/features/dashboard/dashboard-processes-per-client/dashboard-processes-per-client.component.html b/app/features/dashboard/dashboard-processes-per-client/dashboard-processes-per-client.component.html
deleted file mode 100644
index cca08fb..0000000
--- a/app/features/dashboard/dashboard-processes-per-client/dashboard-processes-per-client.component.html
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
-
- Num of iPower Clients Presented
-
-
-
-
-
-
-
-
-
- iPower Client Name
- iPower Client Code
- Processes
- Exceptions
- Unhandled
-
-
-
-
-
- {{client.clientName}}
- {{client.clientId}}
- {{client.processesNumber}}
- {{client.exceptionsNumber}}
- {{client.unhandledNumber}}
-
-
-
-
-
-
-
diff --git a/app/features/dashboard/dashboard-processes-per-client/dashboard-processes-per-client.component.scss b/app/features/dashboard/dashboard-processes-per-client/dashboard-processes-per-client.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/dashboard/dashboard-processes-per-client/dashboard-processes-per-client.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/dashboard/dashboard-processes-per-client/dashboard-processes-per-client.component.spec.ts b/app/features/dashboard/dashboard-processes-per-client/dashboard-processes-per-client.component.spec.ts
deleted file mode 100644
index 8699068..0000000
--- a/app/features/dashboard/dashboard-processes-per-client/dashboard-processes-per-client.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { DashboardProcessesPerClientComponent } from './dashboard-Processes-per-client.component';
-
-describe('DashboardProcessesPerClientComponent', () => {
- let component: DashboardProcessesPerClientComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ DashboardProcessesPerClientComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(DashboardProcessesPerClientComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/dashboard/dashboard-processes-per-client/dashboard-processes-per-client.component.ts b/app/features/dashboard/dashboard-processes-per-client/dashboard-processes-per-client.component.ts
deleted file mode 100644
index 1a970f5..0000000
--- a/app/features/dashboard/dashboard-processes-per-client/dashboard-processes-per-client.component.ts
+++ /dev/null
@@ -1,47 +0,0 @@
-import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
-import { Router } from '@angular/router';
-import { LazyLoadEvent } from 'primeng/api';
-import { ProcessesPerClient } from './../../../shared/models/dashboard-section.interface';
-import { Page } from './../../../shared/models/paging/page.interface';
-import { DocumentClassification } from './../../../shared/models/document-classification.interface';
-import { DashboardSection } from './../../../shared/models/dashboard-section.interface';
-
-@Component({
- selector: 'app-dashboard-processes-per-client',
- templateUrl: './dashboard-processes-per-client.component.html',
- styleUrls: ['./dashboard-processes-per-client.component.scss']
-})
-export class DashboardProcessesPerClientComponent implements OnInit {
- numOfClientsPresentedList: number[] = [3, 5, 10];
-
- // Inputs
- @Input() section: DashboardSection;
- @Input() documentClassifications: DocumentClassification[];
-
- // Outputs
- @Output() paginationEvent = new EventEmitter<{ sectionType: string, sectionPage: number, sectionOffset: number }>();
- @Output() onTotalElementsChanged = new EventEmitter();
-
- constructor(private router: Router) { }
-
- ngOnInit(): void {
- }
-
- totalElementsChanged(val) {
- this.onTotalElementsChanged.emit(val);
- }
-
- onLazyLoad(event: LazyLoadEvent) {
- let pageToRequest = Math.floor(event.first / event.rows);
- let pageSize = event.rows;
-
- this.paginationEvent.emit({ sectionType: this.section.type, sectionPage: pageToRequest, sectionOffset: pageSize });
- }
-
- preview(client) {
- if (this.documentClassifications?.length) {
- const classificationId = this.documentClassifications.find(dc => dc.classificationName === this.section.type).classificationId;
- this.router.navigate(['/pages/processes', { clientId: client.clientId, type: classificationId }]);
- }
- }
-}
diff --git a/app/features/dashboard/dashboard.component.html b/app/features/dashboard/dashboard.component.html
deleted file mode 100644
index 285e4cc..0000000
--- a/app/features/dashboard/dashboard.component.html
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
-
-
{{'MY-DASHBOARD' | translate}}
-
-
-
-
-
-
-
-
-
-
-
0) && iPowerClients && (iPowerClients.length > 0)">
-
Selected iPower clients
-
-
-
-
-
-
-
-
-
diff --git a/app/features/dashboard/dashboard.component.scss b/app/features/dashboard/dashboard.component.scss
deleted file mode 100644
index 2e14fde..0000000
--- a/app/features/dashboard/dashboard.component.scss
+++ /dev/null
@@ -1,7 +0,0 @@
-@import 'src/styles';
-
-:host ::ng-deep .p-component {
- &.p-multiselect {
- width: 100%;
- }
-}
diff --git a/app/features/dashboard/dashboard.component.spec.ts b/app/features/dashboard/dashboard.component.spec.ts
deleted file mode 100644
index 976abab..0000000
--- a/app/features/dashboard/dashboard.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { DashboardComponent } from './dashboard.component';
-
-describe('DashboardComponent', () => {
- let component: DashboardComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [DashboardComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(DashboardComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/dashboard/dashboard.component.ts b/app/features/dashboard/dashboard.component.ts
deleted file mode 100644
index cc78c6d..0000000
--- a/app/features/dashboard/dashboard.component.ts
+++ /dev/null
@@ -1,174 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-import { DashboardSection } from './../../shared/models/dashboard-section.interface';
-import { DocumentClassification } from './../../shared/models/document-classification.interface';
-import { IPowerClient } from './../../shared/models/ipower-client.interface';
-import { AuthService } from './../../shared/services/auth.service';
-import { DashboardService } from './../../shared/services/dashboard/dashboard.service';
-import { IpowerClientsService } from './../../shared/services/administration/ipower-clients.service';
-import { DocumentClassificationService } from './../../shared/services/document-classification.service';
-import { ErrorHandlingService } from 'src/app/shared/services/error-handling/error-handling.service';
-import { PieConfiguration } from './dashboard.configuration';
-import { environment } from './../../../environments/environment';
-
-@Component({
- selector: 'app-dashboard',
- templateUrl: './dashboard.component.html',
- styleUrls: ['./dashboard.component.scss']
-})
-export class DashboardComponent implements OnInit {
-
- iPowerClients: IPowerClient[] = [];
- selectedIPowerClients: string[] = [];
- dashboardSections: DashboardSection[] = [];
- documentClassifications: DocumentClassification[];
- pieConfiguration = new PieConfiguration();
-
- constructor(public authService: AuthService,
- private dashboardService: DashboardService,
- private ipowerClientsService: IpowerClientsService,
- private errorHandlingService: ErrorHandlingService,
- private documentClassificationService: DocumentClassificationService) { }
-
- ngOnInit(): void {
- this.getClientsByUser();
-
- this.documentClassificationService.getAll().subscribe(docClassifications => {
- this.documentClassifications = docClassifications;
- });
- }
-
- enrichData(sections) {
- for (let section of sections) {
- const noneOngoing = (section.totalProcesses > 0) ? 0 :
- (section.totalExceptions > 0) ? 0 :
- (section.totalUnhandled > 0) ? 0 : 1;
- section.pie = {
- labels: this.pieConfiguration.sections.find(x => x.type === section.type)?.options?.labels,
- datasets: [
- {
- data: [section.totalProcesses, section.totalExceptions, section.totalUnhandled, noneOngoing],
- backgroundColor: this.pieConfiguration.sections.find(x => x.type === section.type)?.options?.backgroundColor,
- hoverBackgroundColor: this.pieConfiguration.sections.find(x => x.type === section.type)?.options?.hoverBackgroundColor
- }
- ]
- };
- section.selectedElements = 3;
- section.selectedPage = 0;
- section.resultsLoading = false;
- }
- }
-
- initializeData(sections) {
- this.enrichData(sections);
- this.dashboardSections = sections;
- }
-
- patchData(sections, sectionPage, sectionOffset) {
- let newSecs = this.dashboardSections.filter(section => section.type === sections[0].type);
-
- newSecs[0].type = sections[0].type;
- newSecs[0].totalPages = sections[0].totalPages;
- newSecs[0].totalElements = sections[0].totalElements;
- newSecs[0].aggregatedResults = sections[0].aggregatedResults;
- newSecs[0].selectedElements = sectionOffset;
- newSecs[0].selectedPage = sectionPage;
- newSecs[0].resultsLoading = false;
-
- this.dashboardSections = this.dashboardSections?.map(obj =>
- newSecs?.find(section =>
- section.type === obj.type
- ) || obj
- );
- }
-
- evaluateLoading(sectionType, loading) {
- for (let section of this.dashboardSections) {
- if (section.type === sectionType) {
- section.resultsLoading = loading;
- }
- else {
- section.resultsLoading = false;
- }
- }
- }
-
- setIPowerClientsInStore() {
- const now = new Date()
- const item = {
- value: this.selectedIPowerClients,
- expiry: now.getTime() + environment.dashboardSelectedIpowerClientsStorageTime
- }
- localStorage.setItem('selectedIpowerClients', JSON.stringify(item))
- }
-
- getStoredIPowerClients() {
- const selectedIpowerClients = localStorage.getItem('selectedIpowerClients')
-
- if (!selectedIpowerClients) {
- return [];
- }
-
- const item = JSON.parse(selectedIpowerClients)
- const now = new Date()
- if (now.getTime() > item.expiry) {
- localStorage.removeItem(selectedIpowerClients)
- return [];
- }
-
- return item.value;
- }
-
- getClientsByUser() {
- this.ipowerClientsService.getClientsByUser()
- .subscribe(clients => {
- this.iPowerClients = clients;
- const storedIPowerClients = this.getStoredIPowerClients();
- let filteredIPowerClients: IPowerClient[] = [];
- let selectedIPowerClients: string[] = [];
-
- filteredIPowerClients = this.iPowerClients.filter(function (item) {
- return storedIPowerClients.indexOf(item.clientCode) !== -1;
- });
-
- if (filteredIPowerClients.length > 0) {
- filteredIPowerClients.forEach(function (item) {
- selectedIPowerClients.push(item.clientCode);
- });
- this.selectedIPowerClients = selectedIPowerClients;
- }
- else {
- this.selectedIPowerClients = [];
- }
- }, err => {
- this.errorHandlingService.showHttpResponseError(err);
- }, () => {
- this.getData('', 0, 3);
- });
- }
-
- getData(sectionType, sectionPage, sectionOffset) {
- this.evaluateLoading(sectionType, true);
- this.dashboardService.getDashboardSections(sectionType, sectionPage, sectionOffset, this.selectedIPowerClients)
- .subscribe(sections => {
- this.setIPowerClientsInStore();
- if (sectionType !== '') {
- this.patchData(sections, sectionPage, sectionOffset);
- }
- else {
- this.initializeData(sections);
- }
- }, err => {
- this.errorHandlingService.showHttpResponseError(err);
- });
- }
-
- totalElementsChanged(sectionOffset, section) {
- this.getData(section.type, 0, sectionOffset);
- console.log(section);
- }
-
- paginationEvent(paginationEvent) {
- this.getData(paginationEvent.sectionType, paginationEvent.sectionPage, paginationEvent.sectionOffset);
- }
-
-}
diff --git a/app/features/dashboard/dashboard.configuration.ts b/app/features/dashboard/dashboard.configuration.ts
deleted file mode 100644
index 6a3077d..0000000
--- a/app/features/dashboard/dashboard.configuration.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-export class PieConfiguration {
-
- sections: any;
-
- constructor() {
- this.sections = [
- {
- type: 'Invoices',
- options: {
- labels: ['Processes In Total', 'Exceptions In Total', 'Unhandled Records In Total', 'None Ongoing'],
- backgroundColor: ['#933401', '#D04A02', '#FEB791', '#DEDEDE'],
- hoverBackgroundColor: ['#933401', '#D04A02', '#FEB791', '#DEDEDE']
- }
- },
- {
- type: 'Bank Statements',
- options: {
- labels: ['Processes In Total', 'Exceptions In Total', 'Unhandled Records In Total', 'None Ongoing'],
- backgroundColor: ['#933401', '#D04A02', '#FEB791', '#DEDEDE'],
- hoverBackgroundColor: ['#933401', '#D04A02', '#FEB791', '#DEDEDE']
- }
- },
- {
- type: 'Loan Agreements',
- options: {
- labels: ['Processes In Total', 'Exceptions In Total', 'Unhandled Records In Total', 'None Ongoing'],
- backgroundColor: ['#933401', '#D04A02', '#FEB791', '#DEDEDE'],
- hoverBackgroundColor: ['#933401', '#D04A02', '#FEB791', '#DEDEDE']
- }
- },
- {
- type: 'Custodian Statements',
- options: {
- labels: ['Processes In Total', 'Exceptions In Total', 'Unhandled Records In Total', 'None Ongoing'],
- backgroundColor: ['#933401', '#D04A02', '#FEB791', '#DEDEDE'],
- hoverBackgroundColor: ['#933401', '#D04A02', '#FEB791', '#DEDEDE']
- }
- }
- ]
- }
-}
diff --git a/app/features/features-routing.module.ts b/app/features/features-routing.module.ts
deleted file mode 100644
index 9889abf..0000000
--- a/app/features/features-routing.module.ts
+++ /dev/null
@@ -1,59 +0,0 @@
-import { InvoiceProcessingComponent } from './invoice-processes/invoice-processing/invoice-processing.component';
-import { TemplatesManagementComponent } from './administration/templates-management/templates-management.component';
-import { CategoriesManagementComponent } from './administration/categories-management/categories-management.component';
-import { AuthGuard } from './../shared/guards/auth.guard';
-import { LoginComponent } from './login/login.component';
-import { RolesManagementComponent } from './roles/roles-management/roles-management.component';
-//import { WelcomeComponent } from './welcome/welcome.component';
-import { AdministrationComponent } from './administration/administration.component';
-import { DashboardComponent } from './dashboard/dashboard.component';
-import { RolesPerUserComponent } from './roles/roles-per-user/roles-per-user.component';
-import { MainPageComponent } from './../core/main-page/main-page.component';
-import { NgModule } from '@angular/core';
-import { Routes, RouterModule } from '@angular/router';
-import { InboxManagementComponent } from './inbox/inbox-management/inbox-management.component';
-import { InvoiceProcessManagementComponent } from './invoice-processes/invoice-process-management/invoice-process-management.component';
-import { FileDownloadSchedulerComponent } from './file-download/file-download-scheduler/file-download-scheduler.component';
-import { VerificationRulesConfigurationComponent } from './administration/verification-rules-configuration/verification-rules-configuration.component';
-import { ConfiguratorComponent } from "./administration/configurator/configurator.component";
-import { ApplicationLevelExceptionsComponent } from './administration/application-level-exceptions/application-level-exceptions.component';
-
-const routes: Routes = [
- {path: '', redirectTo: '/pages', pathMatch: 'full' },
- {
- path: 'pages',
- component: MainPageComponent,
- canActivate: [],
- children: [
- { path: '', component: DashboardComponent, canActivate: [AuthGuard] },
- { path: 'dashboard', component: DashboardComponent, canActivate: [AuthGuard] },
- { path: 'inbox', component: InboxManagementComponent, canActivate: [AuthGuard] },
- { path: 'processes', component: InvoiceProcessManagementComponent, canActivate: [AuthGuard] },
- { path: 'processes/:clientId/:type', component: InvoiceProcessManagementComponent, canActivate: [AuthGuard] },
- { path: 'processes/:id', component: InvoiceProcessingComponent, canActivate: [AuthGuard] },
- { path: 'administration', component: AdministrationComponent, canActivate: [AuthGuard] },
- {
- path: 'administration',
- children: [
- { path: 'categories-management', component: CategoriesManagementComponent, canActivate: [AuthGuard] },
- { path: 'templates-management', component: TemplatesManagementComponent, canActivate: [AuthGuard] },
- { path: 'verification-management', component: VerificationRulesConfigurationComponent, canActivate: [AuthGuard] },
- { path: 'configurator', component: ConfiguratorComponent, canActivate: [AuthGuard] },
- { path: 'application-level-exceptions', component: ApplicationLevelExceptionsComponent, canActivate: [AuthGuard] },
- { path: 'roles-management', component: RolesManagementComponent, canActivate: [AuthGuard] },
- { path: 'users-management', component: RolesPerUserComponent, canActivate: [AuthGuard] },
- { path: 'downloads-monitoring', component: FileDownloadSchedulerComponent, canActivate: [AuthGuard] }
- ]
- },
- ]
- },
- { path: 'login', component: LoginComponent },
- { path: '**', redirectTo: 'pages', pathMatch: 'full' }
-];
-
-@NgModule({
- imports: [RouterModule.forChild(routes)],
- exports: [RouterModule]
-})
-export class FeaturesRoutingModule {
-}
diff --git a/app/features/features.module.ts b/app/features/features.module.ts
deleted file mode 100644
index f2ade4a..0000000
--- a/app/features/features.module.ts
+++ /dev/null
@@ -1,178 +0,0 @@
-import { TemplatesManagementComponent } from './administration/templates-management/templates-management.component';
-import { SharedModule } from './../shared/shared.module';
-import { PrimengSharedModule } from './../shared/primeng-shared/primeng-shared.module';
-import { NgModule } from '@angular/core';
-import { CommonModule } from '@angular/common';
-import { FeaturesRoutingModule } from './features-routing.module';
-import { WelcomeComponent } from './welcome/welcome.component';
-import { AdministrationComponent } from './administration/administration.component';
-import { DashboardComponent } from './dashboard/dashboard.component';
-import { RolesManagementComponent } from './roles/roles-management/roles-management.component';
-import { RightsPerRoleComponent } from './roles/roles-management/rights-per-role/rights-per-role.component';
-import { RightsProcessesComponent } from './roles/roles-management/rights-per-role/rights-processes/rights-processes.component';
-import { LoginComponent } from './login/login.component';
-import { FormsModule, ReactiveFormsModule } from '@angular/forms';
-import { InboxManagementComponent } from './inbox/inbox-management/inbox-management.component';
-import { InboxSearchFormComponent } from './inbox/inbox-management/inbox-search-form/inbox-search-form.component';
-import { InboxDocumentsTableComponent } from './inbox/inbox-management/inbox-documents-table/inbox-documents-table.component';
-import { IgnoreFileDialogComponent } from './inbox/inbox-management/inbox-dialogs/ignore-file-dialog/ignore-file-dialog.component';
-import { ForwardFileToAbbyForRecognitionDialogComponent } from './inbox/inbox-management/inbox-dialogs/forward-file-to-abby-for-recognition-dialog/forward-file-to-abby-for-recognition-dialog.component';
-import { EditFileClassAndQeueToAbbyForRecognitionDialogComponent } from './inbox/inbox-management/inbox-dialogs/edit-file-class-and-qeue-to-abby-for-recognition-dialog/edit-file-class-and-qeue-to-abby-for-recognition-dialog.component';
-import { DialogService } from 'primeng/dynamicdialog';
-import { NgxDocViewerModule } from 'ngx-doc-viewer';
-import { InvoiceProcessManagementComponent } from './invoice-processes/invoice-process-management/invoice-process-management.component';
-import { InvoiceProcessSearchFormComponent } from './invoice-processes/invoice-process-management/invoice-process-search-form/invoice-process-search-form.component';
-import { InvoiceProcessTableComponent } from './invoice-processes/invoice-process-management/invoice-process-table/invoice-process-table.component';
-import { FileViewerPopupComponent } from './inbox/inbox-management/inbox-dialogs/file-viewer-popup/file-viewer-popup.component';
-import { FileDownloadSearchComponent } from './file-download/file-download-scheduler/file-download-search/file-download-search.component';
-import { FileDownloadRealTimeMonitorComponent } from './file-download/file-download-scheduler/file-download-real-time-monitor/file-download-real-time-monitor.component';
-import { FileDownloadExecutionInfoComponent } from './file-download/file-download-scheduler/file-download-execution-info/file-download-execution-info.component';
-import { FileDownloadSchedulerComponent } from './file-download/file-download-scheduler/file-download-scheduler.component';
-import { FileDownloadConfigurationsComponent } from './file-download/file-download-scheduler/file-download-configurations/file-download-configurations.component';
-import { FileTableDialogComponent } from './file-download/file-download-scheduler/file-download-real-time-monitor/file-table-dialog/file-table-dialog.component';
-import { FileDownloadSchedulerConfigurationsDialogComponent } from './file-download/file-download-scheduler/file-download-configurations/file-download-scheduler-configurations-dialog/file-download-scheduler-configurations-dialog.component';
-import { CategoriesManagementComponent } from './administration/categories-management/categories-management.component';
-import { VerificationRulesConfigurationComponent } from './administration/verification-rules-configuration/verification-rules-configuration.component';
-import { CategoriesSearchComponent } from './administration/categories-management/categories-search/categories-search.component';
-import { CategoriesSearchResultsComponent } from './administration/categories-management/categories-search-results/categories-search-results.component';
-import { TemplatesSearchComponent } from './administration/templates-management/templates-search/templates-search.component';
-import { TemplatesSearchResultsComponent } from './administration/templates-management/templates-search-results/templates-search-results.component';
-import { VerificationRulesSearchComponent } from './administration/verification-rules-configuration/verification-rules-search/verification-rules-search.component';
-import { VerificationRulesSearchResultsComponent } from './administration/verification-rules-configuration/verification-rules-search-results/verification-rules-search-results.component';
-import { CreateCategoryDialogComponent } from './administration/categories-management/create-category-dialog/create-category-dialog.component';
-import { CreateTemplateDialogComponent } from './administration/templates-management/create-template-dialog/create-template-dialog.component';
-import { CategoryFormComponent } from './administration/forms/category-form/category-form.component';
-import { TemplateFormComponent } from './administration/forms/template-form/template-form.component';
-import { VerificationRuleFormComponent } from './administration/forms/verification-rule-form/verification-rule-form.component';
-import { CreateVerificationRuleDialogComponent } from './administration/verification-rules-configuration/create-verification-rule-dialog/create-verification-rule-dialog.component';
-import { VerificationRuleSearchFormComponent } from './administration/forms/verification-rule-search-form/verification-rule-search-form.component';
-import { RolesPerUserComponent } from './roles/roles-per-user/roles-per-user.component';
-import { SearchUserComponent } from './roles/roles-per-user/search-user/search-user.component';
-import { SearchResultsComponent } from './roles/roles-per-user/search-results/search-results.component';
-import { UserRolesComponent } from './roles/roles-per-user/user-roles/user-roles.component';
-import { InvoiceProcessingComponent } from './invoice-processes/invoice-processing/invoice-processing.component';
-import { JournalEntriesVerificationComponent } from './invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification.component';
-import { JournalPreviewDialogComponent } from './invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification-dialogs/journal-preview-dialog/journal-preview-dialog.component';
-import { ProcessExceptionManipulationComponent } from './invoice-processes/invoice-processing/process-exception-manipulation/process-exception-manipulation.component';
-import { ProcessUnhandledDataComponent } from './invoice-processes/invoice-processing/process-unhandled-data/process-unhandled-data.component';
-import { CreateRoleComponent } from './roles/roles-management/create-role/create-role.component';
-import { EditRoleComponent } from './roles/roles-management/edit-role/edit-role.component';
-import { LeftPanelComponent } from './left-panel/left-panel.component';
-import { VerticalMenuComponent } from './vertical-menu/vertical-menu.component';
-import { HorizontalMenuComponent } from './horizontal-menu/horizontal-menu.component';
-import { CardComponent } from './card/card.component';
-import { JournalEditDialogComponent } from './invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification-dialogs/journal-edit-dialog/journal-edit-dialog.component';
-import { PreviewUnhandledDataPopupComponent } from './invoice-processes/invoice-processing/process-unhandled-data/preview-unhandled-data-popup/preview-unhandled-data-popup.component';
-import { DataCapturingAndVerificationComponent } from './invoice-processes/invoice-processing/data-capturing-and-verification/data-capturing-and-verification.component';
-import { ReclassifyUnhandledDataDialogComponent } from './invoice-processes/invoice-processing/process-unhandled-data/reclassify-unhandled-data-dialog/reclassify-unhandled-data-dialog.component';
-import { ExceptionDataPreviewPopupComponent } from './invoice-processes/invoice-processing/process-exception-manipulation/exception-data-preview-popup/exception-data-preview-popup.component';
-import { ConfiguratorComponent } from './administration/configurator/configurator.component';
-import { ConfiguratorListOfParametersComponent } from './administration/configurator/configurator-list-of-parameters/configurator-list-of-parameters.component';
-import { ConfiguratorEditValueComponent } from './administration/configurator/configurator-edit-value/configurator-edit-value.component';
-import { ConfiguratorFormComponent } from './administration/forms/configurator-form/configurator-form.component';
-import { DashboardMetricsComponent } from './dashboard/dashboard-metrics/dashboard-metrics.component';
-import { DashboardProcessesPerClientComponent } from './dashboard/dashboard-processes-per-client/dashboard-processes-per-client.component';
-import { ApplicationLevelExceptionsComponent } from './administration/application-level-exceptions/application-level-exceptions.component';
-import { ApplicationLevelSearchFormComponent } from './administration/application-level-exceptions/application-level-search-form/application-level-search-form.component';
-import { ApplicationLevelTableComponent } from './administration/application-level-exceptions/application-level-table/application-level-table.component';
-import { ApplicationLevelFormComponent } from './administration/forms/application-level-form/application-level-form.component';
-import { ApplicationLevelDialogComponent } from './administration/application-level-exceptions/application-level-dialog/application-level-dialog.component';
-import { MissingRecordsComponent } from './invoice-processes/invoice-processing/missing-records/missing-records/missing-records.component';
-import { BreadcrumbComponent } from './breadcrumb/breadcrumb.component';
-import { JournalViewDialogComponent } from './invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification-dialogs/journal-view-dialog/journal-view-dialog.component';
-import { ProcessHistoryComponent } from './invoice-processes/invoice-processing/process-history/process-history.component';
-
-
-@NgModule({
- declarations: [
- WelcomeComponent,
- RolesManagementComponent,
- RightsPerRoleComponent,
- RightsProcessesComponent,
- LoginComponent,
- RolesPerUserComponent,
- SearchUserComponent,
- SearchResultsComponent,
- UserRolesComponent,
- InboxManagementComponent,
- InboxSearchFormComponent,
- InboxDocumentsTableComponent,
- IgnoreFileDialogComponent,
- ForwardFileToAbbyForRecognitionDialogComponent,
- EditFileClassAndQeueToAbbyForRecognitionDialogComponent,
- FileViewerPopupComponent,
- FileDownloadSchedulerComponent,
- FileDownloadSearchComponent,
- FileDownloadRealTimeMonitorComponent,
- FileDownloadExecutionInfoComponent,
- FileDownloadConfigurationsComponent,
- FileTableDialogComponent,
- FileDownloadSchedulerConfigurationsDialogComponent,
- EditFileClassAndQeueToAbbyForRecognitionDialogComponent,
- FileViewerPopupComponent,
- InvoiceProcessManagementComponent,
- InvoiceProcessSearchFormComponent,
- InvoiceProcessTableComponent,
- CategoriesManagementComponent,
- TemplatesManagementComponent,
- VerificationRulesConfigurationComponent,
- CategoriesSearchComponent,
- CategoriesSearchResultsComponent,
- TemplatesSearchComponent,
- TemplatesSearchResultsComponent,
- VerificationRulesSearchComponent,
- VerificationRulesSearchResultsComponent,
- CreateCategoryDialogComponent,
- CreateTemplateDialogComponent,
- CategoryFormComponent,
- TemplateFormComponent,
- VerificationRuleFormComponent,
- CreateVerificationRuleDialogComponent,
- VerificationRuleSearchFormComponent,
- InvoiceProcessingComponent,
- JournalEntriesVerificationComponent,
- JournalPreviewDialogComponent,
- ProcessExceptionManipulationComponent,
- ProcessUnhandledDataComponent,
- CreateRoleComponent,
- EditRoleComponent,
- AdministrationComponent,
- DashboardComponent,
- LeftPanelComponent,
- VerticalMenuComponent,
- HorizontalMenuComponent,
- CardComponent,
- JournalEditDialogComponent,
- PreviewUnhandledDataPopupComponent,
- DataCapturingAndVerificationComponent,
- ReclassifyUnhandledDataDialogComponent,
- ExceptionDataPreviewPopupComponent,
- ConfiguratorComponent,
- ConfiguratorListOfParametersComponent,
- ConfiguratorEditValueComponent,
- ConfiguratorFormComponent,
- DashboardMetricsComponent,
- DashboardProcessesPerClientComponent,
- ApplicationLevelExceptionsComponent,
- ApplicationLevelSearchFormComponent,
- ApplicationLevelTableComponent,
- ApplicationLevelFormComponent,
- ApplicationLevelDialogComponent,
- MissingRecordsComponent,
- BreadcrumbComponent,
- JournalViewDialogComponent,
- ProcessHistoryComponent
- ],
- imports: [
- CommonModule,
- PrimengSharedModule,
- FeaturesRoutingModule,
- ReactiveFormsModule,
- SharedModule,
- FormsModule,
- NgxDocViewerModule
- ],
- providers: [DialogService]
-})
-export class FeaturesModule {
-}
diff --git a/app/features/file-download/file-download-scheduler/file-download-configurations/file-download-configurations.component.html b/app/features/file-download/file-download-scheduler/file-download-configurations/file-download-configurations.component.html
deleted file mode 100644
index f1cdead..0000000
--- a/app/features/file-download/file-download-scheduler/file-download-configurations/file-download-configurations.component.html
+++ /dev/null
@@ -1,16 +0,0 @@
-
diff --git a/app/features/file-download/file-download-scheduler/file-download-configurations/file-download-configurations.component.scss b/app/features/file-download/file-download-scheduler/file-download-configurations/file-download-configurations.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/file-download/file-download-scheduler/file-download-configurations/file-download-configurations.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/file-download/file-download-scheduler/file-download-configurations/file-download-configurations.component.spec.ts b/app/features/file-download/file-download-scheduler/file-download-configurations/file-download-configurations.component.spec.ts
deleted file mode 100644
index 2055e46..0000000
--- a/app/features/file-download/file-download-scheduler/file-download-configurations/file-download-configurations.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { FileDownloadConfigurationsComponent } from './file-download-configurations.component';
-
-describe('FileDownloadConfigurationsComponent', () => {
- let component: FileDownloadConfigurationsComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ FileDownloadConfigurationsComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(FileDownloadConfigurationsComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/file-download/file-download-scheduler/file-download-configurations/file-download-configurations.component.ts b/app/features/file-download/file-download-scheduler/file-download-configurations/file-download-configurations.component.ts
deleted file mode 100644
index 97b43b0..0000000
--- a/app/features/file-download/file-download-scheduler/file-download-configurations/file-download-configurations.component.ts
+++ /dev/null
@@ -1,42 +0,0 @@
-import {Component, OnInit} from '@angular/core';
-import {DialogService} from 'primeng/dynamicdialog';
-import {FileDownloadSchedulerConfigurationsDialogComponent} from './file-download-scheduler-configurations-dialog/file-download-scheduler-configurations-dialog.component';
-import {InvoiceDownloadSchedulerService} from '../../../../shared/services/invoice-download-scheduler.service';
-import { USER_RIGHTS } from 'src/app/shared/enums/USER_RIGHTS.enum';
-import { environment } from 'src/environments/environment';
-import { AuthService } from 'src/app/shared/services/auth.service';
-
-@Component({
- selector: 'app-file-download-configurations',
- templateUrl: './file-download-configurations.component.html',
- styleUrls: ['./file-download-configurations.component.scss']
-})
-export class FileDownloadConfigurationsComponent implements OnInit {
- frequency: string = '0';
-
- constructor(private dialogService: DialogService, private downloadService: InvoiceDownloadSchedulerService, private authService: AuthService) {
- }
-
- ngOnInit(): void {
- this.downloadService.getCurrentFrequency().subscribe(x => {
- this.frequency = `Every ${x.value} min`;
- });
-
- }
-
- changeConfigurations(): void {
- this.dialogService.open(FileDownloadSchedulerConfigurationsDialogComponent,
- {data: {frequency: this.frequency}})
- .onClose.subscribe(x => {
- // if x returns that means frequency was updated normaly in the back else the window closed from cancel button
- if (x) {
- this.frequency = `Every ${x} min`;
- }
- });
-
- }
-
- canConfigureRepetitionFrequency() : boolean {
- return this.authService.userHasRightForClient(USER_RIGHTS.A01, environment.globalRightsClientID);
- }
-}
diff --git a/app/features/file-download/file-download-scheduler/file-download-configurations/file-download-scheduler-configurations-dialog/file-download-scheduler-configurations-dialog.component.html b/app/features/file-download/file-download-scheduler/file-download-configurations/file-download-scheduler-configurations-dialog/file-download-scheduler-configurations-dialog.component.html
deleted file mode 100644
index e51043a..0000000
--- a/app/features/file-download/file-download-scheduler/file-download-configurations/file-download-scheduler-configurations-dialog/file-download-scheduler-configurations-dialog.component.html
+++ /dev/null
@@ -1,28 +0,0 @@
-
diff --git a/app/features/file-download/file-download-scheduler/file-download-configurations/file-download-scheduler-configurations-dialog/file-download-scheduler-configurations-dialog.component.scss b/app/features/file-download/file-download-scheduler/file-download-configurations/file-download-scheduler-configurations-dialog/file-download-scheduler-configurations-dialog.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/file-download/file-download-scheduler/file-download-configurations/file-download-scheduler-configurations-dialog/file-download-scheduler-configurations-dialog.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/file-download/file-download-scheduler/file-download-configurations/file-download-scheduler-configurations-dialog/file-download-scheduler-configurations-dialog.component.spec.ts b/app/features/file-download/file-download-scheduler/file-download-configurations/file-download-scheduler-configurations-dialog/file-download-scheduler-configurations-dialog.component.spec.ts
deleted file mode 100644
index 2ae21a7..0000000
--- a/app/features/file-download/file-download-scheduler/file-download-configurations/file-download-scheduler-configurations-dialog/file-download-scheduler-configurations-dialog.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { FileDownloadSchedulerConfigurationsDialogComponent } from './file-download-scheduler-configurations-dialog.component';
-
-describe('FileDownloadSchedulerConfigurationsDialogComponent', () => {
- let component: FileDownloadSchedulerConfigurationsDialogComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ FileDownloadSchedulerConfigurationsDialogComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(FileDownloadSchedulerConfigurationsDialogComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/file-download/file-download-scheduler/file-download-configurations/file-download-scheduler-configurations-dialog/file-download-scheduler-configurations-dialog.component.ts b/app/features/file-download/file-download-scheduler/file-download-configurations/file-download-scheduler-configurations-dialog/file-download-scheduler-configurations-dialog.component.ts
deleted file mode 100644
index bcef0e9..0000000
--- a/app/features/file-download/file-download-scheduler/file-download-configurations/file-download-scheduler-configurations-dialog/file-download-scheduler-configurations-dialog.component.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-import {Component, OnInit} from '@angular/core';
-import {DialogService, DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog';
-import {FileDownloadSearchComponent} from '../../file-download-search/file-download-search.component';
-import {InvoiceDownloadSchedulerService} from '../../../../../shared/services/invoice-download-scheduler.service';
-import { NotificationsHandlingService } from 'src/app/shared/services/notifications-handling/notifications-handling.service';
-
-@Component({
- selector: 'app-file-download-scheduler-configurations-dialog',
- templateUrl: './file-download-scheduler-configurations-dialog.component.html',
- styleUrls: ['./file-download-scheduler-configurations-dialog.component.scss']
-
-})
-export class FileDownloadSchedulerConfigurationsDialogComponent implements OnInit {
- //TODO when this window first open it doesn't show the correct value in the dropdown selected after the first time everything is fine
- frequency: string;
- frequencies: string[] = [];
-
- constructor(public ref: DynamicDialogRef, public config: DynamicDialogConfig, private dialogService: DialogService
- , private downloadService: InvoiceDownloadSchedulerService, private notificationService: NotificationsHandlingService) {
- this.config.header = 'Configuration';
- // TODO this must be fixed
- //this.config.width = '23%';
- //this.config.contentStyle = {'text-align': 'center', height: '100%'};
- }
-
- ngOnInit(): void {
- this.downloadService.getTimeIntervals().subscribe(x => {
- console.log(x);
- this.frequencies = x;
- this.frequencies = this.frequencies.map(item => item = `Every ${item} min`);
- this.frequency = this.config?.data?.frequency;
- //this.config.height = `${this.frequencies.length * 5 + 5}%`;
- });
- }
-
- onSave(): void {
- this.downloadService.updateTimeIntervals(this.frequency).subscribe(x => {
- this.notificationService.showUpdateTimeIntervalsSuccess();
- this.ref.close(this.frequency);
- });
- }
-
- closeDialog(): void {
- this.ref.close();
- }
-}
diff --git a/app/features/file-download/file-download-scheduler/file-download-execution-info/file-download-execution-info.component.html b/app/features/file-download/file-download-scheduler/file-download-execution-info/file-download-execution-info.component.html
deleted file mode 100644
index 39a00ed..0000000
--- a/app/features/file-download/file-download-scheduler/file-download-execution-info/file-download-execution-info.component.html
+++ /dev/null
@@ -1,54 +0,0 @@
-
diff --git a/app/features/file-download/file-download-scheduler/file-download-execution-info/file-download-execution-info.component.scss b/app/features/file-download/file-download-scheduler/file-download-execution-info/file-download-execution-info.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/file-download/file-download-scheduler/file-download-execution-info/file-download-execution-info.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/file-download/file-download-scheduler/file-download-execution-info/file-download-execution-info.component.spec.ts b/app/features/file-download/file-download-scheduler/file-download-execution-info/file-download-execution-info.component.spec.ts
deleted file mode 100644
index d628b36..0000000
--- a/app/features/file-download/file-download-scheduler/file-download-execution-info/file-download-execution-info.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { FileDownloadExecutionInfoComponent } from './file-download-execution-info.component';
-
-describe('FileDownloadExecutionInfoComponent', () => {
- let component: FileDownloadExecutionInfoComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ FileDownloadExecutionInfoComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(FileDownloadExecutionInfoComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/file-download/file-download-scheduler/file-download-execution-info/file-download-execution-info.component.ts b/app/features/file-download/file-download-scheduler/file-download-execution-info/file-download-execution-info.component.ts
deleted file mode 100644
index 10bdf2a..0000000
--- a/app/features/file-download/file-download-scheduler/file-download-execution-info/file-download-execution-info.component.ts
+++ /dev/null
@@ -1,63 +0,0 @@
-import {Component, Input, OnInit} from '@angular/core';
-import {FormBuilder, FormGroup} from '@angular/forms';
-import { DatePipe } from '@angular/common';
-import {InvoiceDownloadSchedulerService} from '../../../../shared/services/invoice-download-scheduler.service';
-import { RealTimeExecution } from 'src/app/shared/models/real-time-execution.interface';
-
-@Component({
- selector: 'app-file-download-execution-info',
- templateUrl: './file-download-execution-info.component.html',
- styleUrls: ['./file-download-execution-info.component.scss']
-})
-export class FileDownloadExecutionInfoComponent implements OnInit {
- @Input() executionInfoInput: RealTimeExecution;
- frequency: string = '0';
- executionInfo: FormGroup = this.fb.group({
- startDateTime: [{value: null, disabled: true}],
- elapsedTime: [{value: null, disabled: true}],
- estimatedTime: [{value: null, disabled: true}],
- repetitionFrequency: [{value: null, disabled: true}]
-
- });
-
- results: string;
- currentProcessing: string;
-
- constructor(private fb: FormBuilder, private downloadService: InvoiceDownloadSchedulerService) {
- }
-
- ngOnInit(): void {
- // TODO bounce per 2 secs
- this.executionInfoValue();
- //console.log(this.executionInfo);
- //console.log(this.executionInfoInput);
- }
-
- ngOnChanges(): void {
- this.results = `${this.executionInfoInput?.receivedFiles} Files have been received until now`;
- this.currentProcessing = this.executionInfoInput?.status;
- }
-
- executionInfoValue(): void {
- const datepipe: DatePipe = new DatePipe('en-US');
- this.downloadService.getMetadata().subscribe(x => {
- console.log(x);
- var timeStart = new Date(x?.downloadingProcedureStart).getTime();
- if(x?.downloadingProcedureFinish){
- var diffMs = (new Date(x?.downloadingProcedureFinish).getTime() - timeStart);
- }else{
- var diffMs = (new Date().getTime() - timeStart);
- }
- var diffMins = Math.round(((diffMs % 86400000) % 3600000) / 60000); // minutes
- let formattedDate = datepipe.transform(x?.downloadingProcedureStart, 'dd/MM/yyyy HH:mm');
- let formattedTime = datepipe.transform(x?.estimatedTime, 'HH:mm');
- this.executionInfo.get('startDateTime').setValue(formattedDate);
- this.executionInfo.get('elapsedTime').setValue(diffMins + ' ' + 'min');
- this.executionInfo.get('estimatedTime').setValue(formattedTime);
- });
-
- this.downloadService.getCurrentFrequency().subscribe(x => {
- this.executionInfo.get('repetitionFrequency').setValue(`Every ${x.value} min`);
- });
- }
-}
diff --git a/app/features/file-download/file-download-scheduler/file-download-real-time-monitor/file-download-real-time-monitor.component.html b/app/features/file-download/file-download-scheduler/file-download-real-time-monitor/file-download-real-time-monitor.component.html
deleted file mode 100644
index 6e23158..0000000
--- a/app/features/file-download/file-download-scheduler/file-download-real-time-monitor/file-download-real-time-monitor.component.html
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
-
- Date-Time
- iPower Client Name
- iPower Client Code
- Status
- Results
- Actions
-
-
-
-
- {{downloadProcessTemp?.downloadDate|date: "dd/MM/yyyy HH:mm"}}
- {{downloadProcessTemp?.iPowerClientName}}
- {{downloadProcessTemp?.iPowerClientCode}}
- {{downloadProcessTemp?.status}}
- {{downloadProcessTemp?.results ? downloadProcessTemp?.results + ' ' + 'files received' : '' }}
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/features/file-download/file-download-scheduler/file-download-real-time-monitor/file-download-real-time-monitor.component.scss b/app/features/file-download/file-download-scheduler/file-download-real-time-monitor/file-download-real-time-monitor.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/file-download/file-download-scheduler/file-download-real-time-monitor/file-download-real-time-monitor.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/file-download/file-download-scheduler/file-download-real-time-monitor/file-download-real-time-monitor.component.spec.ts b/app/features/file-download/file-download-scheduler/file-download-real-time-monitor/file-download-real-time-monitor.component.spec.ts
deleted file mode 100644
index f233854..0000000
--- a/app/features/file-download/file-download-scheduler/file-download-real-time-monitor/file-download-real-time-monitor.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { FileDownloadRealTimeMonitorComponent } from './file-download-real-time-monitor.component';
-
-describe('FileDownloadRealTimeMonitorComponent', () => {
- let component: FileDownloadRealTimeMonitorComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ FileDownloadRealTimeMonitorComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(FileDownloadRealTimeMonitorComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/file-download/file-download-scheduler/file-download-real-time-monitor/file-download-real-time-monitor.component.ts b/app/features/file-download/file-download-scheduler/file-download-real-time-monitor/file-download-real-time-monitor.component.ts
deleted file mode 100644
index 742fd75..0000000
--- a/app/features/file-download/file-download-scheduler/file-download-real-time-monitor/file-download-real-time-monitor.component.ts
+++ /dev/null
@@ -1,158 +0,0 @@
-import {Component, EventEmitter, OnDestroy, OnInit, Output} from '@angular/core';
-import {DialogService} from 'primeng/dynamicdialog';
-import {FileTableDialogComponent} from './file-table-dialog/file-table-dialog.component';
-import {takeUntil} from 'rxjs/operators';
-import {interval, Observable, Subject, Subscription} from 'rxjs';
-import {InvoiceDownloadSchedulerService} from '../../../../shared/services/invoice-download-scheduler.service';
-import {DownloadProcessTemp} from '../../../../shared/models/download-process-temp.interafce';
-import {SchedulerCriteriaInterface} from '../../../../shared/models/scheduler-criteria.interface';
-import { RealTimeExecution } from 'src/app/shared/models/real-time-execution.interface';
-import { AuthService } from 'src/app/shared/services/auth.service';
-import { NotificationsHandlingService } from 'src/app/shared/services/notifications-handling/notifications-handling.service';
-import { USER_RIGHTS } from 'src/app/shared/enums/USER_RIGHTS.enum';
-
-@Component({
- selector: 'app-file-download-real-time-monitor',
- templateUrl: './file-download-real-time-monitor.component.html',
- styleUrls: ['./file-download-real-time-monitor.component.scss']
-})
-export class FileDownloadRealTimeMonitorComponent implements OnInit, OnDestroy {
- @Output() executionInfo: EventEmitter = new EventEmitter(true);
- downloadProcessTemp: DownloadProcessTemp[] = [];
- loading = true;
- totalRecords: any;
- status : string = '';
- destroyed$ = new Subject();
- tableValues: DownloadProcessTemp[] = [];
- private subscription: Subscription;
- private criteria: SchedulerCriteriaInterface;
- private currentPage: number;
- private source: Observable;
-
-
- constructor(private dialogService: DialogService, private fileService: InvoiceDownloadSchedulerService, private auth: AuthService, private notificationService: NotificationsHandlingService) {
- }
-
- ngOnInit(): void {
- this.currentPage = 1;
- this.fileService.getAllByUserId(this.auth.userDetails.id).subscribe(documentsDownloaded => {
- this.downloadProcessTemp = documentsDownloaded;
- documentsDownloaded.sort((first, second) => {
- return (first.status > second.status) ? 1 : -1;
- });
- console.log(documentsDownloaded);
-
- this.tableValues = documentsDownloaded;
- console.log(Math.min(documentsDownloaded.length, 10));
- console.log(this.tableValues);
- this.addInfoForExecutionInfo(this.tableValues);
- });
-
- this.source = interval(2000);
- this.subscription = this.source.subscribe(() => {
- this.downloadData();
- });
-
- }
-
-
- showResultsTable(downloadProcessTemp: DownloadProcessTemp): void {
- this.dialogService.open(FileTableDialogComponent, {
- data: [downloadProcessTemp]
- });
- }
-
- reschedule(downloadProcessTemp: DownloadProcessTemp): void {
- this.fileService.reschedule(String(downloadProcessTemp.iPowerClientCode)).subscribe(result => {
- this.notificationService.showRescheduleSuccess();
- });
- this.downloadData();
- }
-
- doNothing(downloadProcessTemp: any): void {
-
- }
-
- highPriority(downloadProcessTemp: DownloadProcessTemp): void {
- this.fileService.highPriority(String(downloadProcessTemp.iPowerClientCode)).subscribe(result => {
- this.notificationService.showHighPrioritySuccess();
- });
- this.downloadData();
-
- }
-
- searchByCriteria(criteria: SchedulerCriteriaInterface): void {
- this.criteria = criteria;
- console.log('criteria', criteria);
- const downloadProcessTemps: DownloadProcessTemp[] = [];
- this.downloadProcessTemp.forEach(x => {
- console.log(x.iPowerClientCode , criteria);
-
- console.log((criteria.status !== undefined && criteria.status !== null ? criteria.status === x.status : true)
- && (criteria.iPowerClientCode !== undefined && criteria.iPowerClientCode !== null &&
- criteria.iPowerClientCode.trim() !== '' ? criteria.iPowerClientCode === x.iPowerClientCode : true));
-
- console.log(x.iPowerClientCode, x.status);
-
- if ((criteria.status !== undefined && criteria.status !== null ? criteria.status === x.status : true)
- && (criteria.iPowerClientCode !== undefined && criteria.iPowerClientCode !== null &&
- criteria.iPowerClientCode.trim() !== '' ? criteria.iPowerClientCode === x.iPowerClientCode : true)) {
- console.log(x);
- downloadProcessTemps.push(x);
- }
- });
- console.log(Math.min(downloadProcessTemps.length, 10 * this.currentPage));
-
- this.tableValues = downloadProcessTemps;
- this.addInfoForExecutionInfo(this.tableValues);
- }
-
- ngOnDestroy(): void {
- this.destroyed$.next();
- this.destroyed$.complete();
- this.subscription.unsubscribe();
- }
-
- private downloadData(): void {
- this.fileService.getAllByUserId(this.auth.userDetails.id).subscribe(documentsDownloaded => {
- this.downloadProcessTemp = documentsDownloaded;
- console.log(this.downloadProcessTemp);
- documentsDownloaded.sort((first, second) => {
- return (first.status > second.status) ? 1 : -1;
- });
- if (this.criteria) {
- this.searchByCriteria(this.criteria);
- } else {
- this.tableValues = documentsDownloaded.slice(0, Math.min(documentsDownloaded.length, 10 * this.currentPage));
- }
- });
- }
-
- onPageChange(event: any): void {
- // TODO implement method that changes the pages
- console.log(event);
- this.currentPage = event.first / event.rows;
- this.downloadData();
-
- }
-
- addInfoForExecutionInfo(value: DownloadProcessTemp[]) {
- let sum = 0;
- value.forEach((element) => {
- sum = sum + element.results;
-
- if(element.status == 'Working' && element.status != undefined){
- this.status = element.iPowerClientName;
- }
- });
- console.log(sum);
- if(this.status != undefined){
- this.executionInfo.emit({ receivedFiles: sum ,status: this.status });
-
- }
- }
-
- canRescheculeUA() : boolean {
- return this.auth.userRights.find(rdc => USER_RIGHTS.A04.isGrantedToUser(rdc.rights)) != null;
- }
-}
diff --git a/app/features/file-download/file-download-scheduler/file-download-real-time-monitor/file-table-dialog/file-table-dialog.component.html b/app/features/file-download/file-download-scheduler/file-download-real-time-monitor/file-table-dialog/file-table-dialog.component.html
deleted file mode 100644
index 952ad74..0000000
--- a/app/features/file-download/file-download-scheduler/file-download-real-time-monitor/file-table-dialog/file-table-dialog.component.html
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
- Received Date
- Doc Code
- Doc Name
- Doc Type
- iPower Client Name
- iPower Client Code
- Personal Data
- Status
- Preview Document
-
-
-
-
- {{receivedFiles?.rtaReceivedDate|date: "dd/MM/yyyy HH:mm"}}
- {{receivedFiles?.dmsDocumentNumber}}
- {{receivedFiles?.dmsFileName}}
- {{receivedFiles?.dmsFileType}}
- {{receivedFiles?.iPowerClientName}}
- {{receivedFiles?.dmsClientCode}}
- {{!receivedFiles?.dmsPersonalData ? 'No': 'Yes'}}
- {{receivedFiles?.statusPerDocument?.documentCurrentStatusId?.name}}
-
-
-
-
-
-
-
-
-
diff --git a/app/features/file-download/file-download-scheduler/file-download-real-time-monitor/file-table-dialog/file-table-dialog.component.scss b/app/features/file-download/file-download-scheduler/file-download-real-time-monitor/file-table-dialog/file-table-dialog.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/file-download/file-download-scheduler/file-download-real-time-monitor/file-table-dialog/file-table-dialog.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/file-download/file-download-scheduler/file-download-real-time-monitor/file-table-dialog/file-table-dialog.component.spec.ts b/app/features/file-download/file-download-scheduler/file-download-real-time-monitor/file-table-dialog/file-table-dialog.component.spec.ts
deleted file mode 100644
index 51e2ac5..0000000
--- a/app/features/file-download/file-download-scheduler/file-download-real-time-monitor/file-table-dialog/file-table-dialog.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { FileTableDialogComponent } from './file-table-dialog.component';
-
-describe('FileTableDialogComponent', () => {
- let component: FileTableDialogComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ FileTableDialogComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(FileTableDialogComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/file-download/file-download-scheduler/file-download-real-time-monitor/file-table-dialog/file-table-dialog.component.ts b/app/features/file-download/file-download-scheduler/file-download-real-time-monitor/file-table-dialog/file-table-dialog.component.ts
deleted file mode 100644
index b56f012..0000000
--- a/app/features/file-download/file-download-scheduler/file-download-real-time-monitor/file-table-dialog/file-table-dialog.component.ts
+++ /dev/null
@@ -1,49 +0,0 @@
-import {Component, OnInit, ViewChild} from '@angular/core';
-import {DialogService, DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog';
-import {InboxDocumentsTableComponent} from '../../../../inbox/inbox-management/inbox-documents-table/inbox-documents-table.component';
-import {FileViewerPopupComponent} from '../../../../inbox/inbox-management/inbox-dialogs/file-viewer-popup/file-viewer-popup.component';
-import { ReceivedFile } from 'src/app/shared/models/inbox-document.interface';
-import { DownloadProcessTemp } from 'src/app/shared/models/download-process-temp.interafce';
-import { ReceivedFilesService } from 'src/app/shared/services/received-files.service';
-
-@Component({
- selector: 'app-file-table-dialog',
- templateUrl: './file-table-dialog.component.html',
- styleUrls: ['./file-table-dialog.component.scss']
-})
-export class FileTableDialogComponent implements OnInit {
- downloadProcessTemp: DownloadProcessTemp;
- receivedFiles: ReceivedFile[];
-
- constructor(public ref: DynamicDialogRef, public config: DynamicDialogConfig, private dialogService: DialogService, private receivedFilesService: ReceivedFilesService) {
- this.config.header = 'Forward Documents';
- }
-
- // @ViewChild(InboxDocumentsTableComponent, {static: true})
- // inboxDocumentsTable: InboxDocumentsTableComponent;
-
- ngOnInit(): void {
- this.downloadProcessTemp = this.config.data[0]
- console.log(this.downloadProcessTemp);
-
- this.receivedFilesService.getLatestFilesByIpowerClientId(this.downloadProcessTemp.iPowerClientCode).subscribe(result => {
- console.log(result);
- this.receivedFiles = result;
- console.log(this.receivedFiles);
- this.receivedFiles.map(item=> item.iPowerClientName = this.downloadProcessTemp.iPowerClientName);
- },
- error => {
- console.log('error');
- });
- console.log( this.config);
- console.log(this.downloadProcessTemp);
-
- // this.inboxDocumentsTable.documents = this.documents;
- }
-
- showOrDownloadFile(downloadProcessTemp: any): void {
-
- this.dialogService.open(FileViewerPopupComponent, {data: downloadProcessTemp});
- }
-
-}
diff --git a/app/features/file-download/file-download-scheduler/file-download-scheduler.component.html b/app/features/file-download/file-download-scheduler/file-download-scheduler.component.html
deleted file mode 100644
index 76c4612..0000000
--- a/app/features/file-download/file-download-scheduler/file-download-scheduler.component.html
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
-
-
{{'SCHEDULING-PROCEDURE-FOR-FILES-DOWNLOADING' | translate}}
-
-
-
-
-
-
-
-
-
diff --git a/app/features/file-download/file-download-scheduler/file-download-scheduler.component.scss b/app/features/file-download/file-download-scheduler/file-download-scheduler.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/file-download/file-download-scheduler/file-download-scheduler.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/file-download/file-download-scheduler/file-download-scheduler.component.spec.ts b/app/features/file-download/file-download-scheduler/file-download-scheduler.component.spec.ts
deleted file mode 100644
index 739eec5..0000000
--- a/app/features/file-download/file-download-scheduler/file-download-scheduler.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { FileDownloadSchedulerComponent } from './file-download-scheduler.component';
-
-describe('FileDownloadSchedulerComponent', () => {
- let component: FileDownloadSchedulerComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ FileDownloadSchedulerComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(FileDownloadSchedulerComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/file-download/file-download-scheduler/file-download-scheduler.component.ts b/app/features/file-download/file-download-scheduler/file-download-scheduler.component.ts
deleted file mode 100644
index b6a59d9..0000000
--- a/app/features/file-download/file-download-scheduler/file-download-scheduler.component.ts
+++ /dev/null
@@ -1,66 +0,0 @@
-import {Component, OnInit, ViewChild} from '@angular/core';
-import {FileDownloadSearchComponent} from './file-download-search/file-download-search.component';
-import {FileDownloadRealTimeMonitorComponent} from './file-download-real-time-monitor/file-download-real-time-monitor.component';
-import { RealTimeExecution } from 'src/app/shared/models/real-time-execution.interface';
-import { AuthService } from 'src/app/shared/services/auth.service';
-import { environment } from 'src/environments/environment';
-import { USER_RIGHTS } from 'src/app/shared/enums/USER_RIGHTS.enum';
-
-@Component({
- selector: 'app-file-download-scheduler',
- templateUrl: './file-download-scheduler.component.html',
- styleUrls: ['./file-download-scheduler.component.scss']
-})
-export class FileDownloadSchedulerComponent implements OnInit {
- get fileDownloadMonitoringTable(): FileDownloadRealTimeMonitorComponent {
- return this._fileDownloadMonitoringTable;
- }
-
- @ViewChild(FileDownloadRealTimeMonitorComponent, {static: false})
- set fileDownloadMonitoringTable(value: FileDownloadRealTimeMonitorComponent) {
- if (value) {
- this._fileDownloadMonitoringTable = value;
- this._fileDownloadMonitoringTable.searchByCriteria(
- this.fileDownloadSearch.searchFilter.value);
- }
- }
-
- searchFilter: any;
- executionInfo: RealTimeExecution;
-
- @ViewChild(FileDownloadSearchComponent, {static: true})
- fileDownloadSearch: FileDownloadSearchComponent;
-
- private _fileDownloadMonitoringTable: FileDownloadRealTimeMonitorComponent;
-
- constructor(private authService: AuthService) {
- }
-
- ngOnInit(): void {
- }
-
- searchByCriteria(): void {
- this.searchFilter = this.fileDownloadSearch.searchFilter.value;
- if (this.fileDownloadMonitoringTable) {
- this._fileDownloadMonitoringTable.searchByCriteria(
- this.fileDownloadSearch.searchFilter.value);
- }
- }
-
- clear() {
- this.fileDownloadSearch.resetForm();
- }
-
- public passData(executionInfo: RealTimeExecution): void {
- console.log(executionInfo);
- this.executionInfo = executionInfo;
- }
-
- canPreviewAll() : boolean {
- return this.authService.userHasRightForClient(USER_RIGHTS.A02, environment.globalRightsClientID);
- }
-
- canPreviewByUA() : boolean {
- return this.authService.userRights.find(rdc => USER_RIGHTS.A03.isGrantedToUser(rdc.rights)) != null;
- }
-}
diff --git a/app/features/file-download/file-download-scheduler/file-download-search/file-download-search.component.html b/app/features/file-download/file-download-scheduler/file-download-search/file-download-search.component.html
deleted file mode 100644
index 7871a0c..0000000
--- a/app/features/file-download/file-download-scheduler/file-download-search/file-download-search.component.html
+++ /dev/null
@@ -1,34 +0,0 @@
-
diff --git a/app/features/file-download/file-download-scheduler/file-download-search/file-download-search.component.scss b/app/features/file-download/file-download-scheduler/file-download-search/file-download-search.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/file-download/file-download-scheduler/file-download-search/file-download-search.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/file-download/file-download-scheduler/file-download-search/file-download-search.component.spec.ts b/app/features/file-download/file-download-scheduler/file-download-search/file-download-search.component.spec.ts
deleted file mode 100644
index a5be5eb..0000000
--- a/app/features/file-download/file-download-scheduler/file-download-search/file-download-search.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { FileDownloadSearchComponent } from './file-download-search.component';
-
-describe('FileDownloadSearchComponent', () => {
- let component: FileDownloadSearchComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ FileDownloadSearchComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(FileDownloadSearchComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/file-download/file-download-scheduler/file-download-search/file-download-search.component.ts b/app/features/file-download/file-download-scheduler/file-download-search/file-download-search.component.ts
deleted file mode 100644
index 5d0ff04..0000000
--- a/app/features/file-download/file-download-scheduler/file-download-search/file-download-search.component.ts
+++ /dev/null
@@ -1,128 +0,0 @@
-import {Component, OnInit} from '@angular/core';
-import {FormBuilder, FormGroup} from '@angular/forms';
-import {InvoiceDownloadSchedulerService} from '../../../../shared/services/invoice-download-scheduler.service';
-import {findAll} from '@angular/compiler-cli/ngcc/src/utils';
-import { IPowerClient } from 'src/app/shared/models/ipower-client.interface';
-import { Observable } from 'rxjs';
-import { USER_RIGHTS } from 'src/app/shared/enums/USER_RIGHTS.enum';
-import { environment } from 'src/environments/environment';
-import { AuthService } from 'src/app/shared/services/auth.service';
-import { IpowerClientsService } from 'src/app/shared/services/administration/ipower-clients.service';
-import { ErrorHandlingService } from 'src/app/shared/services/error-handling/error-handling.service';
-
-@Component({
- selector: 'app-file-download-search',
- templateUrl: './file-download-search.component.html',
- styleUrls: ['./file-download-search.component.scss']
-})
-export class FileDownloadSearchComponent implements OnInit {
- searchFilter: FormGroup;
- suggestionsForWorkspace = [];
- fileStatusList: string[];
- workSpaces: string[] = [];
- iPowerClientCodeSuggestions: string[];
- iPowerClientSuggestions: IPowerClient[];
- endpointToSubscribeTo : IPowerClient[];
- iPowerClientNameSuggestions: any;
- private selectedIPowerClient: IPowerClient;
-
- constructor(private fb: FormBuilder, private downloadService: InvoiceDownloadSchedulerService, private authService: AuthService, private iPowerClientsService: IpowerClientsService,
- private errorHandlingService: ErrorHandlingService) {
- }
-
- ngOnInit(): void {
- this.downloadService.getStatuses().subscribe(x => {
- this.fileStatusList = x;
- });
- this.downloadService.getWorkspaces().subscribe(x => {
- this.workSpaces = x;
- });
- this.searchFilter = this.fb.group({
- iPowerClientName: [{value: null, disabled: false}],
- iPowerClientCode: [{value: null, disabled: false}],
- status: [{value: null, disabled: false}]
- });
- }
-
- // searchWorkspace($event: any): void {
- // this.suggestionsForWorkspace = this.workSpaces.filter(x => {
- // return x.search(this.searchFilter.get('clientWorkspace').value);
- // });
- // }
-
- autosuggestIPowerClientCode(event) {
-
- if (event.query.length < 3) {
- this.iPowerClientCodeSuggestions = [];
- return;
- }
-
- // If the user has the right to Preview of Scheduling Procedure (A02), we use the endpoint that returns all iPowerClients,
- // otherwise, the one that checks for the user's User_Access too. Whether the user can see ANY rule has already been handled by the 'search' button.
- let endpointToSubscribeTo: Observable = this.authService.userHasRightForClient(USER_RIGHTS.A02, environment.globalRightsClientID)
- ? this.iPowerClientsService.getClientsByCodeOnly(event.query)
- : this.authService.userRights.find(rdc => USER_RIGHTS.A03.isGrantedToUser(rdc.rights)) != null ? this.iPowerClientsService.getClientsByCodeDistinct(event.query) : null;
-
- endpointToSubscribeTo.subscribe(
- (values: IPowerClient[]) => {
- let temp: string[] = [];
- this.iPowerClientSuggestions = values;
- values.map(val => temp.push(val.clientCode));
- this.iPowerClientCodeSuggestions = temp
- },
- err => this.errorHandlingService.showHttpResponseError(err)
- );
- }
-
- /*
- * Auto-suggest & Auto-complete IPower Client
- */
- autosuggestIPowerClientName(event): void {
-
- if (!event.query || event.query.length < 3) {
- this.iPowerClientNameSuggestions = [];
- return;
- }
-
- // If the user has the right to Preview of Scheduling Procedure (A02), we use the endpoint that returns all iPowerClients,
- // otherwise, the one that checks for the user's User_Access too. Whether the user can see ANY rule has already been handled by the 'search' button.
- let endpointToSubscribeTo: Observable = this.authService.userHasRightForClient(USER_RIGHTS.A02, environment.globalRightsClientID)
- ? this.iPowerClientsService.getClientsByNameOnly(event.query)
- : this.authService.userRights.find(rdc => USER_RIGHTS.A03.isGrantedToUser(rdc.rights)) != null ? this.iPowerClientsService.getClientsByNameDistinct(event.query) : null;
-
- endpointToSubscribeTo.subscribe(
- (values: IPowerClient[]) => {
- this.iPowerClientSuggestions = values;
-
- const temp: string[] = [];
- values.map(val => temp.push(val.name));
- this.iPowerClientNameSuggestions = temp;
- },
- err => console.error(err) // TODO: Handle this via a Messaging Service
- );
-}
-
- public resetForm(): void {
- this.searchFilter.reset();
- }
-
- canPreviewAll() : boolean {
- return this.authService.userHasRightForClient(USER_RIGHTS.A02, environment.globalRightsClientID);
- }
-
- canPreviewByUA() : boolean {
- return this.authService.userRights.find(rdc => USER_RIGHTS.A03.isGrantedToUser(rdc.rights)) != null;
- }
-
- iPowerClientNameSelected(name: string): void {
- this.selectedIPowerClient = this.iPowerClientSuggestions.find(client => client.name === name);
- this.searchFilter.get('iPowerClientCode').patchValue(this.selectedIPowerClient ? this.selectedIPowerClient.clientCode : '');
- this.searchFilter.updateValueAndValidity();
- }
-
- iPowerClientCodeSelected(code: string): void {
- this.selectedIPowerClient = this.iPowerClientSuggestions.find(client => client.clientCode === code);
- this.searchFilter.get('iPowerClientName').patchValue(this.selectedIPowerClient ? this.selectedIPowerClient.name : '');
- this.searchFilter.updateValueAndValidity();
- }
-}
diff --git a/app/features/horizontal-menu/horizontal-menu.component.html b/app/features/horizontal-menu/horizontal-menu.component.html
deleted file mode 100644
index e9e85db..0000000
--- a/app/features/horizontal-menu/horizontal-menu.component.html
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
- {{'SESSION_TIMEOUT' | translate}}: {{auth.tokenExpiresInSec$ | async | hourMinutesSecs}}
-
-
-
-
-
-
diff --git a/app/features/horizontal-menu/horizontal-menu.component.scss b/app/features/horizontal-menu/horizontal-menu.component.scss
deleted file mode 100644
index 3acc5f1..0000000
--- a/app/features/horizontal-menu/horizontal-menu.component.scss
+++ /dev/null
@@ -1,208 +0,0 @@
-@import 'src/styles';
-
-.info {
- min-width: 210px;
-}
-
-.session-timer {
- font-size: 0.75em;
- text-align: right;
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
-}
-
-::ng-deep .session-timer i {
- font-size: 0.75em;
-}
-
-:host ::ng-deep .p-component {
- font-weight: 600;
-
- &.p-menubar {
- padding: 0;
- color: $black;
- border: none;
- width: 100%;
- border-radius: unset;
- background: $light-grey;
- position: sticky;
- top: 0;
- z-index: 1;
-
- .p-menubar-root-list {
- line-height: 1em;
- background: $light-grey;
-
- .p-menuitem {
- text-align: center;
- display: inline-block;
-
- .p-menuitem-link {
- padding: 15px 15px;
- background: $light-grey;
- color: $black;
- transition: 0.2s;
- border-radius: unset;
- border-right: 1px solid $black;
-
- &:hover {
- background: $black;
-
- .p-menuitem-text {
- color: $white;
- }
-
- .p-menuitem-icon {
- color: $white;
- }
-
- .p-submenu-icon {
- color: $white;
- }
- }
-
- &:focus {
- box-shadow: none;
- }
-
- &.p-menuitem-link-active {
- background: $orange;
-
- .p-menuitem-text {
- color: $white;
- }
-
- .p-menuitem-icon {
- color: $white;
- }
-
- .p-submenu-icon {
- color: $white;
- }
- }
-
- .p-menuitem-text {
- color: $black;
- transition: 0.2s;
- }
-
- .p-menuitem-icon {
- color: $black;
- transition: 0.2s;
- }
-
- .p-submenu-icon {
- color: $black;
- transition: 0.2s;
- }
- }
-
- &:last-child {
- .p-menuitem-link {
- border-right: unset;
- }
- }
- }
- }
-
- .p-submenu-list {
- width: 13.5rem;
- padding: 0;
- background: $medium-grey;
-
- .p-menuitem {
- width: 100%;
- text-align: left;
-
- .p-menuitem-link {
- padding: 10px 10px;
- background: $medium-grey;
- color: $white;
- transition: 0.2s;
- border-radius: unset;
- border: unset;
- font-size: 0.9em;
-
- .p-menuitem-text {
- width: 100%;
- color: $white;
- }
- }
- }
- }
- }
-
- &.p-button-logout {
- background: $orange;
- color: $white;
- border: 1px solid $orange;
- border-radius: unset;
- padding: 0.7rem;
-
- &:hover {
- background: $dark-orange-1;
- color: $white;
- border: 1px solid $dark-orange-1;
- }
-
- &:focus {
- box-shadow: unset;
- }
- }
-}
-
-@media (max-width: 960px) {
- :host ::ng-deep .p-component {
- &.p-menubar {
- color: $black;
- width: auto;
- background: white;
- top: -1px;
-
- .p-menubar-button {
- border-radius: unset;
- background: $light-grey;
- color: $black;
- width: 2.9rem;
- height: 2.9rem;
-
- &:hover {
- color: $white;
- background: $black;
- }
-
- &:focus {
- box-shadow: unset;
- }
- }
-
- .p-menubar-root-list {
- padding: 0;
-
- .p-menuitem {
-
- &:first-child {
- .p-menuitem-link {
- border-top: unset;
- }
- }
-
- .p-menuitem-link {
- border-right: unset;
- border-top: 1px solid $black;
- }
- }
- }
-
- .p-submenu-list {
- width: 100%;
-
- .p-menuitem {
- .p-menuitem-link {
- border-top: unset;
- padding: 10px 40px;
- }
- }
- }
- }
- }
-}
diff --git a/app/features/horizontal-menu/horizontal-menu.component.spec.ts b/app/features/horizontal-menu/horizontal-menu.component.spec.ts
deleted file mode 100644
index 93b6b56..0000000
--- a/app/features/horizontal-menu/horizontal-menu.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { HorizontalMenuComponent } from './horizontal-menu.component';
-
-describe('HorizontalMenuComponent', () => {
- let component: HorizontalMenuComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [HorizontalMenuComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(HorizontalMenuComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/horizontal-menu/horizontal-menu.component.ts b/app/features/horizontal-menu/horizontal-menu.component.ts
deleted file mode 100644
index 5d1d7fc..0000000
--- a/app/features/horizontal-menu/horizontal-menu.component.ts
+++ /dev/null
@@ -1,126 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-import { MenuItem } from 'primeng/api';
-import { dispatch } from 'rxjs/internal/observable/pairs';
-import { AuthService } from './../../shared/services/auth.service';
-
-@Component({
- selector: 'app-horizontal-menu',
- templateUrl: './horizontal-menu.component.html',
- styleUrls: ['./horizontal-menu.component.scss']
-})
-export class HorizontalMenuComponent implements OnInit {
-
- loggedIn = false;
- horizontalMenu: MenuItem[];
-
- constructor(public auth: AuthService) { }
-
- ngOnInit(): void {
- this.loggedIn = this.auth.isLoggedIn();
- this.auth.authStatusChanged.subscribe(loggedIn => {
- this.loggedIn = loggedIn;
- this.initializeMenuItems();
- });
- this.initializeMenuItems();
- }
-
- initializeMenuItems() {
- this.horizontalMenu = [
- {
- label: 'Home',
- icon: 'pi pi-home',
- routerLink: '/pages/dashboard',
- },
- {
- label: 'Inbox',
- icon: 'pi pi-inbox',
- routerLink: '/pages/inbox'
- },
- {
- label: 'Processes',
- icon: 'pi pi-th-large',
- routerLink: '/pages/processes'
- },
- {
- label: 'Administration',
- icon: 'pi pi-cog',
- items: [
- {
- label: 'Downloads Monitoring',
- routerLink: '/pages/administration/downloads-monitoring',
- routerLinkActiveOptions: {
- exact: true
- }
- },
- {
- separator: true,
- },
- {
- label: 'Categories Managenent',
- routerLink: '/pages/administration/categories-management',
- routerLinkActiveOptions: {
- exact: true
- }
- },
- {
- label: 'Templates Managenent',
- routerLink: '/pages/administration/templates-management',
- routerLinkActiveOptions: {
- exact: true
- }
- },
- {
- label: 'Verification Managenent',
- routerLink: '/pages/administration/verification-management',
- routerLinkActiveOptions: {
- exact: true
- }
- },
- {
- label: 'Configurator',
- routerLink: '/pages/administration/configurator',
- routerLinkActiveOptions: {
- exact: true
- }
- },
- {
- separator: true,
- },
- {
- label: 'Users Managenent',
- routerLink: '/pages/administration/users-management',
- routerLinkActiveOptions: {
- exact: true
- }
- },
- {
- label: 'Roles Managenent',
- routerLink: '/pages/administration/roles-management',
- routerLinkActiveOptions: {
- exact: true
- }
- },
- {
- separator: true,
- },
- {
- label: 'Application Level Exceptions',
- routerLink: '/pages/administration/application-level-exceptions',
- routerLinkActiveOptions: {
- exact: true
- }
- }
- ]
- },
- {
- label: 'Reports - Statistics',
- icon: 'pi pi-chart-line',
- disabled: true
- }
- ];
- }
-
- logout(): void {
- this.auth.logout();
- }
-}
diff --git a/app/features/inbox/inbox-management/inbox-dialogs/edit-file-class-and-qeue-to-abby-for-recognition-dialog/edit-file-class-and-qeue-to-abby-for-recognition-dialog.component.html b/app/features/inbox/inbox-management/inbox-dialogs/edit-file-class-and-qeue-to-abby-for-recognition-dialog/edit-file-class-and-qeue-to-abby-for-recognition-dialog.component.html
deleted file mode 100644
index 7d32b40..0000000
--- a/app/features/inbox/inbox-management/inbox-dialogs/edit-file-class-and-qeue-to-abby-for-recognition-dialog/edit-file-class-and-qeue-to-abby-for-recognition-dialog.component.html
+++ /dev/null
@@ -1,93 +0,0 @@
-
-
-
-
-
-
- Received Date
- Doc Name
- Doc Type
- Doc Code
- iPower Client Code
- Preview Document
-
-
-
-
- {{document?.rtaReceivedDate|date: "dd/MM/yyyy HH:mm"}}
- {{document?.dmsFileName}}
- {{document?.dmsFileType}}
- {{document?.dmsDocumentNumber}}
- {{document?.dmsClientCode}}
-
-
-
-
-
-
-
-
-
-
-
-
- Select Classification:
-
-
-
-
-
- Select Sub-Classification:
-
-
-
-
-
-
-
-
diff --git a/app/features/inbox/inbox-management/inbox-dialogs/edit-file-class-and-qeue-to-abby-for-recognition-dialog/edit-file-class-and-qeue-to-abby-for-recognition-dialog.component.scss b/app/features/inbox/inbox-management/inbox-dialogs/edit-file-class-and-qeue-to-abby-for-recognition-dialog/edit-file-class-and-qeue-to-abby-for-recognition-dialog.component.scss
deleted file mode 100644
index 081f17f..0000000
--- a/app/features/inbox/inbox-management/inbox-dialogs/edit-file-class-and-qeue-to-abby-for-recognition-dialog/edit-file-class-and-qeue-to-abby-for-recognition-dialog.component.scss
+++ /dev/null
@@ -1,18 +0,0 @@
-@import 'src/styles';
-
-#cancelBtn {
- margin-right: 15px;
-}
-
-#content {
- //this.config.height - title.height
- min-height: 49vh;
-}
-
-#subClassificationContainer {
- margin-bottom: 20px;
-}
-
-#tableContainer {
- margin-bottom: 40px;
-}
diff --git a/app/features/inbox/inbox-management/inbox-dialogs/edit-file-class-and-qeue-to-abby-for-recognition-dialog/edit-file-class-and-qeue-to-abby-for-recognition-dialog.component.spec.ts b/app/features/inbox/inbox-management/inbox-dialogs/edit-file-class-and-qeue-to-abby-for-recognition-dialog/edit-file-class-and-qeue-to-abby-for-recognition-dialog.component.spec.ts
deleted file mode 100644
index 78a0dc2..0000000
--- a/app/features/inbox/inbox-management/inbox-dialogs/edit-file-class-and-qeue-to-abby-for-recognition-dialog/edit-file-class-and-qeue-to-abby-for-recognition-dialog.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { EditFileClassAndQeueToAbbyForRecognitionDialogComponent } from './edit-file-class-and-qeue-to-abby-for-recognition-dialog.component';
-
-describe('EditFileClassAndQeueToAbbyForRecognitionDialogComponent', () => {
- let component: EditFileClassAndQeueToAbbyForRecognitionDialogComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ EditFileClassAndQeueToAbbyForRecognitionDialogComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(EditFileClassAndQeueToAbbyForRecognitionDialogComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/inbox/inbox-management/inbox-dialogs/edit-file-class-and-qeue-to-abby-for-recognition-dialog/edit-file-class-and-qeue-to-abby-for-recognition-dialog.component.ts b/app/features/inbox/inbox-management/inbox-dialogs/edit-file-class-and-qeue-to-abby-for-recognition-dialog/edit-file-class-and-qeue-to-abby-for-recognition-dialog.component.ts
deleted file mode 100644
index 93e8055..0000000
--- a/app/features/inbox/inbox-management/inbox-dialogs/edit-file-class-and-qeue-to-abby-for-recognition-dialog/edit-file-class-and-qeue-to-abby-for-recognition-dialog.component.ts
+++ /dev/null
@@ -1,103 +0,0 @@
-import {Component, OnInit} from '@angular/core';
-import {DocumentClassification} from '../../../../../shared/models/document-classification.interface';
-import {DocumentSubclassification} from '../../../../../shared/models/document-subclassification.interface';
-import {DialogService, DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog';
-import {FileViewerPopupComponent} from '../file-viewer-popup/file-viewer-popup.component';
-import {InboxManagementService} from '../../../../../shared/services/inbox-management.service';
-import {DocumentClassificationService} from '../../../../../shared/services/document-classification.service';
-import {DocumentSubclassificationService} from '../../../../../shared/services/document-subclassification.service';
-import {InboxBatch} from '../../../../../shared/models/inbox-batch.interface';
-import {ReceivedFile} from '../../../../../shared/models/inbox-document.interface';
-import { NotificationsHandlingService } from 'src/app/shared/services/notifications-handling/notifications-handling.service';
-import { ReceivedFiles } from 'src/app/shared/models/receivedFiles.interface';
-
-@Component({
- selector: 'app-edit-file-class-and-qeue-to-abby-for-recognition-dialog',
- templateUrl: './edit-file-class-and-qeue-to-abby-for-recognition-dialog.component.html',
- styleUrls: ['./edit-file-class-and-qeue-to-abby-for-recognition-dialog.component.scss']
-})
-export class EditFileClassAndQeueToAbbyForRecognitionDialogComponent implements OnInit {
-
- selectedClassification = null;
- selectedSubClassification = null;
- documents: ReceivedFiles[];
- subclassificationOptionsDepSelection: DocumentSubclassification[] = [];
-
- // TODO: Uncomment below when we have services
- classificationOptions: DocumentClassification[] = [];
-
- // TODO: Uncomment below when we have services
- subclassificationOptions: DocumentSubclassification[] = [];
-
- // TODO: Comment below when we have services
- private documentBatch: InboxBatch;
-
- constructor(public ref: DynamicDialogRef
- , public config: DynamicDialogConfig
- , private dialogService: DialogService
- , private inboxService: InboxManagementService
- , private documentClassificationsService: DocumentClassificationService
- , private documentSubclassificationService: DocumentSubclassificationService
- , private notificationService: NotificationsHandlingService) {
-
- this.config.width = '80vw';
- this.config.height = '60vh';
- this.config.header = this.config.data.title;
- }
-
- ngOnInit(): void {
-
- // TODO: call service to get classifications. when it is ready
- // TODO: call service to get subclassifications. when it is ready
- console.log('hey', this.config.data);
- // this.selectedClassification = this.classificationOptions[0].classificationName;
- this.documentBatch = this.config.data.document;
- this.documents = [this.documentBatch.receivedFile];
- this.documentClassificationsService.getAll().subscribe(classes => {
-
- this.classificationOptions = classes;
- this.documentSubclassificationService.getAll().subscribe(subclasses => {
- this.subclassificationOptions = subclasses;
- this.toBeNamed();
- });
-
- });
-
- }
-
- toBeNamed(): void {
- console.log(this.subclassificationOptions);
- this.subclassificationOptionsDepSelection = this.subclassificationOptions.filter((item) => {
- console.log(item);
- return item.documentClassification.classificationName === this.selectedClassification;
- });
- }
-
- showOrDownloadFile(document: any): void {
- this.dialogService.open(FileViewerPopupComponent, {data: document});
- }
-
- onClassificationSelect($event): void {
- this.subclassificationOptionsDepSelection = this.subclassificationOptions.filter((item) => {
- return item.documentClassification.classificationName === this.selectedClassification;
- });
- }
-
- onClassify(): void {
- // TODO: Update documents classification and sub-classification on click of classify
-
- const inboxBatch = this.documentBatch;
- (inboxBatch.receivedFile as ReceivedFile).abbyClassification = this.selectedClassification;
- (inboxBatch.receivedFile as ReceivedFile).abbySubClassification = this.selectedSubClassification;
- this.inboxService.reclassify(inboxBatch).subscribe( result => {
- this.notificationService.showOnIgnoreFileSuccess();
- });
- this.ref.close();
- }
-
- closeDialog(): void {
- this.ref.close();
- }
-
-}
-
diff --git a/app/features/inbox/inbox-management/inbox-dialogs/file-viewer-popup/file-viewer-popup.component.html b/app/features/inbox/inbox-management/inbox-dialogs/file-viewer-popup/file-viewer-popup.component.html
deleted file mode 100644
index 48285d2..0000000
--- a/app/features/inbox/inbox-management/inbox-dialogs/file-viewer-popup/file-viewer-popup.component.html
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
- You can download the below document by pressing the button
-
-
-
-
-
-
-
-
-
-
diff --git a/app/features/inbox/inbox-management/inbox-dialogs/file-viewer-popup/file-viewer-popup.component.scss b/app/features/inbox/inbox-management/inbox-dialogs/file-viewer-popup/file-viewer-popup.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/inbox/inbox-management/inbox-dialogs/file-viewer-popup/file-viewer-popup.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/inbox/inbox-management/inbox-dialogs/file-viewer-popup/file-viewer-popup.component.spec.ts b/app/features/inbox/inbox-management/inbox-dialogs/file-viewer-popup/file-viewer-popup.component.spec.ts
deleted file mode 100644
index 42785db..0000000
--- a/app/features/inbox/inbox-management/inbox-dialogs/file-viewer-popup/file-viewer-popup.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { FileViewerPopupComponent } from './file-viewer-popup.component';
-
-describe('FileViewerPopupComponent', () => {
- let component: FileViewerPopupComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ FileViewerPopupComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(FileViewerPopupComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/inbox/inbox-management/inbox-dialogs/file-viewer-popup/file-viewer-popup.component.ts b/app/features/inbox/inbox-management/inbox-dialogs/file-viewer-popup/file-viewer-popup.component.ts
deleted file mode 100644
index 99bb871..0000000
--- a/app/features/inbox/inbox-management/inbox-dialogs/file-viewer-popup/file-viewer-popup.component.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-import { UtilsService } from './../../../../../shared/utils/utils.service';
-import { InvoiceProcessesService } from './../../../../../shared/services/invoice-processes.service';
-import {Component, OnInit} from '@angular/core';
-import {DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog';
-import { ReceivedFiles } from 'src/app/shared/models/receivedFiles.interface';
-
-@Component({
- selector: 'app-file-viewer-popup',
- templateUrl: './file-viewer-popup.component.html',
- styleUrls: ['./file-viewer-popup.component.scss']
-})
-export class FileViewerPopupComponent implements OnInit {
-
- document: ReceivedFiles;
- url : string;
- viewer: any;
-
- constructor(public ref: DynamicDialogRef,
- public config: DynamicDialogConfig,
- public invoiceProcessesService: InvoiceProcessesService,
- public utils: UtilsService
- ) {
- this.config.header = 'Preview Document';
- this.config.height = 'auto';
- this.config.width = '50vw';
- }
-
- ngOnInit(): void {
- console.log(this.config.data);
- this.document = this.config.data as ReceivedFiles;
- console.log(this.document);
- if (this.document?.dmsFileType) {
- this.viewer = 'google';
- this.url = this.document.rtaFolderPath + this.document.dmsFileName;
- // this.url = 'http://www.africau.edu/images/default/sample.pdf';
- }
- }
-
- downloadFile(): void {
- this.invoiceProcessesService.downloadFile(this.document.id).subscribe((base64) => {
- const blob = this.utils.base64ToFile(base64, this.document.dmsFileType);
- const url = window.URL.createObjectURL(blob);
- window.open(url);
- });
- }
-}
diff --git a/app/features/inbox/inbox-management/inbox-dialogs/forward-file-to-abby-for-recognition-dialog/forward-file-to-abby-for-recognition-dialog.component.html b/app/features/inbox/inbox-management/inbox-dialogs/forward-file-to-abby-for-recognition-dialog/forward-file-to-abby-for-recognition-dialog.component.html
deleted file mode 100644
index 4762ae2..0000000
--- a/app/features/inbox/inbox-management/inbox-dialogs/forward-file-to-abby-for-recognition-dialog/forward-file-to-abby-for-recognition-dialog.component.html
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
-
-
-
-
- Received Date
- Doc Name
- Doc Type
- Doc Code
- iPower Client Code
- Preview Document
-
-
-
-
- {{document?.rtaReceivedDate|date: "dd/MM/yyyy HH:mm"}}
- {{document?.dmsFileName}}
- {{document?.dmsFileType}}
- {{document?.dmsDocumentNumber}}
- {{document?.dmsClientCode}}
-
-
-
-
-
-
-
-
-
-
-
- Forward the document to ABBY for data capturing?
-
-
-
-
-
-
-
-
-
diff --git a/app/features/inbox/inbox-management/inbox-dialogs/forward-file-to-abby-for-recognition-dialog/forward-file-to-abby-for-recognition-dialog.component.scss b/app/features/inbox/inbox-management/inbox-dialogs/forward-file-to-abby-for-recognition-dialog/forward-file-to-abby-for-recognition-dialog.component.scss
deleted file mode 100644
index 6d25204..0000000
--- a/app/features/inbox/inbox-management/inbox-dialogs/forward-file-to-abby-for-recognition-dialog/forward-file-to-abby-for-recognition-dialog.component.scss
+++ /dev/null
@@ -1,5 +0,0 @@
-@import 'src/styles';
-
-#cancelBtn {
- margin-right: 15px;
-}
diff --git a/app/features/inbox/inbox-management/inbox-dialogs/forward-file-to-abby-for-recognition-dialog/forward-file-to-abby-for-recognition-dialog.component.spec.ts b/app/features/inbox/inbox-management/inbox-dialogs/forward-file-to-abby-for-recognition-dialog/forward-file-to-abby-for-recognition-dialog.component.spec.ts
deleted file mode 100644
index 942cf4e..0000000
--- a/app/features/inbox/inbox-management/inbox-dialogs/forward-file-to-abby-for-recognition-dialog/forward-file-to-abby-for-recognition-dialog.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { ForwardFileToAbbyForRecognitionDialogComponent } from './forward-file-to-abby-for-recognition-dialog.component';
-
-describe('ForwardFileToAbbyForRecognitionDialogComponent', () => {
- let component: ForwardFileToAbbyForRecognitionDialogComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ ForwardFileToAbbyForRecognitionDialogComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(ForwardFileToAbbyForRecognitionDialogComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/inbox/inbox-management/inbox-dialogs/forward-file-to-abby-for-recognition-dialog/forward-file-to-abby-for-recognition-dialog.component.ts b/app/features/inbox/inbox-management/inbox-dialogs/forward-file-to-abby-for-recognition-dialog/forward-file-to-abby-for-recognition-dialog.component.ts
deleted file mode 100644
index 3c3e0df..0000000
--- a/app/features/inbox/inbox-management/inbox-dialogs/forward-file-to-abby-for-recognition-dialog/forward-file-to-abby-for-recognition-dialog.component.ts
+++ /dev/null
@@ -1,49 +0,0 @@
-import {Component, OnInit} from '@angular/core';
-import {DialogService, DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog';
-import {FileViewerPopupComponent} from '../file-viewer-popup/file-viewer-popup.component';
-import {InboxManagementService} from '../../../../../shared/services/inbox-management.service';
-import {ReceivedFile} from '../../../../../shared/models/inbox-document.interface';
-import {InboxBatch} from '../../../../../shared/models/inbox-batch.interface';
-import { NotificationsHandlingService } from 'src/app/shared/services/notifications-handling/notifications-handling.service';
-import { ReceivedFiles } from 'src/app/shared/models/receivedFiles.interface';
-
-@Component({
- selector: 'app-forward-file-to-abby-for-recognition-dialog',
- templateUrl: './forward-file-to-abby-for-recognition-dialog.component.html',
- styleUrls: ['./forward-file-to-abby-for-recognition-dialog.component.scss']
-})
-export class ForwardFileToAbbyForRecognitionDialogComponent implements OnInit {
- documents: ReceivedFiles[] = [];
- documentBatch: InboxBatch;
-
- constructor(
- public ref: DynamicDialogRef
- , public config: DynamicDialogConfig
- , private dialogService: DialogService
- , private inboxService: InboxManagementService
- , private notificationService: NotificationsHandlingService) {
-
- this.config.header = 'Forward Documents';
- }
-
- ngOnInit(): void {
- this.documentBatch = this.config.data;
- this.documents = [this.documentBatch.receivedFile];
- console.log(this.documents, this.config);
- }
-
- showOrDownloadFile(document: any) {
- this.dialogService.open(FileViewerPopupComponent, {data: document});
- }
-
- onForward() {
- this.inboxService.forward(String(this.documentBatch.statusPerDocRecId)).subscribe( result => {
- this.notificationService.showOnForwardSuccess();
- });
- this.ref.close();
- }
-
- closeDialog() {
- this.ref.close();
- }
-}
diff --git a/app/features/inbox/inbox-management/inbox-dialogs/ignore-file-dialog/ignore-file-dialog.component.html b/app/features/inbox/inbox-management/inbox-dialogs/ignore-file-dialog/ignore-file-dialog.component.html
deleted file mode 100644
index bdbe71a..0000000
--- a/app/features/inbox/inbox-management/inbox-dialogs/ignore-file-dialog/ignore-file-dialog.component.html
+++ /dev/null
@@ -1,60 +0,0 @@
-
-
-
-
-
-
- Received Date
- Doc Name
- Doc Type
- Doc Code
- iPower Client Code
- Preview Document
-
-
-
-
- {{document?.rtaReceivedDate|date: "dd/MM/yyyy HH:mm"}}
- {{document?.dmsFileName}}
- {{document?.dmsFileType}}
- {{document?.dmsDocumentNumber}}
- {{document?.dmsClientCode}}
-
-
-
-
-
-
-
-
-
-
-
- Are you sure you want to flag the above document as ignored?
-
-
-
-
-
-
-
-
-
diff --git a/app/features/inbox/inbox-management/inbox-dialogs/ignore-file-dialog/ignore-file-dialog.component.scss b/app/features/inbox/inbox-management/inbox-dialogs/ignore-file-dialog/ignore-file-dialog.component.scss
deleted file mode 100644
index 6d25204..0000000
--- a/app/features/inbox/inbox-management/inbox-dialogs/ignore-file-dialog/ignore-file-dialog.component.scss
+++ /dev/null
@@ -1,5 +0,0 @@
-@import 'src/styles';
-
-#cancelBtn {
- margin-right: 15px;
-}
diff --git a/app/features/inbox/inbox-management/inbox-dialogs/ignore-file-dialog/ignore-file-dialog.component.spec.ts b/app/features/inbox/inbox-management/inbox-dialogs/ignore-file-dialog/ignore-file-dialog.component.spec.ts
deleted file mode 100644
index bb10800..0000000
--- a/app/features/inbox/inbox-management/inbox-dialogs/ignore-file-dialog/ignore-file-dialog.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { IgnoreFileDialogComponent } from './ignore-file-dialog.component';
-
-describe('IgnoreFileDialogComponent', () => {
- let component: IgnoreFileDialogComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ IgnoreFileDialogComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(IgnoreFileDialogComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/inbox/inbox-management/inbox-dialogs/ignore-file-dialog/ignore-file-dialog.component.ts b/app/features/inbox/inbox-management/inbox-dialogs/ignore-file-dialog/ignore-file-dialog.component.ts
deleted file mode 100644
index 4fb8de7..0000000
--- a/app/features/inbox/inbox-management/inbox-dialogs/ignore-file-dialog/ignore-file-dialog.component.ts
+++ /dev/null
@@ -1,48 +0,0 @@
-import {Component, OnInit} from '@angular/core';
-import {DialogService, DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog';
-import {FileViewerPopupComponent} from '../file-viewer-popup/file-viewer-popup.component';
-import {InboxManagementService} from '../../../../../shared/services/inbox-management.service';
-import {InboxBatch} from '../../../../../shared/models/inbox-batch.interface';
-import { NotificationsHandlingService } from 'src/app/shared/services/notifications-handling/notifications-handling.service';
-import { ReceivedFiles } from 'src/app/shared/models/receivedFiles.interface';
-
-@Component({
- selector: 'app-ignore-file-dialog',
- templateUrl: './ignore-file-dialog.component.html',
- styleUrls: ['./ignore-file-dialog.component.scss']
-})
-export class IgnoreFileDialogComponent implements OnInit {
- documents: ReceivedFiles[] = [];
- private documentBatch: InboxBatch;
-
- constructor(public ref: DynamicDialogRef,
- public config: DynamicDialogConfig,
- private dialogService: DialogService,
- private inboxService: InboxManagementService,
- private notificationService: NotificationsHandlingService) {
- //TODO: find how to change the header from the HTML
- this.config.header = 'Ignore Document';
-
- }
-
- ngOnInit(): void {
- this.documentBatch = this.config.data;
- this.documents = [this.documentBatch.receivedFile];
- console.log(this.documents);
- }
-
- showOrDownloadFile(document: any): void {
- this.dialogService.open(FileViewerPopupComponent, {data: document});
- }
-
- closeDialog(): void {
- this.ref.close();
- }
-
- onIgnoreFile(): void {
- this.inboxService.ignoreFile(String(this.documentBatch.statusPerDocRecId)).subscribe( result => {
- this.notificationService.showOnIgnoreFileSuccess();
- });
- this.ref.close();
- }
-}
diff --git a/app/features/inbox/inbox-management/inbox-documents-table/inbox-documents-table.component.html b/app/features/inbox/inbox-management/inbox-documents-table/inbox-documents-table.component.html
deleted file mode 100644
index 0feb119..0000000
--- a/app/features/inbox/inbox-management/inbox-documents-table/inbox-documents-table.component.html
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
- Received Date
- File Code
- File Name
- File Type
- iPower Client Code
- Personal Data
- Status
- Actions
-
-
-
-
- {{document?.receivedFile?.rtaReceivedDate | date: "dd/MM/yyyy HH:mm"}}
- {{document?.receivedFile?.dmsDocumentNumber}}
- {{document?.receivedFile?.dmsFileName}}
- {{document?.receivedFile?.dmsFileType}}
- {{document?.receivedFile?.dmsClientCode}}
- {{document?.receivedFile?.dmsPersonalData}}
- {{document?.documentCurrentStatusId?.name}}
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/features/inbox/inbox-management/inbox-documents-table/inbox-documents-table.component.scss b/app/features/inbox/inbox-management/inbox-documents-table/inbox-documents-table.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/inbox/inbox-management/inbox-documents-table/inbox-documents-table.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/inbox/inbox-management/inbox-documents-table/inbox-documents-table.component.spec.ts b/app/features/inbox/inbox-management/inbox-documents-table/inbox-documents-table.component.spec.ts
deleted file mode 100644
index 1c0f816..0000000
--- a/app/features/inbox/inbox-management/inbox-documents-table/inbox-documents-table.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { InboxDocumentsTableComponent } from './inbox-documents-table.component';
-
-describe('InboxDocumentsTableComponent', () => {
- let component: InboxDocumentsTableComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ InboxDocumentsTableComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(InboxDocumentsTableComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/inbox/inbox-management/inbox-documents-table/inbox-documents-table.component.ts b/app/features/inbox/inbox-management/inbox-documents-table/inbox-documents-table.component.ts
deleted file mode 100644
index ed18c80..0000000
--- a/app/features/inbox/inbox-management/inbox-documents-table/inbox-documents-table.component.ts
+++ /dev/null
@@ -1,126 +0,0 @@
-import { StatusPerDocument } from './../../../../shared/models/status-per-document.interface';
-import { Component, OnInit } from '@angular/core';
-import { LazyLoadEvent } from 'primeng/api';
-import { ReceivedFile } from '../../../../shared/models/inbox-document.interface';
-import { FILE_TYPE } from '../../../../shared/enums/FILE_TYPE.enum';
-import { DialogService } from 'primeng/dynamicdialog';
-import { IgnoreFileDialogComponent } from '../inbox-dialogs/ignore-file-dialog/ignore-file-dialog.component';
-import { InboxManagementService } from '../../../../shared/services/inbox-management.service';
-import { InboxSearchCriteriaInterface } from '../../../../shared/models/inbox-search-criteria.interface';
-import { EditFileClassAndQeueToAbbyForRecognitionDialogComponent } from '../inbox-dialogs/edit-file-class-and-qeue-to-abby-for-recognition-dialog/edit-file-class-and-qeue-to-abby-for-recognition-dialog.component';
-import { ForwardFileToAbbyForRecognitionDialogComponent } from '../inbox-dialogs/forward-file-to-abby-for-recognition-dialog/forward-file-to-abby-for-recognition-dialog.component';
-import { CLASSIFICATION_STATUS } from '../../../../shared/enums/CLASSIFICATION_STATUS.enum';
-import { FileViewerPopupComponent } from '../inbox-dialogs/file-viewer-popup/file-viewer-popup.component';
-import { InboxBatch } from '../../../../shared/models/inbox-batch.interface';
-import { Page } from '../../../../shared/models/paging/page.interface';
-import { ReceivedFiles } from 'src/app/shared/models/receivedFiles.interface';
-import { AuthService } from 'src/app/shared/services/auth.service';
-import { USER_RIGHTS } from 'src/app/shared/enums/USER_RIGHTS.enum';
-
-
-@Component({
- selector: 'app-inbox-documents-table',
- templateUrl: './inbox-documents-table.component.html',
- styleUrls: ['./inbox-documents-table.component.scss']
-})
-export class InboxDocumentsTableComponent implements OnInit {
-
- // tslint:disable-next-line:variable-name
- loading = true;
- documents: ReceivedFiles[];
- documentsBatch: InboxBatch[];
- totalRecords: any;
-
- // tslint:disable-next-line:variable-name
- private _documentRequest: InboxSearchCriteriaInterface; // DocumentsRequest;
-
- constructor(public dialogService: DialogService, private inboxManagementService: InboxManagementService, public auth: AuthService) {
- }
-
-
- get documentRequest(): InboxSearchCriteriaInterface {
-
- return this._documentRequest;
- }
-
- set documentRequest(value) {
- console.log(value);
- this._documentRequest = value;
- this.loadDocuments(null);
- }
-
-
- ngOnInit(): void {
-
- // this.loading = false;
- }
-
- changeIcon(document:any): string{
- if(document?.ignored){
- return 'pi pi-eye-slash';
- }else{
- return 'pi pi-eye';
- }
- }
-
- loadDocuments(event: LazyLoadEvent): void {
- this.loading = true;
- this.documentRequest.receivedFrom = new Date(Date.UTC(this.documentRequest.receivedFrom?.getFullYear(), this.documentRequest.receivedFrom?.getMonth(), this.documentRequest.receivedFrom?.getDate()));
- this.documentRequest.receivedTo = new Date(Date.UTC(this.documentRequest.receivedTo?.getFullYear(), this.documentRequest.receivedTo?.getMonth(), this.documentRequest.receivedTo?.getDate() + 1));
- this.documentRequest.receivedTo?.setMilliseconds(this.documentRequest.receivedTo?.getMilliseconds() - 1);
- if (event) {
- this.inboxManagementService.searchByCriteriaPaged(
- event.first / event.rows,
- event.rows, this.documentRequest,
- 'inboxForm')
- .subscribe(x => {
- this.dataManagement(x as any);
- });
- } else {
- this.inboxManagementService.searchByCriteriaPaged(
- 0,
- 5,
- this.documentRequest,
- 'inboxForm')
- .subscribe(x => {
- this.dataManagement(x as any);
- });
- }
- }
-
-
- ignoreDialog(document: any): void {
- console.log(document);
- const dynamicDialogRef = this.dialogService.open(IgnoreFileDialogComponent, { data: document });
- dynamicDialogRef.onClose.subscribe(() => {
- this.loadDocuments(null);
- });
- }
-
- canPreviewByUA(): boolean {
- return this.auth.userRights.find(rdc => USER_RIGHTS.C02.isGrantedToUser(rdc.rights)) != null;
- }
-
- showOrDownloadFile(document: any): void {
-
- this.dialogService.open(FileViewerPopupComponent, { data: document });
- }
-
- forwardDialog(document: any): void {
- console.log(document);
- this.dialogService.open(ForwardFileToAbbyForRecognitionDialogComponent, { data: document });
- }
-
- editClassDialog(document: any, dialogTitle: string): void {
- console.log(document);
- this.dialogService.open(EditFileClassAndQeueToAbbyForRecognitionDialogComponent, { data: { document, title: dialogTitle } });
- }
-
- private dataManagement(x: Page): void {
- this.documentsBatch = x.data;
- this.documents = x?.data?.map(documents => {
- return documents?.receivedFile;
- });
- this.loading = false;
- }
-}
diff --git a/app/features/inbox/inbox-management/inbox-management.component.html b/app/features/inbox/inbox-management/inbox-management.component.html
deleted file mode 100644
index 59f92d9..0000000
--- a/app/features/inbox/inbox-management/inbox-management.component.html
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
-
{{'DOCUMENTS-INBOX' | translate}}
-
-
-
-
-
-
-
-
diff --git a/app/features/inbox/inbox-management/inbox-management.component.scss b/app/features/inbox/inbox-management/inbox-management.component.scss
deleted file mode 100644
index c3b4eb8..0000000
--- a/app/features/inbox/inbox-management/inbox-management.component.scss
+++ /dev/null
@@ -1,6 +0,0 @@
-@import 'src/styles';
-
-::ng-deep p-fieldset,
-::ng-deep p-card {
- width: 100%;
-}
diff --git a/app/features/inbox/inbox-management/inbox-management.component.spec.ts b/app/features/inbox/inbox-management/inbox-management.component.spec.ts
deleted file mode 100644
index 90e2410..0000000
--- a/app/features/inbox/inbox-management/inbox-management.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { InboxManagementComponent } from './inbox-management.component';
-
-describe('InboxManagementComponent', () => {
- let component: InboxManagementComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ InboxManagementComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(InboxManagementComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/inbox/inbox-management/inbox-management.component.ts b/app/features/inbox/inbox-management/inbox-management.component.ts
deleted file mode 100644
index ee5e38b..0000000
--- a/app/features/inbox/inbox-management/inbox-management.component.ts
+++ /dev/null
@@ -1,63 +0,0 @@
-import {Component, OnInit, ViewChild} from '@angular/core';
-import {InboxSearchFormComponent} from './inbox-search-form/inbox-search-form.component';
-import {InboxDocumentsTableComponent} from './inbox-documents-table/inbox-documents-table.component';
-import {DialogService} from 'primeng/dynamicdialog';
-import {InboxSearchCriteriaInterface} from '../../../shared/models/inbox-search-criteria.interface';
-import { delay } from 'rxjs/operators';
-import { AuthService } from 'src/app/shared/services/auth.service';
-import { USER_RIGHTS } from 'src/app/shared/enums/USER_RIGHTS.enum';
-import { environment } from 'src/environments/environment';
-
-@Component({
- selector: 'app-inbox-management',
- templateUrl: './inbox-management.component.html',
- styleUrls: ['./inbox-management.component.scss']
-})
-export class InboxManagementComponent implements OnInit {
-
- // tslint:disable-next-line:variable-name
- private _inboxDocumentsTableComponent: InboxDocumentsTableComponent;
- documentRequest: InboxSearchCriteriaInterface;
-
- constructor(public auth: AuthService) {
- }
-
- @ViewChild(InboxSearchFormComponent, {static: false})
- inboxSearchFormComponent: InboxSearchFormComponent;
-
- @ViewChild(InboxDocumentsTableComponent, {static: false})
- set inboxDocumentsTableComponent(value: InboxDocumentsTableComponent) {
- if (value) {
- this._inboxDocumentsTableComponent = value;
- // this._inboxDocumentsTableComponent.documentRequest = this.inboxSearchFormComponent.searchCriteriaForm.value;
- }
- }
-
-
- get inboxDocumentsTableComponent(): InboxDocumentsTableComponent {
- return this._inboxDocumentsTableComponent;
- }
-
- ngOnInit(): void {
- }
-
- searchByCriteria(): void {
-
- this.documentRequest = this.inboxSearchFormComponent.searchCriteriaForm.value;
- if (this.inboxDocumentsTableComponent) {
- this._inboxDocumentsTableComponent.documentRequest = this.inboxSearchFormComponent.searchCriteriaForm.value;
- }
- }
-
- clear() {
- this.inboxSearchFormComponent.resetForm();
- }
-
- canPreviewByUA(): boolean {
- return this.auth.userRights.find(rdc => USER_RIGHTS.C01.isGrantedToUser(rdc.rights)) != null;
- }
-
- canPreviewAll(): boolean {
- return this.auth.userHasRightForClient(USER_RIGHTS.C03, environment.globalRightsClientID);
- }
-}
diff --git a/app/features/inbox/inbox-management/inbox-search-form/inbox-search-form.component.html b/app/features/inbox/inbox-management/inbox-search-form/inbox-search-form.component.html
deleted file mode 100644
index a87e5cd..0000000
--- a/app/features/inbox/inbox-management/inbox-search-form/inbox-search-form.component.html
+++ /dev/null
@@ -1,92 +0,0 @@
-
diff --git a/app/features/inbox/inbox-management/inbox-search-form/inbox-search-form.component.scss b/app/features/inbox/inbox-management/inbox-search-form/inbox-search-form.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/inbox/inbox-management/inbox-search-form/inbox-search-form.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/inbox/inbox-management/inbox-search-form/inbox-search-form.component.spec.ts b/app/features/inbox/inbox-management/inbox-search-form/inbox-search-form.component.spec.ts
deleted file mode 100644
index 32db54e..0000000
--- a/app/features/inbox/inbox-management/inbox-search-form/inbox-search-form.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { InboxSearchFormComponent } from './inbox-search-form.component';
-
-describe('InboxSearchFormComponent', () => {
- let component: InboxSearchFormComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ InboxSearchFormComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(InboxSearchFormComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/inbox/inbox-management/inbox-search-form/inbox-search-form.component.ts b/app/features/inbox/inbox-management/inbox-search-form/inbox-search-form.component.ts
deleted file mode 100644
index b36d55d..0000000
--- a/app/features/inbox/inbox-management/inbox-search-form/inbox-search-form.component.ts
+++ /dev/null
@@ -1,127 +0,0 @@
-import { Checkbox } from 'primeng/checkbox';
-import {Component, OnInit, ViewChild} from '@angular/core';
-import {FormBuilder, FormGroup} from '@angular/forms';
-import { AuthService } from 'src/app/shared/services/auth.service';
-import {FILE_TYPE} from '../../../../shared/enums/FILE_TYPE.enum';
-import {IPowerClient} from '../../../../shared/models/ipower-client.interface';
-import {IpowerClientsService} from '../../../../shared/services/administration/ipower-clients.service';
-import { USER_RIGHTS } from 'src/app/shared/enums/USER_RIGHTS.enum';
-import { environment } from 'src/environments/environment';
-import { Observable } from 'rxjs';
-import { ErrorHandlingService } from 'src/app/shared/services/error-handling/error-handling.service';
-
-@Component({
- selector: 'app-inbox-search-form',
- templateUrl: './inbox-search-form.component.html',
- styleUrls: ['./inbox-search-form.component.scss']
-})
-export class InboxSearchFormComponent implements OnInit {
- private iPowerClientSuggestions: IPowerClient[];
- private selectedIPowerClient: IPowerClient;
-
- constructor(private fb: FormBuilder, private iPowerClientsService: IpowerClientsService, public auth: AuthService, private errorHandlingService: ErrorHandlingService,
- private authService: AuthService
- // ,private inboxSearchService: InboxSearchService
- ) {
- }
-
- searchCriteriaForm = this.fb.group({
- userId: [this.auth.userDetails.id],
- receivedFrom: [null],
- receivedTo: [null],
- fileCode: [null],
- fileType: [null],
- ignore_status: this.fb.control(false),
- ipowerClientName: [null],
- ipowerClientCode: [null],
- personalData: this.fb.control(false)
- });
- // TODO change me And Call From Back
- FILE_TYPE_ARRAY: { label: any; value: number }[] = Object.keys(FILE_TYPE).map((key, index) => ({label: FILE_TYPE[key], value: index}));
- suggestionsForIpowerClientCode: any;
- iPowerClientNameSuggestions: any;
- iPowerClientCodeSuggestions: any;
-
-
- ngOnInit(): void {
- }
-
-
- searchIpowerClientCode(event: any): void {
-
- this.suggestionsForIpowerClientCode = ['asd', 'lets do it', 'i work somehow'];
- // this.mylookupservice.getResults(event.query).then(data => {
- // this.results = data;
- // });
- }
-
- public resetForm(): void {
- this.searchCriteriaForm.reset({
- userId: this.searchCriteriaForm.get('userId').value
- });
- }
-
- autosuggestIPowerClientCode(event) {
-
- if (event.query.length < 3) {
- this.iPowerClientCodeSuggestions = [];
- return;
- }
-
- // If the user has the right to Preview of Scheduling Procedure (C03), we use the endpoint that returns all iPowerClients,
- // otherwise, the one that checks for the user's User_Access too. Whether the user can see ANY rule has already been handled by the 'search' button.
- let endpointToSubscribeTo: Observable = this.authService.userHasRightForClient(USER_RIGHTS.C03, environment.globalRightsClientID)
- ? this.iPowerClientsService.getClientsByCodeOnly(event.query)
- : this.authService.userRights.find(rdc => USER_RIGHTS.C01.isGrantedToUser(rdc.rights)) != null ? this.iPowerClientsService.getClientsByCodeDistinct(event.query) : null;
-
- endpointToSubscribeTo.subscribe(
- (values: IPowerClient[]) => {
- let temp: string[] = [];
- this.iPowerClientSuggestions = values;
- values.map(val => temp.push(val.clientCode));
- this.iPowerClientCodeSuggestions = temp
- },
- err => this.errorHandlingService.showHttpResponseError(err)
- );
- }
-
- /*
- * Auto-suggest & Auto-complete IPower Client
- */
- autosuggestIPowerClientName(event): void {
-
- if (!event.query || event.query.length < 3) {
- this.iPowerClientNameSuggestions = [];
- return;
- }
-
- // If the user has the right to Preview of Scheduling Procedure (C03), we use the endpoint that returns all iPowerClients,
- // otherwise, the one that checks for the user's User_Access too. Whether the user can see ANY rule has already been handled by the 'search' button.
- let endpointToSubscribeTo: Observable = this.authService.userHasRightForClient(USER_RIGHTS.C03, environment.globalRightsClientID)
- ? this.iPowerClientsService.getClientsByNameOnly(event.query)
- : this.authService.userRights.find(rdc => USER_RIGHTS.C01.isGrantedToUser(rdc.rights)) != null ? this.iPowerClientsService.getClientsByNameDistinct(event.query) : null;
-
- endpointToSubscribeTo.subscribe(
- (values: IPowerClient[]) => {
- this.iPowerClientSuggestions = values;
-
- const temp: string[] = [];
- values.map(val => temp.push(val.name));
- this.iPowerClientNameSuggestions = temp;
- },
- err => this.errorHandlingService.showHttpResponseError(err)
- );
-}
-
- iPowerClientNameSelected(name: string): void {
- this.selectedIPowerClient = this.iPowerClientSuggestions.find(client => client.name === name);
- this.searchCriteriaForm.get('ipowerClientCode').patchValue(this.selectedIPowerClient ? this.selectedIPowerClient.clientCode : '');
- this.searchCriteriaForm.updateValueAndValidity();
- }
-
- iPowerClientCodeSelected(code: string): void {
- this.selectedIPowerClient = this.iPowerClientSuggestions.find(client => client.clientCode === code);
- this.searchCriteriaForm.get('ipowerClientName').patchValue(this.selectedIPowerClient ? this.selectedIPowerClient.name : '');
- this.searchCriteriaForm.updateValueAndValidity();
- }
-}
diff --git a/app/features/invoice-processes/invoice-process-management/invoice-process-management.component.html b/app/features/invoice-processes/invoice-process-management/invoice-process-management.component.html
deleted file mode 100644
index c468597..0000000
--- a/app/features/invoice-processes/invoice-process-management/invoice-process-management.component.html
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
-
{{'PROCESSES' | translate}}
-
-
-
-
-
-
-
diff --git a/app/features/invoice-processes/invoice-process-management/invoice-process-management.component.scss b/app/features/invoice-processes/invoice-process-management/invoice-process-management.component.scss
deleted file mode 100644
index 34f92d4..0000000
--- a/app/features/invoice-processes/invoice-process-management/invoice-process-management.component.scss
+++ /dev/null
@@ -1,5 +0,0 @@
-@import 'src/styles';
-
-::ng-deep p-fieldset {
- width: 100%;
-}
diff --git a/app/features/invoice-processes/invoice-process-management/invoice-process-management.component.spec.ts b/app/features/invoice-processes/invoice-process-management/invoice-process-management.component.spec.ts
deleted file mode 100644
index de08fc9..0000000
--- a/app/features/invoice-processes/invoice-process-management/invoice-process-management.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { InvoiceProcessManagementComponent } from './invoice-process-management.component';
-
-describe('InvoiceProcessManagementComponent', () => {
- let component: InvoiceProcessManagementComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ InvoiceProcessManagementComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(InvoiceProcessManagementComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/invoice-processes/invoice-process-management/invoice-process-management.component.ts b/app/features/invoice-processes/invoice-process-management/invoice-process-management.component.ts
deleted file mode 100644
index 6c34d9e..0000000
--- a/app/features/invoice-processes/invoice-process-management/invoice-process-management.component.ts
+++ /dev/null
@@ -1,121 +0,0 @@
-import { ActivatedRoute } from '@angular/router';
-import { environment } from './../../../../environments/environment.dev-docker';
-import { USER_RIGHTS } from './../../../shared/enums/USER_RIGHTS.enum';
-import { InvoiceProcessesRouterParams } from './../../../shared/models/invoice-processes-router-params.interface';
-import { InvoiceProcessCriteriaInterface } from './../../../shared/models/invoice-process-search-criteria.interface';
-import { UtilsService } from './../../../shared/utils/utils.service';
-import { InvoiceProcessesService } from './../../../shared/services/invoice-processes.service';
-import { AuthService } from './../../../shared/services/auth.service';
-import { FormBuilder } from '@angular/forms';
-import { Component, OnInit, ViewChild } from '@angular/core';
-import { InvoiceProcessingComponent } from '../invoice-processing/invoice-processing.component';
-import { SearchListStateService } from 'src/app/shared/back-button/search-list-state.service';
-
-@Component({
- selector: 'app-invoice-process-management',
- templateUrl: './invoice-process-management.component.html',
- styleUrls: ['./invoice-process-management.component.scss']
-})
-export class InvoiceProcessManagementComponent implements OnInit {
-
- documentRequest: InvoiceProcessCriteriaInterface;
- valueForm : InvoiceProcessCriteriaInterface;
- searchCriteriaForm = this.fb.group({
- userId: [this.auth.userDetails.id],
- fromDate: [null],
- toDate: [null],
- docClassification: [null],
- fileCode: [null],
- fileType: [null],
- processId: [null],
- processStatus: [null],
- ipowerClientName: [null],
- ipowerClientCode: [null],
- personalData: [null],
- username: [null]
- });
-
- parameters: InvoiceProcessesRouterParams = { clientCode: null, docClassification: null };
- isFirstSearch: boolean = true;
- userPressedBack: boolean;
- documentRequestOutput: InvoiceProcessCriteriaInterface;
-
- constructor(public route: ActivatedRoute, public fb: FormBuilder, public auth: AuthService, public invoice: InvoiceProcessesService, public utils: UtilsService, private searchListState: SearchListStateService) { }
-
- ngOnInit(): void {
- console.log(this.searchListState);
- this.route.params.subscribe(params => {
- this.parameters.clientCode = params.clientId || null;
- this.parameters.docClassification = params.type ? parseInt(params.type) : null;
- this.userPressedBack = params.userPressedBack;
- });
- if(this.parameters.clientCode || this.parameters.docClassification){
- this.searchByCriteria();
- }
- if(this.userPressedBack){
- this.searchByCriteria();
- }else{
- this.searchListState.resetLastPage();
- }
- }
-
- public formValue(): InvoiceProcessCriteriaInterface {
- this.valueForm = this.searchCriteriaForm.value;
-
- let formValue: InvoiceProcessCriteriaInterface = {
- userId: this.auth.userDetails ? this.auth.userDetails.id.toString() : '',
- fromDate: this.valueForm?.fromDate ? new Date(Date.UTC(this.valueForm.fromDate?.getFullYear(), this.valueForm.fromDate?.getMonth(), this.valueForm.fromDate?.getDate())) : null,
- toDate: this.valueForm?.toDate ? new Date(Date.UTC(this.valueForm.toDate?.getFullYear(), this.valueForm.toDate?.getMonth(), this.valueForm.toDate?.getDate() + 1)) : null,
- docClassification: this.valueForm?.docClassification ? this.valueForm.docClassification : null,
- fileCode:this.valueForm?.fileCode ? this.valueForm?.fileCode: null ,
- fileType:this.valueForm?.fileType ? this.valueForm?.fileType: null,
- processId:this.valueForm?.processId ? this.valueForm?.processId : null ,
- processStatus: this.valueForm?.processStatus ? this.valueForm?.processStatus : null,
- ipowerClientName: this.valueForm?.ipowerClientName ? this.valueForm?.ipowerClientName : null ,
- ipowerClientCode: this.valueForm?.ipowerClientCode ? this.valueForm?.ipowerClientCode : null ,
- personalData: this.valueForm?.personalData ? this.valueForm?.personalData : null ,
- username: this.valueForm?.username ? this.valueForm?.username : null
- }
- formValue?.toDate?.setMilliseconds(this.valueForm.toDate?.getMilliseconds() -1);
-
- return formValue;
- }
-
- searchButton(): void {
- this.searchListState.resetLastPage();
- this.searchListState.clearState();
- this.searchByCriteria();
- }
-
- searchByCriteria(): void {
- if (this.parameters?.docClassification && this.isFirstSearch) {
- this.searchCriteriaForm.get('docClassification').patchValue(this.parameters.docClassification);
- }
- if (this.parameters?.clientCode && this.isFirstSearch) {
- this.searchCriteriaForm.get('ipowerClientCode').patchValue(this.parameters.clientCode);
- }
- this.isFirstSearch = false;
- let verificationRulesSearchFormValue: InvoiceProcessCriteriaInterface = this.formValue();
- this.documentRequest = verificationRulesSearchFormValue;
- }
-
-
- passOutputDocument(documentRequestOutput) {
- this.documentRequestOutput = documentRequestOutput;
- this.searchCriteriaForm?.patchValue(this.documentRequestOutput);
- }
-
- clear() {
- this.searchCriteriaForm.reset({
- userId: this.searchCriteriaForm.get('userId').value
- });
- }
-
- canPreviewByUA(): boolean {
- return this.auth.userRights.find(rdc => USER_RIGHTS.D02.isGrantedToUser(rdc.rights)) != null;
- }
-
- canPreviewAll(): boolean {
- return this.auth.userHasRightForClient(USER_RIGHTS.D01, environment.globalRightsClientID);
- }
-}
diff --git a/app/features/invoice-processes/invoice-process-management/invoice-process-search-form/invoice-process-search-form.component.html b/app/features/invoice-processes/invoice-process-management/invoice-process-search-form/invoice-process-search-form.component.html
deleted file mode 100644
index 8e4a51c..0000000
--- a/app/features/invoice-processes/invoice-process-management/invoice-process-search-form/invoice-process-search-form.component.html
+++ /dev/null
@@ -1,126 +0,0 @@
-
diff --git a/app/features/invoice-processes/invoice-process-management/invoice-process-search-form/invoice-process-search-form.component.scss b/app/features/invoice-processes/invoice-process-management/invoice-process-search-form/invoice-process-search-form.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/invoice-processes/invoice-process-management/invoice-process-search-form/invoice-process-search-form.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/invoice-processes/invoice-process-management/invoice-process-search-form/invoice-process-search-form.component.spec.ts b/app/features/invoice-processes/invoice-process-management/invoice-process-search-form/invoice-process-search-form.component.spec.ts
deleted file mode 100644
index 1e5272b..0000000
--- a/app/features/invoice-processes/invoice-process-management/invoice-process-search-form/invoice-process-search-form.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { InvoiceProcessSearchFormComponent } from './invoice-process-search-form.component';
-
-describe('InvoiceProcessSearchFormComponent', () => {
- let component: InvoiceProcessSearchFormComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ InvoiceProcessSearchFormComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(InvoiceProcessSearchFormComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/invoice-processes/invoice-process-management/invoice-process-search-form/invoice-process-search-form.component.ts b/app/features/invoice-processes/invoice-process-management/invoice-process-search-form/invoice-process-search-form.component.ts
deleted file mode 100644
index a910ba0..0000000
--- a/app/features/invoice-processes/invoice-process-management/invoice-process-search-form/invoice-process-search-form.component.ts
+++ /dev/null
@@ -1,155 +0,0 @@
-import { DocumentClassificationService } from './../../../../shared/services/document-classification.service';
-import { Component, OnInit, Input } from '@angular/core';
-import { FormGroup } from '@angular/forms';
-import { InvoiceProcessesService } from '../../../../shared/services/invoice-processes.service';
-import { FILE_TYPE } from '../../../../shared/enums/FILE_TYPE.enum';
-import { IPowerClient } from '../../../../shared/models/ipower-client.interface';
-import { IpowerClientsService } from '../../../../shared/services/administration/ipower-clients.service';
-import { DocumentClassification } from '../../../../shared/models/document-classification.interface';
-import { Observable } from 'rxjs';
-import { ErrorHandlingService } from 'src/app/shared/services/error-handling/error-handling.service';
-import { AuthService } from 'src/app/shared/services/auth.service';
-import { USER_RIGHTS } from 'src/app/shared/enums/USER_RIGHTS.enum';
-import { environment } from 'src/environments/environment';
-
-@Component({
- selector: 'app-invoice-process-search-form',
- templateUrl: './invoice-process-search-form.component.html',
- styleUrls: ['./invoice-process-search-form.component.scss']
-})
-export class InvoiceProcessSearchFormComponent implements OnInit {
-
- @Input() searchCriteriaForm: FormGroup;
-
- DOCS_CLASSIFICATIONS: DocumentClassification[];
- suggestionsForIpowerClientCode: any;
- FILE_TYPE_ARRAY: { label: any; value: number }[] = Object.keys(FILE_TYPE).map((key, index) => ({ label: FILE_TYPE[key], value: index }));
- PROCESS_STATUS: any;
- iPowerClientNameSuggestions: any;
- iPowerClientCodeSuggestions: any;
- assignToSuggestions: any;
- private iPowerClientSuggestions: IPowerClient[];
- private selectedIPowerClient: IPowerClient;
- private selectedAssignToUsername: string;
-
-
- constructor(private iPowerClientsService: IpowerClientsService,
- private processesService: InvoiceProcessesService,
- private documentClassificationService: DocumentClassificationService,
- private errorHandlingService: ErrorHandlingService,
- private authService: AuthService) {
- }
-
- ngOnInit(): void {
- this.processesService.getAllStatuses().subscribe(
- x => {
- this.PROCESS_STATUS = x;
- }
- );
-
- this.documentClassificationService.getAll().subscribe(x => {
- this.DOCS_CLASSIFICATIONS = x;
- });
-
- const ipowerClientCode = this.searchCriteriaForm.get('ipowerClientCode').value;
- if (ipowerClientCode) {
- this.iPowerClientsService.getClientsByCodeDistinct(ipowerClientCode).subscribe(
- (values: IPowerClient[]) => {
- this.iPowerClientSuggestions = values;
-
- const temp: string[] = [];
- values.map(val => temp.push(val.clientCode));
- this.iPowerClientCodeSuggestions = temp;
- this.iPowerClientCodeSelected(ipowerClientCode);
- },
- err => console.error(err)
- );
- }
- }
-
- autosuggestIPowerClientCode(event) {
-
- if (event.query.length < 3) {
- this.iPowerClientCodeSuggestions = [];
- return;
- }
-
- // If the user has the right to Preview of Scheduling Procedure (D01), we use the endpoint that returns all iPowerClients,
- // otherwise, the one that checks for the user's User_Access too. Whether the user can see ANY rule has already been handled by the 'search' button.
- let endpointToSubscribeTo: Observable = this.authService.userHasRightForClient(USER_RIGHTS.D01, environment.globalRightsClientID)
- ? this.iPowerClientsService.getClientsByCodeOnly(event.query)
- : this.authService.userRights.find(rdc => USER_RIGHTS.D02.isGrantedToUser(rdc.rights)) != null ? this.iPowerClientsService.getClientsByCodeDistinct(event.query) : null;
-
- endpointToSubscribeTo.subscribe(
- (values: IPowerClient[]) => {
- let temp: string[] = [];
- this.iPowerClientSuggestions = values;
- values.map(val => temp.push(val.clientCode));
- this.iPowerClientCodeSuggestions = temp
- },
- err => this.errorHandlingService.showHttpResponseError(err)
- );
- }
-
- /*
- * Auto-suggest & Auto-complete IPower Client
- */
- autosuggestIPowerClientName(event): void {
-
- if (!event.query || event.query.length < 3) {
- this.iPowerClientNameSuggestions = [];
- return;
- }
-
- // If the user has the right to Preview of Scheduling Procedure (D01), we use the endpoint that returns all iPowerClients,
- // otherwise, the one that checks for the user's User_Access too. Whether the user can see ANY rule has already been handled by the 'search' button.
- let endpointToSubscribeTo: Observable = this.authService.userHasRightForClient(USER_RIGHTS.D01, environment.globalRightsClientID)
- ? this.iPowerClientsService.getClientsByNameOnly(event.query)
- : this.authService.userRights.find(rdc => USER_RIGHTS.D02.isGrantedToUser(rdc.rights)) != null ? this.iPowerClientsService.getClientsByNameDistinct(event.query) : null;
-
- endpointToSubscribeTo.subscribe(
- (values: IPowerClient[]) => {
- this.iPowerClientSuggestions = values;
-
- const temp: string[] = [];
- values.map(val => temp.push(val.name));
- this.iPowerClientNameSuggestions = temp;
- },
- err => this.errorHandlingService.showHttpResponseError(err)
- );
- }
-
- autosuggestAssignTo(event): void {
-
- if (!event.query || event.query.length < 3) {
- this.assignToSuggestions = [];
- return;
- }
-
- this.processesService.getAssignToUsersDistinct(event.query).subscribe(
- (values: string[]) => {
- this.assignToSuggestions = values;
- },
- err => console.error(err) // TODO: Handle this via a Messaging Service
- );
- }
-
- iPowerClientNameSelected(name: string): void {
- this.selectedIPowerClient = this.iPowerClientSuggestions.find(client => client.name === name);
- this.searchCriteriaForm.get('ipowerClientCode').patchValue(this.selectedIPowerClient ? this.selectedIPowerClient.clientCode : '');
- this.searchCriteriaForm.updateValueAndValidity();
- }
-
- iPowerClientCodeSelected(code: string): void {
- this.selectedIPowerClient = this.iPowerClientSuggestions.find(client => client.clientCode === code);
- this.searchCriteriaForm.get('ipowerClientName').patchValue(this.selectedIPowerClient ? this.selectedIPowerClient.name : '');
- this.searchCriteriaForm.updateValueAndValidity();
- }
-
- assignToSelected(username: string): void {
- this.selectedAssignToUsername = this.assignToSuggestions.find(suggestion => suggestion === username);
- this.searchCriteriaForm.get('username').patchValue(this.selectedAssignToUsername ? this.selectedAssignToUsername : '');
- this.searchCriteriaForm.updateValueAndValidity();
- }
-
-}
diff --git a/app/features/invoice-processes/invoice-process-management/invoice-process-table/invoice-process-table.component.html b/app/features/invoice-processes/invoice-process-management/invoice-process-table/invoice-process-table.component.html
deleted file mode 100644
index 21edf74..0000000
--- a/app/features/invoice-processes/invoice-process-management/invoice-process-table/invoice-process-table.component.html
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
-
-
-
- Received Date
- File Code
- File Name
- File Type
- Process ID
- iPower Client Code
- Personal Data
- Status
- Assign to
- Actions
-
-
-
-
- {{process.processCreationDatetime|date: "dd/MM/yyyy HH:mm"}}
- {{process.receivedFile.dmsDocumentNumber}}
- {{process.receivedFile.dmsFileName}}
- {{process.receivedFile.dmsFileType}}
- {{process.id}}
- {{process.receivedFile.dmsClientCode}}
- {{process.receivedFile.dmsPersonalData}}
- {{process.processStatus.name}}
- {{process.userId}}
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/features/invoice-processes/invoice-process-management/invoice-process-table/invoice-process-table.component.scss b/app/features/invoice-processes/invoice-process-management/invoice-process-table/invoice-process-table.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/invoice-processes/invoice-process-management/invoice-process-table/invoice-process-table.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/invoice-processes/invoice-process-management/invoice-process-table/invoice-process-table.component.spec.ts b/app/features/invoice-processes/invoice-process-management/invoice-process-table/invoice-process-table.component.spec.ts
deleted file mode 100644
index b34e128..0000000
--- a/app/features/invoice-processes/invoice-process-management/invoice-process-table/invoice-process-table.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { InvoiceProcessTableComponent } from './invoice-process-table.component';
-
-describe('InvoiceProcessTableComponent', () => {
- let component: InvoiceProcessTableComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ InvoiceProcessTableComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(InvoiceProcessTableComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/invoice-processes/invoice-process-management/invoice-process-table/invoice-process-table.component.ts b/app/features/invoice-processes/invoice-process-management/invoice-process-table/invoice-process-table.component.ts
deleted file mode 100644
index ce0af0b..0000000
--- a/app/features/invoice-processes/invoice-process-management/invoice-process-table/invoice-process-table.component.ts
+++ /dev/null
@@ -1,178 +0,0 @@
-import { Router } from '@angular/router';
-import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core';
-import { DialogService } from 'primeng/dynamicdialog';
-import {ConfirmationService, LazyLoadEvent} from 'primeng/api';
-import { Page } from '../../../../shared/models/paging/page.interface';
-import { InvoiceProcess } from '../../../../shared/models/invoice-process.interface';
-import { InvoiceProcessesService } from '../../../../shared/services/invoice-processes.service';
-import { Table } from 'primeng/table';
-import { InvoiceProcessCriteriaInterface } from 'src/app/shared/models/invoice-process-search-criteria.interface';
-import {AuthService} from '../../../../shared/services/auth.service';
-import {FileViewerPopupComponent} from '../../../inbox/inbox-management/inbox-dialogs/file-viewer-popup/file-viewer-popup.component';
-import {TranslateService} from '@ngx-translate/core';
-import { SearchListStateService } from 'src/app/shared/back-button/search-list-state.service';
-import { InvoiceProcessManagementComponent } from '../invoice-process-management.component';
-
-@Component({
- selector: 'app-invoice-process-table',
- templateUrl: './invoice-process-table.component.html',
- styleUrls: ['./invoice-process-table.component.scss']
-})
-export class InvoiceProcessTableComponent implements OnInit, OnChanges {
-
- constructor(public dialogService: DialogService, private invoiceProcessService: InvoiceProcessesService,
- private router: Router, public auth: AuthService,
- private confirmationService: ConfirmationService,
- private translate: TranslateService,
- private searchListState: SearchListStateService) {
- }
-
-
- @Output() documentRequestOutput = new EventEmitter();
- @Input() documentRequest: InvoiceProcessCriteriaInterface;
- @ViewChild('pTable') pTable: Table;
-
- invoices = [];
- totalRecords: any;
- rows = 10;
- loading: any = true;
- lastPageVisit : number = 0;
-
- ngOnInit(): void {
- if (this.searchListState?.getLastPageVisit() == this.searchListState?.getPage()) {
- if (Object.keys(this.searchListState.getState()).length > 0) {
- this.documentRequestOutput.emit(this.searchListState.getState());
- this.documentRequest = this.searchListState.getState();
- }
- this.loadProcesses(this.searchListState.getEvent());
-
- }
- }
-
- ngOnChanges(changes: SimpleChanges): void {
- if (this.documentRequest && this.searchListState?.getLastPageVisit() != this.searchListState?.getPage()) {
- this.loadProcesses(null);
- }
- }
-
- ngAfterContentChecked(): void {
- if(this.pTable && this.searchListState.getLastPageVisit() == this.searchListState.getPage()){
- this.pTable.first = this.searchListState.getLastPageVisit() * 10;
- this.pTable.firstChange.emit(this.pTable.first);
- }
- }
-
- processingRedirect(document: InvoiceProcess): void {
- this.router.navigate(['/pages/processes/' + document.id]);
- console.log(this.pTable.first);
- this.searchListState.setLastPageVisit(this.lastPageVisit);
- this.searchListState.setPage(this.lastPageVisit);
- this.searchListState.setState(this.documentRequest);
- }
-
- onAssignClick(process: InvoiceProcess): void {
- this.confirmationService.confirm({
- message: this.translate.instant('ASSIGN-PROCESS-MESSAGE'),
- header: this.translate.instant('ASSIGN-PROCESS-CONFIRMATION'),
- accept: () => {
- this.assignToMe(process);
- }, reject: () => {
-
- }
- });
- }
-
- onUnassignClick(process: InvoiceProcess): void {
- this.confirmationService.confirm({
- message: this.translate.instant('UNASSIGN-PROCESS-MESSAGE'),
- header: this.translate.instant('UNASSIGN-PROCESS-CONFIRMATION'),
- accept: () => {
- this.unassignFromMe(process);
- }, reject: () => {
-
- }
- });
- }
-
- assignToMe(process: InvoiceProcess): void {
- this.invoiceProcessService.assignProcess(process.id, this.auth.userDetails.name).subscribe(result => {
- this.invoices.forEach((invoice, index) => {
- if (invoice.id === process.id) {
- this.invoices[index].userId = this.auth.userDetails.name;
- }
- });
- });
- }
-
- unassignFromMe(process: InvoiceProcess): void {
- this.invoiceProcessService.unassignProcess(process.id).subscribe(result => {
- this.invoices.forEach((invoice, index) => {
- if (invoice.id === process.id) {
- this.invoices[index].userId = null;
- }
- });
- });
- }
-
- showOrDownloadFile(document: any) {
- this.dialogService.open(FileViewerPopupComponent, {data: document});
- }
-
-
- loadProcesses(event: LazyLoadEvent): void {
- if(event && this.documentRequest){
- this.loading = true;
- this.invoiceProcessService.searchByCriteriaPaged(
- event.first / event.rows,
- event.rows,
- this.documentRequest,
- 'search')
- .subscribe(x => {
- console.log(x);
- this.lastPageVisit = event.first / event.rows;
- this.searchListState.setEvent(event);
- this.setTableDataFromPage(x);
- });
- }else if(event == null && this.documentRequest){
- this.loading = true;
- this.invoiceProcessService.searchByCriteriaPaged(
- 0,
- 10,
- this.documentRequest,
- 'search')
- .subscribe(x => {
- console.log(x);
- this.lastPageVisit = 0;
- this.searchListState.setEvent(null);
- this.setTableDataFromPage(x);
- });
-
- }}
-
- setTableDataFromPage(pageInvoiceProcess: Page): void {
- this.invoices = [];
- pageInvoiceProcess?.data?.forEach(process => {
- process.filesPerProcess.forEach(file => {
- const invoice = {
- receivedFile: null,
- id: null,
- documentClassificationId: null,
- processCreationDatetime: null,
- processStatus: null,
- userId: null,
- };
- invoice.receivedFile = file.receivedFile;
- invoice.id = process.id;
- invoice.documentClassificationId = process.documentClassificationId;
- invoice.processCreationDatetime = process.processCreationDatetime;
- invoice.processStatus = process.processStatus;
- invoice.userId = process.userId;
- this.invoices.push(invoice);
- });
- });
- this.totalRecords = pageInvoiceProcess.totalElements;
- this.loading = false;
- }
-
-
-}
diff --git a/app/features/invoice-processes/invoice-processing/data-capturing-and-verification/data-capturing-and-verification.component.html b/app/features/invoice-processes/invoice-processing/data-capturing-and-verification/data-capturing-and-verification.component.html
deleted file mode 100644
index 9ad134c..0000000
--- a/app/features/invoice-processes/invoice-processing/data-capturing-and-verification/data-capturing-and-verification.component.html
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
diff --git a/app/features/invoice-processes/invoice-processing/data-capturing-and-verification/data-capturing-and-verification.component.scss b/app/features/invoice-processes/invoice-processing/data-capturing-and-verification/data-capturing-and-verification.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/invoice-processes/invoice-processing/data-capturing-and-verification/data-capturing-and-verification.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/invoice-processes/invoice-processing/data-capturing-and-verification/data-capturing-and-verification.component.spec.ts b/app/features/invoice-processes/invoice-processing/data-capturing-and-verification/data-capturing-and-verification.component.spec.ts
deleted file mode 100644
index 6200382..0000000
--- a/app/features/invoice-processes/invoice-processing/data-capturing-and-verification/data-capturing-and-verification.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { DataCapturingAndVerificationComponent } from './data-capturing-and-verification.component';
-
-describe('DataCapturingAndVerificationComponent', () => {
- let component: DataCapturingAndVerificationComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ DataCapturingAndVerificationComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(DataCapturingAndVerificationComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/invoice-processes/invoice-processing/data-capturing-and-verification/data-capturing-and-verification.component.ts b/app/features/invoice-processes/invoice-processing/data-capturing-and-verification/data-capturing-and-verification.component.ts
deleted file mode 100644
index bafe48f..0000000
--- a/app/features/invoice-processes/invoice-processing/data-capturing-and-verification/data-capturing-and-verification.component.ts
+++ /dev/null
@@ -1,82 +0,0 @@
-import { NotificationsHandlingService } from './../../../../shared/services/notifications-handling/notifications-handling.service';
-import { environment } from 'src/environments/environment';
-import {
- Component,
- ComponentRef,
- ElementRef,
- Input,
- OnInit,
- Output,
- Pipe,
- PipeTransform,
- ViewChild,
- EventEmitter,
- HostListener,
- OnChanges
-} from '@angular/core';
-import {InvoiceProcessesService} from '../../../../shared/services/invoice-processes.service';
-import {FullInvoiceProcess} from '../../../../shared/models/full-invoice-process.interface';
-import {DomSanitizer, SafeResourceUrl} from '@angular/platform-browser';
-
-
-@Component({
- selector: 'app-data-capturing-and-verification',
- templateUrl: './data-capturing-and-verification.component.html',
- styleUrls: ['./data-capturing-and-verification.component.scss']
-})
-export class DataCapturingAndVerificationComponent implements OnInit {
-
- private _process: FullInvoiceProcess;
-
- get process(): FullInvoiceProcess {
- return this._process;
- }
-
- @Input()
- set process(value: FullInvoiceProcess) {
- this._process = value;
- if (value && value.processStatus.name == "Process Needs Capturing Verification") {
- this.initializer();
- }
- }
-
- @Output() processCompleted = new EventEmitter();
-
- @ViewChild('iframe', {static: false})
- iframe: HTMLIFrameElement;
-
- sanitizeUrl: SafeResourceUrl;
-
- constructor(private processService: InvoiceProcessesService, public sanitizer: DomSanitizer, public notifications: NotificationsHandlingService) {
- }
-
- ngOnInit(): void {
-
- }
-
- refreshIFrame(): void {
- this.sanitizeUrl = this.sanitizer.bypassSecurityTrustResourceUrl((document.getElementById('theIFrame') as HTMLIFrameElement).src);
- }
-
- initializer(): void {
- this.processService.getIframe(String(this._process.id)).subscribe(url => {
- this.sanitizeUrl = this.sanitizer.bypassSecurityTrustResourceUrl(url);
- });
- }
-
- @HostListener('window:message', ['$event'])
- onMessage(event): void {
- const result = event && event.data ? JSON.parse(event.data) : null;
- if (result && result.eventName === 'FC_Verification_TaskClosed'){
- this.updateVerificationCompleted();
- this.sanitizeUrl = null;
- }
- }
-
- private updateVerificationCompleted(): void {
- this.processService.updateVerificationCompletedForProcess(this.process.id).subscribe(() => {
- this.notifications.showVerificationCompletedSuccess();
- this.processCompleted.emit(this.process.id);
- });
- }
-}
diff --git a/app/features/invoice-processes/invoice-processing/invoice-processing.component.html b/app/features/invoice-processes/invoice-processing/invoice-processing.component.html
deleted file mode 100644
index 9b23794..0000000
--- a/app/features/invoice-processes/invoice-processing/invoice-processing.component.html
+++ /dev/null
@@ -1,253 +0,0 @@
-
-
-
-
{{'INVOICE-PROCESSING' | translate}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Received Date
- Doc Code
- Doc Name
- Doc Type
- Doc Status
-
-
-
-
-
-
- {{file.rtaReceivedDate | date:'longDate'}}
- {{file.dmsDocumentNumber}}
- {{file.dmsFileName}}
- {{file.dmsFileType}}
- {{file.statusPerDocument?.documentCurrentStatusId?.name}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Data Capturing and Verification
-
-
-
-
-
-
-
-
-
-
-
- Verification of Journal Entries
-
-
-
-
-
-
-
-
-
-
-
- Manipulation of Exceptions
-
-
-
-
-
-
-
-
-
-
-
- Manipulation of Unhandled Data
-
-
-
-
-
-
-
-
-
-
-
- Missing Records
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/features/invoice-processes/invoice-processing/invoice-processing.component.scss b/app/features/invoice-processes/invoice-processing/invoice-processing.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/invoice-processes/invoice-processing/invoice-processing.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/invoice-processes/invoice-processing/invoice-processing.component.spec.ts b/app/features/invoice-processes/invoice-processing/invoice-processing.component.spec.ts
deleted file mode 100644
index 340c943..0000000
--- a/app/features/invoice-processes/invoice-processing/invoice-processing.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { InvoiceProcessingComponent } from './invoice-processing.component';
-
-describe('InvoiceProcessingComponent', () => {
- let component: InvoiceProcessingComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ InvoiceProcessingComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(InvoiceProcessingComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/invoice-processes/invoice-processing/invoice-processing.component.ts b/app/features/invoice-processes/invoice-processing/invoice-processing.component.ts
deleted file mode 100644
index 116a42c..0000000
--- a/app/features/invoice-processes/invoice-processing/invoice-processing.component.ts
+++ /dev/null
@@ -1,330 +0,0 @@
-import { LookupData } from './../../../shared/models/lookup-data.interface';
-import { AuthService } from './../../../shared/services/auth.service';
-import { USER_RIGHTS } from 'src/app/shared/enums/USER_RIGHTS.enum';
-import { ErrorHandlingService } from 'src/app/shared/services/error-handling/error-handling.service';
-import { IPowerClient } from './../../../shared/models/ipower-client.interface';
-import { IpowerClientsService } from 'src/app/shared/services/administration/ipower-clients.service';
-import { ReceivedFile } from './../../../shared/models/inbox-document.interface';
-import { FormBuilder, Validators } from '@angular/forms';
-import { Component, Input, OnInit, ViewChild } from '@angular/core';
-import { ActivatedRoute } from '@angular/router';
-import { DialogService } from 'primeng/dynamicdialog';
-import { FileViewerPopupComponent } from '../../inbox/inbox-management/inbox-dialogs/file-viewer-popup/file-viewer-popup.component';
-import { FullInvoiceProcess } from '../../../shared/models/full-invoice-process.interface';
-import { InvoiceProcessesService } from '../../../shared/services/invoice-processes.service';
-import { JournalEntry } from '../../../shared/models/journal-entry.interface';
-import { AlteryxException } from '../../../shared/models/alteryx-exception.interface';
-import { AlteryxUnhandledData } from '../../../shared/models/alteryx-unhandled-data.interface';
-import { removeSummaryDuplicates } from '@angular/compiler';
-import { ConfirmationService } from 'primeng/api';
-import { TranslateService } from '@ngx-translate/core';
-import { NotificationsHandlingService } from 'src/app/shared/services/notifications-handling/notifications-handling.service';
-import { DataCapturingAndVerificationComponent } from './data-capturing-and-verification/data-capturing-and-verification.component';
-<<<<<<< Updated upstream
-import { Location } from '@angular/common';
-import { Router } from '@angular/router';
-=======
-import {ProcessHistory} from "../../../shared/models/process-history.interface";
->>>>>>> Stashed changes
-
-@Component({
- selector: 'app-invoice-processing',
- templateUrl: './invoice-processing.component.html',
- styleUrls: ['./invoice-processing.component.scss']
-})
-export class InvoiceProcessingComponent implements OnInit {
-
- @ViewChild('dataCapturing', { static: false })
- dataCapturingComponent: DataCapturingAndVerificationComponent;
-
- invoiceProcess: FullInvoiceProcess = {} as FullInvoiceProcess;
- iPowerClient: IPowerClient;
- receivedFiles: ReceivedFile[];
- processWorkflowActions: string[];
- processWorkflowButton: boolean;
-
- rows = 10;
- loading: boolean;
-
- refreshedJournalEntries: JournalEntry[];
- refreshedAlteryxExceptions: AlteryxException[];
- refreshedAlteryxUnhandled: AlteryxUnhandledData[];
- accordionTabStatusList: boolean[] = [false, false, false, false, false];
-
- processForm = this.fb.group({
- processId: [{ value: null, disabled: true }],
- status: [{ value: null, disabled: true }],
- iPowerClientName: [{ value: null, disabled: true }],
- iPowerClientCode: [{ value: null, disabled: true }],
- personalData: [{ value: null, disabled: true }],
- assignedTo: [{ value: null, disabled: true }],
- processWorkflow: [{ value: null, disabled: false }, [Validators.required]]
- });
-
- constructor(
- private fb: FormBuilder,
- private actRoute: ActivatedRoute,
- private invoiceProcessesService: InvoiceProcessesService,
- private iPowerClientsService: IpowerClientsService,
- private dialogService: DialogService,
- private errorHandlingService: ErrorHandlingService,
- public authService: AuthService,
- private confirmationService: ConfirmationService,
- private translate: TranslateService,
- private notificationService: NotificationsHandlingService,
- private router: Router
- ) { }
-
- ngOnInit(): void {
- this.actRoute.params.subscribe((params: any) => this.initData(params.id));
- }
-
- initData(invoiceProcessId: number): void {
- // Get the InvoiceProcess.
- this.invoiceProcessesService.getFullInvoiceProcessById(invoiceProcessId).subscribe(
- (val: FullInvoiceProcess) => {
- this.invoiceProcess = val;
-
- // Get the ReceivedFiles.
- this.receivedFiles = val.filesPerProcess.map(ffp => ffp.receivedFile);
-
- // Update display with what we have so far.
- this.initDisplay(this.invoiceProcess, null);
-
- // Get the IPowerClient - Yes, subscription within subscription, long live the cold observables.
- const clientId = val.recordsPerProcess[0]?.record?.ipowerClientId;
- this.iPowerClientsService.getClientById(clientId).subscribe((val: IPowerClient) => {
- this.iPowerClient = val;
- this.initDisplay(null, this.iPowerClient);
-
- },
- err => this.errorHandlingService.showHttpResponseError(err)
- );
- },
- err => this.errorHandlingService.showHttpResponseError(err)
- );
- }
-
- preview(receivedFile: ReceivedFile): void {
- this.dialogService.open(FileViewerPopupComponent, { data: receivedFile });
- }
-
- initDisplay(process: FullInvoiceProcess, client: IPowerClient): void {
-
- // Form Value-setting
- if (process) {
- // If even a single ReceivedFile has 'personalData', the whole InvoiceProcess is considered to have personalData.
- const hasPersonalData: boolean = process.filesPerProcess.find(fpp => fpp.receivedFile.dmsPersonalData) != null;
- this.processForm.get('personalData').setValue(hasPersonalData);
-
- this.processForm.get('processId').setValue(process.id);
- this.processForm.get('status').setValue(process.processStatus.name);
-
- this.processForm.get('assignedTo').setValue(process.userId);
-
- switch (process.processStatus.id) {
- case 4:
- case 1:
- case 8:
- case 6:
- this.processWorkflowActions = ["ABBYY Verification", "Process Cancelation"];
- break;
- case 5:
- this.processWorkflowActions = ["Process Cancelation"];
- break;
- case 3:
- case 2:
- this.processWorkflowActions = ["ABBYY Verification", "Process Cancelation", "Alteryx Recalculation", "Process Completed"];
- break;
- case 7:
- case 9:
- this.processForm.controls['processWorkflow'].disable();
- this.processWorkflowButton = true;
- break;
- default:
- break;
- }
- }
-
- if (client) {
- this.processForm.get('iPowerClientName').setValue(client.name);
- this.processForm.get('iPowerClientCode').setValue(client.clientCode);
- }
- }
-
- /*
- * If Data Capturing component notifies us that an abbyy task is completed, we refresh the data, to unlock
- */
- onProcessCompleted(id: number) {
- this.initData(id);
- this.closeAllTabsProcessWorkflow();
- }
-
- /*
- * UserRights-check Methods
- */
- canSeeDataCaptureAndVerification(): boolean {
- return this.authService.userHasRightForClient(USER_RIGHTS.D04, this.iPowerClient?.id) && (this.invoiceProcess?.processStatus?.id == 5 || this.invoiceProcess?.processStatus?.id == 8 );
- }
-
- canSeeJournalEntriesVerification(): boolean {
- return (this.invoiceProcess?.processStatus?.id !== 5 && this.authService.userHasRightForClient(USER_RIGHTS.D05, this.iPowerClient?.id)) || (this.invoiceProcess?.processStatus?.id !== 8 && this.authService.userHasRightForClient(USER_RIGHTS.D05, this.iPowerClient?.id)) ;
- }
-
- canSeeManipulationOfExceptions(): boolean {
- return (this.invoiceProcess?.processStatus?.id !== 5 && this.authService.userHasRightForClient(USER_RIGHTS.D06, this.iPowerClient?.id)) || (this.invoiceProcess?.processStatus?.id !== 8 && this.authService.userHasRightForClient(USER_RIGHTS.D06, this.iPowerClient?.id)) ;
- }
-
- canSeeManipulationOfUnhandledData(): boolean {
- return (this.invoiceProcess?.processStatus?.id !== 5 && this.authService.userHasRightForClient(USER_RIGHTS.D07, this.iPowerClient?.id)) || (this.invoiceProcess?.processStatus?.id !== 8 && this.authService.userHasRightForClient(USER_RIGHTS.D07, this.iPowerClient?.id)) ;
- }
-
- canSeeMissingRecords(): boolean {
- return (this.invoiceProcess?.processStatus?.id !== 5 && this.authService.userHasRightForClient(USER_RIGHTS.D01, this.iPowerClient?.id)) || (this.invoiceProcess?.processStatus?.id !== 8 && this.authService.userHasRightForClient(USER_RIGHTS.D01, this.iPowerClient?.id)) ;
- }
-
- assignToMe(): void {
- this.invoiceProcessesService.assignProcess(this.invoiceProcess.id, this.authService.userDetails.name).subscribe(result => {
- this.processForm.get('assignedTo').setValue(this.authService.userDetails.name);
- this.invoiceProcess.userId = this.authService.userDetails.name;
- });
- }
-
- unassignFromMe(): void {
- this.invoiceProcessesService.unassignProcess(this.invoiceProcess.id).subscribe(result => {
- this.processForm.get('assignedTo').setValue(null);
- this.invoiceProcess.userId = null;
- });
- }
-
- closeAllTabsProcessWorkflow() {
- let i;
- for (i = 0; i < 4; i++) {
- this.accordionTabStatusList[i] = false;
- }
- }
-
- processWorkFlowProcedure() {
- console.log(this.processForm.get('processWorkflow').value)
- if (this.processForm.get('processWorkflow').value) {
- switch (this.processForm.get('processWorkflow').value) {
- case 'Alteryx Recalculation':
- this.confirmationService.confirm({
- message: this.translate.instant('ALTERYX-RECALCULATION-MESSAGE'),
- accept: () => {
- this.invoiceProcessesService.sendProcessToAlteryxRecalculation(this.invoiceProcess.id).subscribe(result => {
- this.notificationService.showAlteryxRecalculation();
- this.actRoute.params.subscribe((params: any) => this.initData(params.id));
- this.closeAllTabsProcessWorkflow();
- },
- error => {
- this.errorHandlingService.showHttpResponseError(error);
- });
- }, reject: () => {
- }
- });
- break;
- case 'ABBYY Verification':
- this.confirmationService.confirm({
- message: this.translate.instant('ABBY-VERIFICATION-MESSAGE'),
- accept: () => {
- this.invoiceProcessesService.sendProcessToAbbyyVerification(this.invoiceProcess.id).subscribe(result => {
- this.notificationService.showAbbyVerification();
- this.actRoute.params.subscribe((params: any) => this.initData(params.id));
- this.closeAllTabsProcessWorkflow();
- },
- error => {
- this.errorHandlingService.showHttpResponseError(error);
- });
- }, reject: () => {
- }
- });
- break;
- case 'Process Cancelation':
- this.confirmationService.confirm({
- message: this.translate.instant('PROCESS-CANCELATION-MESSAGE'),
- accept: () => {
- this.invoiceProcessesService.setProcessCanceled(this.invoiceProcess.id).subscribe(result => {
- this.notificationService.showProcessCancelation();
- this.actRoute.params.subscribe((params: any) => this.initData(params.id));
- this.closeAllTabsProcessWorkflow();
- },
- error => {
- this.errorHandlingService.showHttpResponseError(error);
- });
- }, reject: () => {
- }
- });
- break;
- case 'Process Completed':
- this.confirmationService.confirm({
- message: this.translate.instant('PROCESS-COMPLETED-MESSAGE'),
- accept: () => {
- this.invoiceProcessesService.setProcessCompleted(this.invoiceProcess.id).subscribe(result => {
- this.notificationService.showProcessComplete();
- this.actRoute.params.subscribe((params: any) => this.initData(params.id));
- this.closeAllTabsProcessWorkflow();
- },
- error => {
- this.errorHandlingService.showHttpResponseError(error);
- });
- }, reject: () => {
- }
- });
- break;
- default:
- break;
- }
- }
- }
-
- onTabOpen(e): void {
- if (e !== null && e.index !== null) {
- this.accordionTabStatusList[e.index] = true;
- }
- }
-
- onTabClose(e): void {
- if (e !== null && e.index !== null) {
- this.accordionTabStatusList[e.index] = false;
- }
- }
-
- refreshTabTableData(title: string): void {
- switch (title) {
- case 'journal entries':
- this.invoiceProcessesService.refreshJournalEntries(this.invoiceProcess.id).subscribe(result => {
- if (result !== null) {
- this.invoiceProcess.journalEntries = result;
- }
- });
- break;
- case 'manipulation of exceptions':
- this.invoiceProcessesService.refreshAlteryxExceptions(this.invoiceProcess.id).subscribe(result => {
- if (result !== null) {
- this.invoiceProcess.alteryxExceptions = result;
- }
- });
- break;
- case 'manipulation of unhandled data':
- this.invoiceProcessesService.refreshAlteryxUnhandled(this.invoiceProcess.id).subscribe(result => {
- if (result !== null) {
- this.invoiceProcess.alteryxUnhandled = result;
- }
- });
- break;
- case 'data capturing and verification':
- this.dataCapturingComponent.refreshIFrame();
- break;
- default:
- break;
- }
- }
-
- goBack(){
- this.router.navigate(['/pages/processes', { userPressedBack: true }]);
-
- }
-
-
-}
diff --git a/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification-dialogs/journal-edit-dialog/journal-edit-dialog.component.html b/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification-dialogs/journal-edit-dialog/journal-edit-dialog.component.html
deleted file mode 100644
index 0cd3ab1..0000000
--- a/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification-dialogs/journal-edit-dialog/journal-edit-dialog.component.html
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification-dialogs/journal-edit-dialog/journal-edit-dialog.component.scss b/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification-dialogs/journal-edit-dialog/journal-edit-dialog.component.scss
deleted file mode 100644
index 038efc7..0000000
--- a/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification-dialogs/journal-edit-dialog/journal-edit-dialog.component.scss
+++ /dev/null
@@ -1,20 +0,0 @@
-@import 'src/styles';
-
-#content {
- //this.config.height - title.height
- min-height: 85vh;
-}
-
-::ng-deep .p-dialog-header {
- .p-dialog-title {
- padding-right: 60px;
- }
-}
-
-::ng-deep .p-dialog-content {
- .refresh-navision {
- position: absolute;
- top: 20px;
- right: 70px;
- }
-}
diff --git a/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification-dialogs/journal-edit-dialog/journal-edit-dialog.component.spec.ts b/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification-dialogs/journal-edit-dialog/journal-edit-dialog.component.spec.ts
deleted file mode 100644
index 8366d3e..0000000
--- a/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification-dialogs/journal-edit-dialog/journal-edit-dialog.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { JournalEditDialogComponent } from './journal-edit-dialog.component';
-
-describe('JournalEditDialogComponent', () => {
- let component: JournalEditDialogComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ JournalEditDialogComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(JournalEditDialogComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification-dialogs/journal-edit-dialog/journal-edit-dialog.component.ts b/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification-dialogs/journal-edit-dialog/journal-edit-dialog.component.ts
deleted file mode 100644
index 9a7134b..0000000
--- a/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification-dialogs/journal-edit-dialog/journal-edit-dialog.component.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
-import { Component, OnInit } from '@angular/core';
-import { DynamicDialogConfig, DynamicDialogRef } from "primeng/dynamicdialog";
-import { JournalEntry } from '../../../../../../shared/models/journal-entry.interface';
-import { JournalDialogEditService } from '../../../../../../shared/services/journal-dialog-edit.service';
-
-@Component({
- selector: 'app-journal-edit-dialog',
- templateUrl: './journal-edit-dialog.component.html',
- styleUrls: ['./journal-edit-dialog.component.scss']
-})
-export class JournalEditDialogComponent implements OnInit {
-
- journal: JournalEntry;
- iframeUrl: SafeResourceUrl;
-
- constructor(public ref: DynamicDialogRef, public config: DynamicDialogConfig,
- private journalDialogEditService: JournalDialogEditService,
- public sanitizer: DomSanitizer) {
- this.config.width = '95vw';
- this.config.height = '85vh';
- this.config.header = this.config.data.title;
- this.journal = this.config.data.journalEntry;
- }
-
- ngOnInit(): void {
- this.journalDialogEditService.getIframe(String(this.journal.id)).subscribe(url => {
- this.iframeUrl = this.sanitizer.bypassSecurityTrustResourceUrl(url);
- });
- }
-
- refreshIFrame(){
- this.iframeUrl = this.sanitizer.bypassSecurityTrustResourceUrl((document.getElementById('theIFrame') as HTMLIFrameElement).src);
- }
-
-}
diff --git a/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification-dialogs/journal-preview-dialog/journal-preview-dialog.component.html b/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification-dialogs/journal-preview-dialog/journal-preview-dialog.component.html
deleted file mode 100644
index 9cc5ec5..0000000
--- a/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification-dialogs/journal-preview-dialog/journal-preview-dialog.component.html
+++ /dev/null
@@ -1,210 +0,0 @@
-
diff --git a/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification-dialogs/journal-preview-dialog/journal-preview-dialog.component.scss b/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification-dialogs/journal-preview-dialog/journal-preview-dialog.component.scss
deleted file mode 100644
index 08f80ed..0000000
--- a/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification-dialogs/journal-preview-dialog/journal-preview-dialog.component.scss
+++ /dev/null
@@ -1,22 +0,0 @@
-@import 'src/styles';
-
-#content {
- //this.config.height - title.height
- min-height: 69vh;
-}
-
-#backBtn {
- margin-right: 15px;
-}
-
-#editBtn {
- margin-right: 15px;
-}
-
-#btnContainer {
- margin-top: 25px;
-}
-
-#previousBtn {
- margin-right: 15px;
-}
diff --git a/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification-dialogs/journal-preview-dialog/journal-preview-dialog.component.spec.ts b/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification-dialogs/journal-preview-dialog/journal-preview-dialog.component.spec.ts
deleted file mode 100644
index 84fc7b5..0000000
--- a/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification-dialogs/journal-preview-dialog/journal-preview-dialog.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { JournalPreviewDialogComponent } from './journal-preview-dialog.component';
-
-describe('JournalPreviewDialogComponent', () => {
- let component: JournalPreviewDialogComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ JournalPreviewDialogComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(JournalPreviewDialogComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification-dialogs/journal-preview-dialog/journal-preview-dialog.component.ts b/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification-dialogs/journal-preview-dialog/journal-preview-dialog.component.ts
deleted file mode 100644
index b11bd7d..0000000
--- a/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification-dialogs/journal-preview-dialog/journal-preview-dialog.component.ts
+++ /dev/null
@@ -1,68 +0,0 @@
-import {Component, Input, OnInit} from '@angular/core';
-import {DialogService, DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog';
-import {JournalEntry} from '../../../../../../shared/models/journal-entry.interface';
-import {JournalEditDialogComponent} from '../journal-edit-dialog/journal-edit-dialog.component';
-
-@Component({
- selector: 'app-journal-preview-dialog',
- templateUrl: './journal-preview-dialog.component.html',
- styleUrls: ['./journal-preview-dialog.component.scss']
-})
-export class JournalPreviewDialogComponent implements OnInit {
-
- @Input() displayDialog: boolean;
- journal: JournalEntry;
- baseIndex: number;
- journalPageIterator: number;
-
- constructor(public ref: DynamicDialogRef
- , public config: DynamicDialogConfig
- , private dialogService: DialogService) {
- this.config.width = '60vw';
- this.config.height = '80vh';
- this.config.header = this.config.data.title;
- this.baseIndex = this.config.data.index;
- this.journalPageIterator = this.baseIndex;
- this.journal = this.config.data.journalsList[this.baseIndex];
- }
-
- ngOnInit(): void {
-
- }
-
- onEdit(): void {
-
- // TODO: Add action of edit
- this.dialogService.open(JournalEditDialogComponent, {data: {journalEntry: this.journal, title: 'Edit of Journal Entries'}});
- this.ref.close();
- }
-
- onPost(): void {
-
- // TODO: Add action of post
-
- this.ref.close();
- }
-
- closeDialog(): void {
- this.ref.close();
- }
-
- goPreviousJournal(): void {
- if ( this.journalPageIterator > 0 ) {
- this.journalPageIterator--;
- this.journal = this.config.data.journalsList[this.journalPageIterator];
- }
- }
-
- goNextJournal(): void {
- if ( this.config.data.journalsList !== null && this.config.data.journalsList.length > 0 ) {
- if ( this.journalPageIterator < (this.config.data.journalsList.length - 1) ) {
- this.journalPageIterator++;
- this.journal = this.config.data.journalsList[this.journalPageIterator];
- }
- }
-
- }
-
-}
diff --git a/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification-dialogs/journal-view-dialog/journal-view-dialog.component.html b/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification-dialogs/journal-view-dialog/journal-view-dialog.component.html
deleted file mode 100644
index ebfd4bb..0000000
--- a/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification-dialogs/journal-view-dialog/journal-view-dialog.component.html
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
diff --git a/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification-dialogs/journal-view-dialog/journal-view-dialog.component.scss b/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification-dialogs/journal-view-dialog/journal-view-dialog.component.scss
deleted file mode 100644
index 038efc7..0000000
--- a/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification-dialogs/journal-view-dialog/journal-view-dialog.component.scss
+++ /dev/null
@@ -1,20 +0,0 @@
-@import 'src/styles';
-
-#content {
- //this.config.height - title.height
- min-height: 85vh;
-}
-
-::ng-deep .p-dialog-header {
- .p-dialog-title {
- padding-right: 60px;
- }
-}
-
-::ng-deep .p-dialog-content {
- .refresh-navision {
- position: absolute;
- top: 20px;
- right: 70px;
- }
-}
diff --git a/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification-dialogs/journal-view-dialog/journal-view-dialog.component.spec.ts b/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification-dialogs/journal-view-dialog/journal-view-dialog.component.spec.ts
deleted file mode 100644
index 43aa59f..0000000
--- a/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification-dialogs/journal-view-dialog/journal-view-dialog.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { JournalViewDialogComponent } from './journal-view-dialog.component';
-
-describe('JournalViewDialogComponent', () => {
- let component: JournalViewDialogComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ JournalViewDialogComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(JournalViewDialogComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification-dialogs/journal-view-dialog/journal-view-dialog.component.ts b/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification-dialogs/journal-view-dialog/journal-view-dialog.component.ts
deleted file mode 100644
index 73586c7..0000000
--- a/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification-dialogs/journal-view-dialog/journal-view-dialog.component.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-import {Component, OnInit} from '@angular/core';
-import {JournalEntry} from '../../../../../../shared/models/journal-entry.interface';
-import {DomSanitizer, SafeResourceUrl} from '@angular/platform-browser';
-import {DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog';
-import {JournalDialogViewService} from '../../../../../../shared/services/journal-dialog-view.service';
-
-@Component({
- selector: 'app-journal-view-dialog',
- templateUrl: './journal-view-dialog.component.html',
- styleUrls: ['./journal-view-dialog.component.scss']
-})
-export class JournalViewDialogComponent implements OnInit {
-
- journal: JournalEntry;
- iframeUrl: SafeResourceUrl;
-
- constructor(public ref: DynamicDialogRef, public config: DynamicDialogConfig,
- private journalDialogViewService: JournalDialogViewService,
- public sanitizer: DomSanitizer) {
- this.config.width = '95vw';
- this.config.height = '85vh';
- this.config.header = this.config.data.title;
- this.journal = this.config.data.journalEntry;
- }
-
- ngOnInit(): void {
- this.journalDialogViewService.getIframe(String(this.journal.id)).subscribe(url => {
- this.iframeUrl = this.sanitizer.bypassSecurityTrustResourceUrl(url);
- });
- }
-
- refreshIFrame(){
- this.iframeUrl = this.sanitizer.bypassSecurityTrustResourceUrl((document.getElementById('theIFrame') as HTMLIFrameElement).src);
- }
-
-}
diff --git a/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification.component.html b/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification.component.html
deleted file mode 100644
index 03a1cd2..0000000
--- a/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification.component.html
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-
- Document No.
- Account Type
- Account No.
- Description
- Amount
- Currency ID
- VatBusiness
- Status
-
-
-
-
-
-
- {{entry.documentNo}}
- {{entry.accountType}}
- {{entry.accountNo}}
- {{entry.description}}
- {{entry.amount}}
- {{entry.currencyCode}}
- {{entry.vatBusPostingGroup}}
- {{entry.journalEntriesStatus.name}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification.component.scss b/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification.component.spec.ts b/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification.component.spec.ts
deleted file mode 100644
index 3529baa..0000000
--- a/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { JournalEntriesVerificationComponent } from './journal-entries-verification.component';
-
-describe('JournalEntriesVerificationComponent', () => {
- let component: JournalEntriesVerificationComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ JournalEntriesVerificationComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(JournalEntriesVerificationComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification.component.ts b/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification.component.ts
deleted file mode 100644
index a5fffdb..0000000
--- a/app/features/invoice-processes/invoice-processing/journal-entries-verification/journal-entries-verification.component.ts
+++ /dev/null
@@ -1,76 +0,0 @@
-import { JournalEntry } from './../../../../shared/models/journal-entry.interface';
-import { Component, Input, OnInit } from '@angular/core';
-import { DialogService } from 'primeng/dynamicdialog';
-import { JournalPreviewDialogComponent } from './journal-entries-verification-dialogs/journal-preview-dialog/journal-preview-dialog.component';
-import { JournalEditDialogComponent } from './journal-entries-verification-dialogs/journal-edit-dialog/journal-edit-dialog.component';
-import {JournalViewDialogComponent} from "./journal-entries-verification-dialogs/journal-view-dialog/journal-view-dialog.component";
-
-@Component({
- selector: 'app-journal-entries-verification',
- templateUrl: './journal-entries-verification.component.html',
- styleUrls: ['./journal-entries-verification.component.scss']
-})
-export class JournalEntriesVerificationComponent implements OnInit {
-
- @Input() set journalEntries(journalEntries: JournalEntry[]) {
-
- // This setter may be called on page setup without arguments.
- if (!journalEntries) {
- return;
- }
-
- this._journalEntries = journalEntries;
-
- // Now we have to pick a unique JournalEntry per recordId, for it to hold the 'edit' & 'post' buttons.
- let recordToEntryMap = new Map();
-
- for (let entry of journalEntries) {
- // If this recordId has already been processed, proceed to the next one.
- if (recordToEntryMap.has(entry.recordId)) {
- continue;
- }
-
- // Otherwise, create it and keep track of its entry.
- recordToEntryMap.set(entry.recordId, entry.id);
- }
-
- // Now that we are finished, keep only the entryIds we found. We have no use for their respective recordIds.
- recordToEntryMap.forEach((value, key) => this.buttonHoldingEntriesIDsArray.push(value));
- }
-
- _journalEntries: JournalEntry[] = [];
- buttonHoldingEntriesIDsArray: number[] = []; // An array bearing the IDs of all entries for which the 'edit' & 'post' buttons should be displayed.
-
- first: number = 0;
- rows: number = 4;
- loading = false;
-
- constructor(private dialogService: DialogService) { }
-
- ngOnInit(): void {
- }
-
- onPagination(event) {
- // Since the requested InvoiceProcess comes along with all of its JournalEntries, we simply have to slice the 'journalEntries' input to match each requested page.
- // The slicing is requested by the template (see html table's 'value' attribute).
- this.first = event.first;
- }
-
- // tslint:disable-next-line:typedef
- previewJournalEntry(journalEntry: JournalEntry, rowIndex: number) {
- this.dialogService.open(JournalPreviewDialogComponent, { data: { journalsList: this._journalEntries, index: rowIndex, title: 'Previewing of Journal Entries' } });
- }
-
- editJournalEntry(journalEntry: JournalEntry) {
- // TODO: perhaps add argument for iframe??
- this.dialogService.open(JournalEditDialogComponent, { data: { journalEntry, title: 'Edit of Journal Entries' } });
- }
-
- viewJournalEntry(journalEntry: JournalEntry) {
- this.dialogService.open(JournalViewDialogComponent, { data: { journalEntry, title: 'View of Journal Entries' } });
- }
-
- postJournalEntry(journalEntry: JournalEntry) {
- // TODO:
- }
-}
diff --git a/app/features/invoice-processes/invoice-processing/missing-records/missing-records/missing-records.component.html b/app/features/invoice-processes/invoice-processing/missing-records/missing-records/missing-records.component.html
deleted file mode 100644
index e700f2f..0000000
--- a/app/features/invoice-processes/invoice-processing/missing-records/missing-records/missing-records.component.html
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
- Exception ID
- Invoice Number
-
-
-
-
- {{failedRecord?.id}}
- {{failedRecord?.recordIdentifier}}
-
-
-
-
diff --git a/app/features/invoice-processes/invoice-processing/missing-records/missing-records/missing-records.component.scss b/app/features/invoice-processes/invoice-processing/missing-records/missing-records/missing-records.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/invoice-processes/invoice-processing/missing-records/missing-records/missing-records.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/invoice-processes/invoice-processing/missing-records/missing-records/missing-records.component.spec.ts b/app/features/invoice-processes/invoice-processing/missing-records/missing-records/missing-records.component.spec.ts
deleted file mode 100644
index d826c7d..0000000
--- a/app/features/invoice-processes/invoice-processing/missing-records/missing-records/missing-records.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { MissingRecordsComponent } from './missing-records.component';
-
-describe('MissingRecordsComponent', () => {
- let component: MissingRecordsComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ MissingRecordsComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(MissingRecordsComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/invoice-processes/invoice-processing/missing-records/missing-records/missing-records.component.ts b/app/features/invoice-processes/invoice-processing/missing-records/missing-records/missing-records.component.ts
deleted file mode 100644
index d106fc6..0000000
--- a/app/features/invoice-processes/invoice-processing/missing-records/missing-records/missing-records.component.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import {Component, Input, OnInit} from '@angular/core';
-import {AlteryxUnhandledData} from "../../../../../shared/models/alteryx-unhandled-data.interface";
-import {ProcessFailedRecord} from "../../../../../shared/models/process-failed-record.interface";
-
-@Component({
- selector: 'app-missing-records',
- templateUrl: './missing-records.component.html',
- styleUrls: ['./missing-records.component.scss']
-})
-export class MissingRecordsComponent implements OnInit {
-
- @Input() failedRecordsList: ProcessFailedRecord[];
-
- constructor() { }
-
- ngOnInit(): void {
- }
-
-}
diff --git a/app/features/invoice-processes/invoice-processing/process-exception-manipulation/exception-data-preview-popup/exception-data-preview-popup.component.html b/app/features/invoice-processes/invoice-processing/process-exception-manipulation/exception-data-preview-popup/exception-data-preview-popup.component.html
deleted file mode 100644
index 7a59950..0000000
--- a/app/features/invoice-processes/invoice-processing/process-exception-manipulation/exception-data-preview-popup/exception-data-preview-popup.component.html
+++ /dev/null
@@ -1,79 +0,0 @@
-
-
-
-
- Invoice Number
- Invoice Type
- Invoice Issue Date
- Client Name
- Supplier Name
- Total_Price
- Vat_Rate
- Total_Amount
-
-
-
-
- {{receivedException.record.invoiceMasterData.invoiceNumber}}
- {{receivedException.record.invoiceMasterData.invoiceType}}
- {{receivedException.record.invoiceMasterData.invoiceIssueDate}}
- {{receivedException.record.invoiceMasterData.customerName}}
- {{receivedException.record.invoiceMasterData.supplierName}}
- {{receivedException.record.invoiceMasterData.totalPriceBeforeVat}}
- {{receivedException.record.invoiceMasterData.vatRate}}
- {{receivedException.record.invoiceMasterData.totalAmount}}
-
-
-
-
-
-
-
-
- Routine ID
- Routine Name
- Description
- Status
-
-
-
-
- {{receivedException.alteryxRoutineId}}
-
- {{receivedException.alteryxExceptionDescription}}
- {{receivedException.alteryxExceptionStatus.name}}
-
-
-
-
-
-
-
-
diff --git a/app/features/invoice-processes/invoice-processing/process-exception-manipulation/exception-data-preview-popup/exception-data-preview-popup.component.scss b/app/features/invoice-processes/invoice-processing/process-exception-manipulation/exception-data-preview-popup/exception-data-preview-popup.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/invoice-processes/invoice-processing/process-exception-manipulation/exception-data-preview-popup/exception-data-preview-popup.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/invoice-processes/invoice-processing/process-exception-manipulation/exception-data-preview-popup/exception-data-preview-popup.component.spec.ts b/app/features/invoice-processes/invoice-processing/process-exception-manipulation/exception-data-preview-popup/exception-data-preview-popup.component.spec.ts
deleted file mode 100644
index e728646..0000000
--- a/app/features/invoice-processes/invoice-processing/process-exception-manipulation/exception-data-preview-popup/exception-data-preview-popup.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { ExceptionDataPreviewPopupComponent } from './exception-data-preview-popup.component';
-
-describe('ExceptionDataPreviewPopupComponent', () => {
- let component: ExceptionDataPreviewPopupComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ ExceptionDataPreviewPopupComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(ExceptionDataPreviewPopupComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/invoice-processes/invoice-processing/process-exception-manipulation/exception-data-preview-popup/exception-data-preview-popup.component.ts b/app/features/invoice-processes/invoice-processing/process-exception-manipulation/exception-data-preview-popup/exception-data-preview-popup.component.ts
deleted file mode 100644
index c3de983..0000000
--- a/app/features/invoice-processes/invoice-processing/process-exception-manipulation/exception-data-preview-popup/exception-data-preview-popup.component.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-import {Component, OnInit} from '@angular/core';
-import {DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog';
-import {AlteryxException} from 'src/app/shared/models/alteryx-exception.interface';
-import { NotificationsHandlingService } from 'src/app/shared/services/notifications-handling/notifications-handling.service';
-import {InvoiceProcessesService} from '../../../../../shared/services/invoice-processes.service';
-
-@Component({
- selector: 'app-exception-data-preview-popup',
- templateUrl: './exception-data-preview-popup.component.html',
- styleUrls: ['./exception-data-preview-popup.component.scss']
-})
-export class ExceptionDataPreviewPopupComponent implements OnInit {
- receivedException: AlteryxException;
-
- constructor(public ref: DynamicDialogRef, public config: DynamicDialogConfig, private processService: InvoiceProcessesService,
- private notificationService: NotificationsHandlingService
- ) {
- this.config.header = 'Previewing of Unhandled Data';
- this.config.height = 'auto';
- this.config.width = 'auto';
- this.config.closable = false;
- }
-
- ngOnInit(): void {
- this.config.data = Array.of(this.config.data);
- console.log(this.config.data);
- }
-
- recalculation() { //TODO create me when endpoint is created
- this.processService.recalculateException(this.receivedException.id).subscribe( result => {
- this.notificationService.showRecalculateExceptionSuccess();
- });
- }
-
-}
diff --git a/app/features/invoice-processes/invoice-processing/process-exception-manipulation/process-exception-manipulation.component.html b/app/features/invoice-processes/invoice-processing/process-exception-manipulation/process-exception-manipulation.component.html
deleted file mode 100644
index 1539e5a..0000000
--- a/app/features/invoice-processes/invoice-processing/process-exception-manipulation/process-exception-manipulation.component.html
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
- Routine ID
- Routine Name
- Description
- Status
-
-
-
-
-
- {{exception.alteryxRoutineId}}
- NOT IN DB
- {{exception.alteryxExceptionDescription}}
- {{exception.alteryxExceptionStatus.name}}
-
-
-
-
-
-
-
-
-
-
diff --git a/app/features/invoice-processes/invoice-processing/process-exception-manipulation/process-exception-manipulation.component.scss b/app/features/invoice-processes/invoice-processing/process-exception-manipulation/process-exception-manipulation.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/invoice-processes/invoice-processing/process-exception-manipulation/process-exception-manipulation.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/invoice-processes/invoice-processing/process-exception-manipulation/process-exception-manipulation.component.spec.ts b/app/features/invoice-processes/invoice-processing/process-exception-manipulation/process-exception-manipulation.component.spec.ts
deleted file mode 100644
index f01392e..0000000
--- a/app/features/invoice-processes/invoice-processing/process-exception-manipulation/process-exception-manipulation.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { ProcessExceptionManipulationComponent } from './process-exception-manipulation.component';
-
-describe('ProcessExceptionManipulationComponent', () => {
- let component: ProcessExceptionManipulationComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ ProcessExceptionManipulationComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(ProcessExceptionManipulationComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/invoice-processes/invoice-processing/process-exception-manipulation/process-exception-manipulation.component.ts b/app/features/invoice-processes/invoice-processing/process-exception-manipulation/process-exception-manipulation.component.ts
deleted file mode 100644
index fc658ce..0000000
--- a/app/features/invoice-processes/invoice-processing/process-exception-manipulation/process-exception-manipulation.component.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-import {Component, Input, OnInit} from '@angular/core';
-import {AlteryxUnhandledData} from '../../../../shared/models/alteryx-unhandled-data.interface';
-import {AlteryxException} from '../../../../shared/models/alteryx-exception.interface';
-import {DialogService} from 'primeng/dynamicdialog';
-import {ExceptionDataPreviewPopupComponent} from './exception-data-preview-popup/exception-data-preview-popup.component';
-import {InvoiceProcessesService} from '../../../../shared/services/invoice-processes.service';
-import { NotificationsHandlingService } from 'src/app/shared/services/notifications-handling/notifications-handling.service';
-
-@Component({
- selector: 'app-process-exception-manipulation',
- templateUrl: './process-exception-manipulation.component.html',
- styleUrls: ['./process-exception-manipulation.component.scss']
-})
-export class ProcessExceptionManipulationComponent implements OnInit {
- @Input()
- receivedException: AlteryxException;
-
- constructor(private dialogService: DialogService, private processService: InvoiceProcessesService,
- private notificationService: NotificationsHandlingService) {
- }
-
- ngOnInit(): void {
- }
-
- preview(exception: AlteryxException): void {
- this.dialogService.open(ExceptionDataPreviewPopupComponent, {data: exception});
- // this will be done by pagidas
- }
-
- recalculation(exception: AlteryxException): void {
- this.processService.recalculateException(exception.id).subscribe( result => {
- this.notificationService.showRecalculateExceptionSuccess();
- });
- }
-}
diff --git a/app/features/invoice-processes/invoice-processing/process-history/process-history.component.html b/app/features/invoice-processes/invoice-processing/process-history/process-history.component.html
deleted file mode 100644
index cb55f90..0000000
--- a/app/features/invoice-processes/invoice-processing/process-history/process-history.component.html
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
- Process History ID
- Process Status
- Process Status Update
- Process History Description
- User ID
-
-
-
-
- {{process.id}}
- {{process.processStatus.name}}
- {{process.processStatusUpdate|date: "dd/MM/yyyy HH:mm"}}
- {{process.processHistoryDescription}}
- {{process.userId}}
-
-
-
diff --git a/app/features/invoice-processes/invoice-processing/process-history/process-history.component.scss b/app/features/invoice-processes/invoice-processing/process-history/process-history.component.scss
deleted file mode 100644
index e69de29..0000000
diff --git a/app/features/invoice-processes/invoice-processing/process-history/process-history.component.spec.ts b/app/features/invoice-processes/invoice-processing/process-history/process-history.component.spec.ts
deleted file mode 100644
index e279028..0000000
--- a/app/features/invoice-processes/invoice-processing/process-history/process-history.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { ProcessHistoryComponent } from './process-history.component';
-
-describe('ProcessHistoryComponent', () => {
- let component: ProcessHistoryComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ ProcessHistoryComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(ProcessHistoryComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/invoice-processes/invoice-processing/process-history/process-history.component.ts b/app/features/invoice-processes/invoice-processing/process-history/process-history.component.ts
deleted file mode 100644
index 10b4eb9..0000000
--- a/app/features/invoice-processes/invoice-processing/process-history/process-history.component.ts
+++ /dev/null
@@ -1,48 +0,0 @@
-import {Component, Input, OnChanges, OnInit, SimpleChanges} from '@angular/core';
-import {FullInvoiceProcess} from '../../../../shared/models/full-invoice-process.interface';
-import {ProcessHistory} from '../../../../shared/models/process-history.interface';
-import {Observable} from 'rxjs';
-import {InvoiceProcessesService} from '../../../../shared/services/invoice-processes.service';
-
-@Component({
- selector: 'app-process-history',
- templateUrl: './process-history.component.html',
- styleUrls: ['./process-history.component.scss']
-})
-export class ProcessHistoryComponent implements OnInit, OnChanges {
-
- @Input() process: FullInvoiceProcess;
- processHistoryData: ProcessHistory[];
-
- first: number = 0;
- rows: number = 10;
- loading = false;
-
- constructor(private processService: InvoiceProcessesService) {
- }
-
- ngOnInit(): void {
- if ( Object.keys(this.process).length > 0 ) {
- this.getProcessHistoryData(this.process.id);
- } else {
- this.processHistoryData = [];
- }
- }
-
- ngOnChanges(changes: SimpleChanges) {
- if ( Object.keys(this.process).length > 0 ) {
- this.getProcessHistoryData(this.process.id);
- }
- }
-
- getProcessHistoryData(processId: number): void {
- this.processService.getProcessHistory(processId).subscribe(data => {
- this.processHistoryData = data;
- });
- }
-
- onPagination(event) {
- this.first = event.first;
- }
-
-}
diff --git a/app/features/invoice-processes/invoice-processing/process-unhandled-data/preview-unhandled-data-popup/preview-unhandled-data-popup.component.html b/app/features/invoice-processes/invoice-processing/process-unhandled-data/preview-unhandled-data-popup/preview-unhandled-data-popup.component.html
deleted file mode 100644
index 1a40ef3..0000000
--- a/app/features/invoice-processes/invoice-processing/process-unhandled-data/preview-unhandled-data-popup/preview-unhandled-data-popup.component.html
+++ /dev/null
@@ -1,79 +0,0 @@
-
diff --git a/app/features/invoice-processes/invoice-processing/process-unhandled-data/preview-unhandled-data-popup/preview-unhandled-data-popup.component.scss b/app/features/invoice-processes/invoice-processing/process-unhandled-data/preview-unhandled-data-popup/preview-unhandled-data-popup.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/invoice-processes/invoice-processing/process-unhandled-data/preview-unhandled-data-popup/preview-unhandled-data-popup.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/invoice-processes/invoice-processing/process-unhandled-data/preview-unhandled-data-popup/preview-unhandled-data-popup.component.spec.ts b/app/features/invoice-processes/invoice-processing/process-unhandled-data/preview-unhandled-data-popup/preview-unhandled-data-popup.component.spec.ts
deleted file mode 100644
index 21bc20e..0000000
--- a/app/features/invoice-processes/invoice-processing/process-unhandled-data/preview-unhandled-data-popup/preview-unhandled-data-popup.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { PreviewUnhandledDataPopupComponent } from './preview-unhandled-data-popup.component';
-
-describe('PreviewUnhandledDataPopupComponent', () => {
- let component: PreviewUnhandledDataPopupComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ PreviewUnhandledDataPopupComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(PreviewUnhandledDataPopupComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/invoice-processes/invoice-processing/process-unhandled-data/preview-unhandled-data-popup/preview-unhandled-data-popup.component.ts b/app/features/invoice-processes/invoice-processing/process-unhandled-data/preview-unhandled-data-popup/preview-unhandled-data-popup.component.ts
deleted file mode 100644
index 89c0391..0000000
--- a/app/features/invoice-processes/invoice-processing/process-unhandled-data/preview-unhandled-data-popup/preview-unhandled-data-popup.component.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-import {Component, OnInit} from '@angular/core';
-import {FormBuilder, FormGroup} from '@angular/forms';
-import {DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog';
-
-@Component({
- selector: 'app-preview-unhandled-data-popup',
- templateUrl: './preview-unhandled-data-popup.component.html',
- styleUrls: ['./preview-unhandled-data-popup.component.scss']
-})
-export class PreviewUnhandledDataPopupComponent implements OnInit {
- invoiceForm: FormGroup;
-
- constructor(public ref: DynamicDialogRef,
- public config: DynamicDialogConfig, private fb: FormBuilder,
- ) {
- this.config.header = 'Previewing of Unhandled Data';
- this.config.height = 'auto';
- this.config.width = '50vw';
- this.config.closable = false;
- }
-
- ngOnInit(): void {
- this.invoiceForm = this.fb.group({
- invoiceNumber: this.fb.control({value:null,disabled:true}),
- invoiceType: this.fb.control({value:null,disabled:true}),
- invoiceIssueDate: this.fb.control({value:null,disabled:true}),
- customerName: this.fb.control({value:null,disabled:true}),
- supplierName: this.fb.control({value:null,disabled:true}),
- totalPriceBeforeVat: this.fb.control({value:null,disabled:true}),
- vatRate: this.fb.control({value:null,disabled:true}),
- totalAmount: this.fb.control({value:null,disabled:true})
- });
- console.log(this.config.data);
- this.invoiceForm.patchValue(this.config.data);
- }
-
-}
diff --git a/app/features/invoice-processes/invoice-processing/process-unhandled-data/process-unhandled-data.component.html b/app/features/invoice-processes/invoice-processing/process-unhandled-data/process-unhandled-data.component.html
deleted file mode 100644
index 3451b81..0000000
--- a/app/features/invoice-processes/invoice-processing/process-unhandled-data/process-unhandled-data.component.html
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-
- Invoice Number
- Invoice Type
- Invoice IssueDate
- Client Name
- Supplier Name
- Total Price
- Vat Rate
- total Amount
-
-
-
-
-
- {{unhandledData?.record.invoiceMasterData.invoiceNumber}}
- {{unhandledData?.record.invoiceMasterData.invoiceType}}
- {{unhandledData?.record.invoiceMasterData.invoiceIssueDate}}
- {{unhandledData?.record.invoiceMasterData.customerName}}
- {{unhandledData?.record.invoiceMasterData.supplierName}}
- {{unhandledData?.record.invoiceMasterData.totalPriceBeforeVat}}
- {{unhandledData?.record.invoiceMasterData.vatRate}}
- {{unhandledData?.record.invoiceMasterData.totalAmount}}
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/features/invoice-processes/invoice-processing/process-unhandled-data/process-unhandled-data.component.scss b/app/features/invoice-processes/invoice-processing/process-unhandled-data/process-unhandled-data.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/invoice-processes/invoice-processing/process-unhandled-data/process-unhandled-data.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/invoice-processes/invoice-processing/process-unhandled-data/process-unhandled-data.component.spec.ts b/app/features/invoice-processes/invoice-processing/process-unhandled-data/process-unhandled-data.component.spec.ts
deleted file mode 100644
index a296d5f..0000000
--- a/app/features/invoice-processes/invoice-processing/process-unhandled-data/process-unhandled-data.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { ProcessUnhandledDataComponent } from './process-unhandled-data.component';
-
-describe('ProcessUnhandledDataComponent', () => {
- let component: ProcessUnhandledDataComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ ProcessUnhandledDataComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(ProcessUnhandledDataComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/invoice-processes/invoice-processing/process-unhandled-data/process-unhandled-data.component.ts b/app/features/invoice-processes/invoice-processing/process-unhandled-data/process-unhandled-data.component.ts
deleted file mode 100644
index 8a9095b..0000000
--- a/app/features/invoice-processes/invoice-processing/process-unhandled-data/process-unhandled-data.component.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-import {Component, Input, OnInit} from '@angular/core';
-import {AlteryxUnhandledData} from '../../../../shared/models/alteryx-unhandled-data.interface';
-import {DialogService} from 'primeng/dynamicdialog';
-import {PreviewUnhandledDataPopupComponent} from './preview-unhandled-data-popup/preview-unhandled-data-popup.component';
-import {ReclassifyUnhandledDataDialogComponent} from './reclassify-unhandled-data-dialog/reclassify-unhandled-data-dialog.component';
-
-@Component({
- selector: 'app-process-unhandled-data',
- templateUrl: './process-unhandled-data.component.html',
- styleUrls: ['./process-unhandled-data.component.scss']
-})
-export class ProcessUnhandledDataComponent implements OnInit {
- @Input()
- unhandledDataList: AlteryxUnhandledData[];
-
- constructor(private dialogService: DialogService) {
- }
-
- ngOnInit(): void {
- }
-
- preview(unhandledData: AlteryxUnhandledData) {
- this.dialogService.open(PreviewUnhandledDataPopupComponent, {data: unhandledData.record.invoiceMasterData});
- }
-
- reclassification(unhandledData: AlteryxUnhandledData) {
- this.dialogService.open(ReclassifyUnhandledDataDialogComponent, {data: unhandledData});
-
- }
-}
diff --git a/app/features/invoice-processes/invoice-processing/process-unhandled-data/reclassify-unhandled-data-dialog/reclassify-unhandled-data-dialog.component.html b/app/features/invoice-processes/invoice-processing/process-unhandled-data/reclassify-unhandled-data-dialog/reclassify-unhandled-data-dialog.component.html
deleted file mode 100644
index d31590a..0000000
--- a/app/features/invoice-processes/invoice-processing/process-unhandled-data/reclassify-unhandled-data-dialog/reclassify-unhandled-data-dialog.component.html
+++ /dev/null
@@ -1,84 +0,0 @@
-
-
-
-
-
- Invoice Number
- Invoice Type
- Invoice IssueDate
- Client Name
- Supplier Name
- Total Price
- Vat Rate
- total Amount
-
-
-
-
- {{unhandledData?.record.invoiceMasterData.invoiceNumber}}
- {{unhandledData?.record.invoiceMasterData.invoiceType}}
- {{unhandledData?.record.invoiceMasterData.invoiceIssueDate}}
- {{unhandledData?.record.invoiceMasterData.customerName}}
- {{unhandledData?.record.invoiceMasterData.supplierName}}
- {{unhandledData?.record.invoiceMasterData.totalPriceBeforeVat}}
- {{unhandledData?.record.invoiceMasterData.vatRate}}
- {{unhandledData?.record.invoiceMasterData.totalAmount}}
-
-
-
-
-
-
-
- Select Classification:
-
-
-
-
-
- Select Sub-Classification:
-
-
-
-
-
diff --git a/app/features/invoice-processes/invoice-processing/process-unhandled-data/reclassify-unhandled-data-dialog/reclassify-unhandled-data-dialog.component.scss b/app/features/invoice-processes/invoice-processing/process-unhandled-data/reclassify-unhandled-data-dialog/reclassify-unhandled-data-dialog.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/invoice-processes/invoice-processing/process-unhandled-data/reclassify-unhandled-data-dialog/reclassify-unhandled-data-dialog.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/invoice-processes/invoice-processing/process-unhandled-data/reclassify-unhandled-data-dialog/reclassify-unhandled-data-dialog.component.spec.ts b/app/features/invoice-processes/invoice-processing/process-unhandled-data/reclassify-unhandled-data-dialog/reclassify-unhandled-data-dialog.component.spec.ts
deleted file mode 100644
index 138c70b..0000000
--- a/app/features/invoice-processes/invoice-processing/process-unhandled-data/reclassify-unhandled-data-dialog/reclassify-unhandled-data-dialog.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { ReclassifyUnhandledDataDialogComponent } from './reclassify-unhandled-data-dialog.component';
-
-describe('ReclassifyUnhandledDataDialogComponent', () => {
- let component: ReclassifyUnhandledDataDialogComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ ReclassifyUnhandledDataDialogComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(ReclassifyUnhandledDataDialogComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/invoice-processes/invoice-processing/process-unhandled-data/reclassify-unhandled-data-dialog/reclassify-unhandled-data-dialog.component.ts b/app/features/invoice-processes/invoice-processing/process-unhandled-data/reclassify-unhandled-data-dialog/reclassify-unhandled-data-dialog.component.ts
deleted file mode 100644
index 42fd527..0000000
--- a/app/features/invoice-processes/invoice-processing/process-unhandled-data/reclassify-unhandled-data-dialog/reclassify-unhandled-data-dialog.component.ts
+++ /dev/null
@@ -1,82 +0,0 @@
-import {Component, OnInit} from '@angular/core';
-import {DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog';
-import {FormBuilder, FormGroup} from '@angular/forms';
-import {DocumentClassificationService} from '../../../../../shared/services/document-classification.service';
-import {DocumentSubclassificationService} from '../../../../../shared/services/document-subclassification.service';
-import {AlteryxUnhandledData} from '../../../../../shared/models/alteryx-unhandled-data.interface';
-import {InvoiceProcessesService} from '../../../../../shared/services/invoice-processes.service';
-import {DocumentClassification} from '../../../../../shared/models/document-classification.interface';
-import {DocumentSubclassification} from '../../../../../shared/models/document-subclassification.interface';
-import { NotificationsHandlingService } from 'src/app/shared/services/notifications-handling/notifications-handling.service';
-
-@Component({
- selector: 'app-reclassify-unhandled-data-dialog',
- templateUrl: './reclassify-unhandled-data-dialog.component.html',
- styleUrls: ['./reclassify-unhandled-data-dialog.component.scss']
-})
-export class ReclassifyUnhandledDataDialogComponent implements OnInit {
- selectedClassification: DocumentClassification;
- classificationOptions: any;
- subclassificationOptionsDepSelection: any;
- selectedSubClassification: DocumentSubclassification;
- unhandledDataList: AlteryxUnhandledData[];
- private subclassificationOptions: any;
- private invoices: any;
-
- constructor(public ref: DynamicDialogRef,
- public config: DynamicDialogConfig, private fb: FormBuilder,
- private documentClassificationsService: DocumentClassificationService,
- private documentSubclassificationService: DocumentSubclassificationService,
- private unhandledDataService: InvoiceProcessesService,
- private notificationService: NotificationsHandlingService
- ) {
- this.config.header = 'Previewing of Unhandled Data';
- this.config.height = 'auto';
- this.config.width = '50vw';
- this.config.closable = false;
- }
-
- ngOnInit(): void {
- this.unhandledDataList = [this.config.data];
- this.invoices = this.unhandledDataList.map(x => {
- return x.record.invoiceMasterData;
- });
- this.documentClassificationsService.getAll().subscribe(classes => {
-
- this.classificationOptions = classes;
- this.documentSubclassificationService.getAll().subscribe(subclasses => {
- this.subclassificationOptions = subclasses;
- this.toBeNamed();
- });
-
- });
- }
-
- onClassificationSelect($event): void {
- this.subclassificationOptionsDepSelection = this.subclassificationOptions.filter((item) => {
- return item.documentClassification.classificationName === this.selectedClassification.classificationName;
- });
- }
-
- onClassify(): void {
- const inboxBatch = this.unhandledDataList.pop();
- inboxBatch.record.documentClassificationId = this.selectedClassification.classificationId;
- inboxBatch.record.documentSubclassificationId = this.selectedSubClassification.subclassificationId;
- this.unhandledDataService.reclassifyRecords(inboxBatch.id,
- this.selectedClassification.classificationId,
- this.selectedSubClassification.subclassificationId).subscribe( result => {
- this.notificationService.showReclassifyRecordsSuccess();
- });
- this.ref.close();
- }
-
- closeDialog(): void {
- this.ref.close();
- }
-
- private toBeNamed(): void {
- this.subclassificationOptionsDepSelection = this.subclassificationOptions.filter((item) => {
- return item.documentClassification.classificationName === this.selectedClassification;
- });
- }
-}
diff --git a/app/features/left-panel/left-panel.component.html b/app/features/left-panel/left-panel.component.html
deleted file mode 100644
index db0dda1..0000000
--- a/app/features/left-panel/left-panel.component.html
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/app/features/left-panel/left-panel.component.scss b/app/features/left-panel/left-panel.component.scss
deleted file mode 100644
index e8f0e49..0000000
--- a/app/features/left-panel/left-panel.component.scss
+++ /dev/null
@@ -1,14 +0,0 @@
-@import 'src/styles';
-
-.left-panel {
- padding: 30px;
- position: sticky;
- top: 0;
-}
-
-
-@media (min-width: 961px) and (max-width: 990px) {
- .left-panel {
- padding: 30px 10px;
- }
-}
diff --git a/app/features/left-panel/left-panel.component.spec.ts b/app/features/left-panel/left-panel.component.spec.ts
deleted file mode 100644
index 6cf87da..0000000
--- a/app/features/left-panel/left-panel.component.spec.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-import { LeftPanelComponent } from './left-panel.component';
-
-describe('LeftPanelComponent', () => {
- let component: LeftPanelComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ LeftPanelComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(LeftPanelComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/left-panel/left-panel.component.ts b/app/features/left-panel/left-panel.component.ts
deleted file mode 100644
index f16c2cf..0000000
--- a/app/features/left-panel/left-panel.component.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-
-@Component({
- selector: 'app-left-panel',
- templateUrl: './left-panel.component.html',
- styleUrls: ['./left-panel.component.scss']
-})
-export class LeftPanelComponent implements OnInit {
-
- constructor() { }
-
- ngOnInit(): void {
- }
-}
diff --git a/app/features/login/login.component.html b/app/features/login/login.component.html
deleted file mode 100644
index 41e6bbd..0000000
--- a/app/features/login/login.component.html
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- {{"USER_LOGIN" | translate}}
-
-
-
-
-
-
-
diff --git a/app/features/login/login.component.scss b/app/features/login/login.component.scss
deleted file mode 100644
index 8d22bcf..0000000
--- a/app/features/login/login.component.scss
+++ /dev/null
@@ -1,9 +0,0 @@
-@import 'src/styles';
-
-.vertical-container {
- min-height: 500px;
-
- h3 {
- color: $orange;
- }
-}
diff --git a/app/features/login/login.component.spec.ts b/app/features/login/login.component.spec.ts
deleted file mode 100644
index f44dad2..0000000
--- a/app/features/login/login.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { LoginComponent } from './login.component';
-
-describe('LoginComponent', () => {
- let component: LoginComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ LoginComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(LoginComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/login/login.component.ts b/app/features/login/login.component.ts
deleted file mode 100644
index f815584..0000000
--- a/app/features/login/login.component.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { AuthService } from './../../shared/services/auth.service';
-import { Component, OnInit } from '@angular/core';
-import { TranslatePipe } from '@ngx-translate/core';
-
-@Component({
- selector: 'app-login',
- templateUrl: './login.component.html',
- styleUrls: ['./login.component.scss'],
- providers: [TranslatePipe]
-})
-export class LoginComponent implements OnInit {
-
- constructor(private auth: AuthService) { }
-
- ngOnInit(): void {}
-
- login(): void {
- this.auth.login();
- }
-}
diff --git a/app/features/roles/roles-management/create-role/create-role.component.html b/app/features/roles/roles-management/create-role/create-role.component.html
deleted file mode 100644
index 5aa1287..0000000
--- a/app/features/roles/roles-management/create-role/create-role.component.html
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
-
diff --git a/app/features/roles/roles-management/create-role/create-role.component.scss b/app/features/roles/roles-management/create-role/create-role.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/roles/roles-management/create-role/create-role.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/roles/roles-management/create-role/create-role.component.spec.ts b/app/features/roles/roles-management/create-role/create-role.component.spec.ts
deleted file mode 100644
index c29c157..0000000
--- a/app/features/roles/roles-management/create-role/create-role.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { CreateRoleComponent } from './create-role.component';
-
-describe('CreateRoleComponent', () => {
- let component: CreateRoleComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ CreateRoleComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(CreateRoleComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/roles/roles-management/create-role/create-role.component.ts b/app/features/roles/roles-management/create-role/create-role.component.ts
deleted file mode 100644
index decf219..0000000
--- a/app/features/roles/roles-management/create-role/create-role.component.ts
+++ /dev/null
@@ -1,54 +0,0 @@
-import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
-import { FormGroup, FormBuilder, Validators } from '@angular/forms';
-import { DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog';
-import { Role } from 'src/app/shared/models/role.interface';
-import { NotificationsHandlingService } from 'src/app/shared/services/notifications-handling/notifications-handling.service';
-import { RolesService } from 'src/app/shared/services/roles-users-management/role.service';
-
-@Component({
- selector: 'app-create-role',
- templateUrl: './create-role.component.html',
- styleUrls: ['./create-role.component.scss']
-})
-export class CreateRoleComponent implements OnInit {
-
- createRoleForm: FormGroup;
- role: Role;
- @Input() displayDialog: boolean;
- @Output() valueChange = new EventEmitter();
-
- constructor(private fb: FormBuilder, public ref: DynamicDialogRef, private roleservice: RolesService,public config: DynamicDialogConfig, private notifications: NotificationsHandlingService) { }
-
- ngOnInit(): void {
- this.createRoleForm = this.fb.group({
- name: this.fb.control(null, [Validators.required]),
- description: this.fb.control(null, [Validators.required]),
- mradio: this.fb.control(null,[Validators.required])
- });
- }
-
- createRole(): void{
- const role = {
- id: null,
- name: this.createRoleForm.get('name').value,
- description: this.createRoleForm.get('description').value,
- isGlobal: this.createRoleForm.get('mradio').value,
- readOnly: false,
- status:true,
- rightsList: []
- }
- this.roleservice.create(role).subscribe(
- result => {
- this.ref.close(result);
- this.notifications.showCreateRoleSuccess();
- console.log("Successful creation of new role")
- },
- error => {
- console.log("Error at creation of new role")
- });
-
-
-}
-
-
-}
diff --git a/app/features/roles/roles-management/edit-role/edit-role.component.html b/app/features/roles/roles-management/edit-role/edit-role.component.html
deleted file mode 100644
index 97f28eb..0000000
--- a/app/features/roles/roles-management/edit-role/edit-role.component.html
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
diff --git a/app/features/roles/roles-management/edit-role/edit-role.component.scss b/app/features/roles/roles-management/edit-role/edit-role.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/roles/roles-management/edit-role/edit-role.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/roles/roles-management/edit-role/edit-role.component.spec.ts b/app/features/roles/roles-management/edit-role/edit-role.component.spec.ts
deleted file mode 100644
index 08e3869..0000000
--- a/app/features/roles/roles-management/edit-role/edit-role.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { EditRoleComponent } from './edit-role.component';
-
-describe('EditRoleComponent', () => {
- let component: EditRoleComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ EditRoleComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(EditRoleComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/roles/roles-management/edit-role/edit-role.component.ts b/app/features/roles/roles-management/edit-role/edit-role.component.ts
deleted file mode 100644
index 4657ce0..0000000
--- a/app/features/roles/roles-management/edit-role/edit-role.component.ts
+++ /dev/null
@@ -1,45 +0,0 @@
-import { NotificationsHandlingService } from './../../../../shared/services/notifications-handling/notifications-handling.service';
-import { Component, OnInit } from '@angular/core';
-import { Role } from 'src/app/shared/models';
-import { DynamicDialogRef, DynamicDialogConfig } from 'primeng/dynamicdialog';
-import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { RolesService } from 'src/app/shared/services/roles-users-management/role.service';
-
-@Component({
- selector: 'app-edit-role',
- templateUrl: './edit-role.component.html',
- styleUrls: ['./edit-role.component.scss']
-})
-export class EditRoleComponent implements OnInit {
-
- editRoleFormGroup: FormGroup;
- role: Role;
-
- constructor(public ref: DynamicDialogRef, public config: DynamicDialogConfig, private fb: FormBuilder, private roleservice: RolesService, private notifications: NotificationsHandlingService) {
- }
-
- ngOnInit(): void {
- this.editRoleFormGroup = this.fb.group({
- name: this.fb.control(null, [Validators.required]),
- description: this.fb.control(null, [Validators.required])
- });
- console.log(this.config.data);
- this.editRoleFormGroup.patchValue(this.config.data);
- this.role = this.config.data;
- }
-
- updateRole(): void {
- this.role.name = this.editRoleFormGroup.controls['name'].value;
- this.role.description = this.editRoleFormGroup.controls['description'].value;
- this.roleservice.update(this.role).subscribe(
- result => {
- this.ref.close(result);
- this.notifications.showUpdateRoleSuccess();
- },
- error => {
- });
-
-
- }
-
-}
diff --git a/app/features/roles/roles-management/rights-per-role/rights-per-role.component.html b/app/features/roles/roles-management/rights-per-role/rights-per-role.component.html
deleted file mode 100644
index d20c7e4..0000000
--- a/app/features/roles/roles-management/rights-per-role/rights-per-role.component.html
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
- Role: {{role.name}}
-
-
- {{(!role.readOnly ? 'NOTIFYENABLE' : '') | translate}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- No role selected
-
-
-
diff --git a/app/features/roles/roles-management/rights-per-role/rights-per-role.component.scss b/app/features/roles/roles-management/rights-per-role/rights-per-role.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/roles/roles-management/rights-per-role/rights-per-role.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/roles/roles-management/rights-per-role/rights-per-role.component.spec.ts b/app/features/roles/roles-management/rights-per-role/rights-per-role.component.spec.ts
deleted file mode 100644
index a38b506..0000000
--- a/app/features/roles/roles-management/rights-per-role/rights-per-role.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { RightsPerRoleComponent } from './rights-per-role.component';
-
-describe('RightsPerRoleComponent', () => {
- let component: RightsPerRoleComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ RightsPerRoleComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(RightsPerRoleComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/roles/roles-management/rights-per-role/rights-per-role.component.ts b/app/features/roles/roles-management/rights-per-role/rights-per-role.component.ts
deleted file mode 100644
index 9e79572..0000000
--- a/app/features/roles/roles-management/rights-per-role/rights-per-role.component.ts
+++ /dev/null
@@ -1,90 +0,0 @@
-import { Category } from 'src/app/shared/models/category.interface';
-import { Role } from './../../../../shared/models/role.interface';
-import { Component, EventEmitter, Input, OnInit, Output, SimpleChanges } from '@angular/core';
-import { Right } from 'src/app/shared/models';
-import { AuthService } from 'src/app/shared/services/auth.service';
-import { RolesService } from 'src/app/shared/services/roles-users-management/role.service';
-import { USER_RIGHTS } from 'src/app/shared/enums/USER_RIGHTS.enum';
-import { environment } from 'src/environments/environment';
-import { NotificationsHandlingService } from 'src/app/shared/services/notifications-handling/notifications-handling.service';
-import { RightsCategory } from 'src/app/shared/models/rights-category.interface';
-
-@Component({
- selector: 'app-rights-per-role',
- templateUrl: './rights-per-role.component.html',
- styleUrls: ['./rights-per-role.component.scss']
-})
-
-export class RightsPerRoleComponent implements OnInit {
-
- @Input() role: Role;
- @Output() valueChange = new EventEmitter();
- categories: RightsCategory[] = [];
- selectedValues: number[] = [];
- rights: Right[] = [];
- temp:number[]=[];
- isSelectedAll : boolean;
-
-
- constructor(private auth: AuthService, private roleservice: RolesService, private notifications: NotificationsHandlingService) { }
-
- ngOnInit(): void {
- this.loadCategories();
- if (this.auth.userRights.find(t => t.client.id == environment.globalRightsClientID)?.rights) {
- this.rights = this.auth.userRights.find(t => t.client.id == environment.globalRightsClientID)?.rights;
- }
- }
-
- ngOnChanges(changes: SimpleChanges): void {
- this.selectedValues = this.role?.rightsList?.map((item: Right) => item.id);
-
- }
-
- loadCategories(): void {
- this.roleservice.getCategory().subscribe(result => {
- this.categories = result;
- },
- error => {
- });
- }
-
- filterRights(rightslist: Right[]): any[] {
- return rightslist.filter(i => i.isGlobal === this.role.isGlobal);
- }
-
- filterCategories(categories: RightsCategory[]): any[] {
- return categories.filter(i => i.rights.some(i=>i.isGlobal === this.role.isGlobal));
- }
-
- checkAllCheckBoxes(){
- if(!this.isSelectedAll){
- this.temp = [];
- this.categories.filter(i => i.rights.some(i=>i.isGlobal === this.role.isGlobal)).map(i=>i.rights.filter(i=>i.isGlobal === this.role.isGlobal).forEach(i=>this.temp.push(i.id)));
- this.selectedValues = this.temp;
- this.isSelectedAll = true;
- }else{
- this.selectedValues = [];
- this.isSelectedAll = false;
- }
- }
-
- rightsIsDisabled(): boolean {
- if (USER_RIGHTS.G03.isGrantedToUser(this.rights)) {
- return false;
- } else {
- return true;
- }
- }
-
- updateRights(): void {
- this.role.rightsList = Object.assign(this.selectedValues.map((item) => { return { id: item } }));
- this.roleservice.update(this.role).subscribe(result => {
- this.valueChange.emit(result);
- this.auth.getUserDetails();
- this.notifications.showUpdateRightsSuccess();
- },
- error => {
- });
-
- }
-}
diff --git a/app/features/roles/roles-management/rights-per-role/rights-processes/rights-processes.component.html b/app/features/roles/roles-management/rights-per-role/rights-processes/rights-processes.component.html
deleted file mode 100644
index e3c69eb..0000000
--- a/app/features/roles/roles-management/rights-per-role/rights-processes/rights-processes.component.html
+++ /dev/null
@@ -1,8 +0,0 @@
-
- List of rights for role {{role.name}}
-
-
- {{right.id}} - {{right.name}}
-
-
-
diff --git a/app/features/roles/roles-management/rights-per-role/rights-processes/rights-processes.component.scss b/app/features/roles/roles-management/rights-per-role/rights-processes/rights-processes.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/roles/roles-management/rights-per-role/rights-processes/rights-processes.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/roles/roles-management/rights-per-role/rights-processes/rights-processes.component.spec.ts b/app/features/roles/roles-management/rights-per-role/rights-processes/rights-processes.component.spec.ts
deleted file mode 100644
index 370e100..0000000
--- a/app/features/roles/roles-management/rights-per-role/rights-processes/rights-processes.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { RightsProcessesComponent } from './rights-processes.component';
-
-describe('RightsProcessesComponent', () => {
- let component: RightsProcessesComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ RightsProcessesComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(RightsProcessesComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/roles/roles-management/rights-per-role/rights-processes/rights-processes.component.ts b/app/features/roles/roles-management/rights-per-role/rights-processes/rights-processes.component.ts
deleted file mode 100644
index 92617b3..0000000
--- a/app/features/roles/roles-management/rights-per-role/rights-processes/rights-processes.component.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import { Component, Input, OnInit } from '@angular/core';
-import { Role } from '../../../../../shared/models/';
-
-@Component({
- selector: 'app-rights-processes',
- templateUrl: './rights-processes.component.html',
- styleUrls: ['./rights-processes.component.scss']
-})
-export class RightsProcessesComponent implements OnInit {
-
- @Input() role: Role;
-
- constructor() { }
-
- ngOnInit(): void {
- }
-
-}
diff --git a/app/features/roles/roles-management/roles-management.component.html b/app/features/roles/roles-management/roles-management.component.html
deleted file mode 100644
index 4901278..0000000
--- a/app/features/roles/roles-management/roles-management.component.html
+++ /dev/null
@@ -1,109 +0,0 @@
-
-
-
-
{{'ROLES-MANAGEMENT' | translate}}
-
-
-
-
-
-
-
-
-
-
-
-
- Roles List
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Name
- Status
-
-
-
-
-
-
-
-
- {{role.name}}
-
-
-
-
- {{(role.status ? 'ENABLE' : 'DISABLE') | translate}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/features/roles/roles-management/roles-management.component.scss b/app/features/roles/roles-management/roles-management.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/roles/roles-management/roles-management.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/roles/roles-management/roles-management.component.spec.ts b/app/features/roles/roles-management/roles-management.component.spec.ts
deleted file mode 100644
index 0647588..0000000
--- a/app/features/roles/roles-management/roles-management.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { RolesManagementComponent } from './roles-management.component';
-
-describe('RolesManagementComponent', () => {
- let component: RolesManagementComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ RolesManagementComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(RolesManagementComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/roles/roles-management/roles-management.component.ts b/app/features/roles/roles-management/roles-management.component.ts
deleted file mode 100644
index ebed576..0000000
--- a/app/features/roles/roles-management/roles-management.component.ts
+++ /dev/null
@@ -1,163 +0,0 @@
-import { RtaUser } from './../../../shared/models/rta-user.interface';
-import { UserAccess } from './../../../shared/models/user-access.interface';
-import { Component, OnInit } from '@angular/core';
-import { Right, Role } from './../../../shared/models/';
-import { ConfirmationService } from 'primeng/api';
-import { LazyLoadEvent } from 'primeng/api';
-import { DialogService } from 'primeng/dynamicdialog';
-import { CreateRoleComponent } from './create-role/create-role.component';
-import { TranslateService } from '@ngx-translate/core';
-import { EditRoleComponent } from './edit-role/edit-role.component';
-import { AuthService } from 'src/app/shared/services/auth.service';
-import { RolesService } from 'src/app/shared/services/roles-users-management/role.service';
-import { USER_RIGHTS } from 'src/app/shared/enums/USER_RIGHTS.enum';
-import { environment } from 'src/environments/environment';
-import { Page } from 'src/app/shared/models/paging/page.interface';
-import { NotificationsHandlingService } from 'src/app/shared/services/notifications-handling/notifications-handling.service';
-
-@Component({
- selector: 'app-roles-management',
- templateUrl: './roles-management.component.html',
- styleUrls: ['./roles-management.component.scss']
-})
-export class RolesManagementComponent implements OnInit {
-
- loading = true;
- roles: Role[] = [];
- selectedRole: Role;
- totalRecords: number;
- rows = 10;
- users: RtaUser[];
- userAccessList: UserAccess[];
- event2: LazyLoadEvent;
- rights: Right[] = [];
-
-
- constructor(private confirmationService: ConfirmationService,
- private dialogService: DialogService, private translate: TranslateService, private auth: AuthService, private roleservice: RolesService,
- private notificationHandling: NotificationsHandlingService) { }
-
- ngOnInit(): void {
- if(this.auth.userRights.find(t=> t.client.id == environment.globalRightsClientID)?.rights){
- this.rights = this.auth.userRights.find(t=> t.client.id == environment.globalRightsClientID)?.rights;
- }
- }
-
- loadRoles(event: LazyLoadEvent): void {
- this.event2 = event;
- const pageNumber = Math.floor(event.first / event.rows);
- const pageSize = event.rows;
- this.loading = true;
- this.roleservice.getAllPaged(pageNumber, pageSize).subscribe((result: Page) => {
- this.roles = result.data;
- console.log(this.roles);
- this.totalRecords = result.totalElements;
- this.loading = false;
- },
- error => {
- this.loading = false;
- });
- }
-
- updateRoleStatus(role: Role): void {
- this.loading = true;
- this.roleservice.update(role).subscribe(result => {
- this.loading = false;
- this.loadRoles(this.event2);
- this.notificationHandling.showUpdateRoleStatusSuccess();
-
- },
- error => {
- this.loading = false;
- });
-
- }
-
- show(): void {
- const ref = this.dialogService.open(CreateRoleComponent, {
- header: this.translate.instant('CREATE_ROLE')
- });
-
- ref.onClose.subscribe((role: Role) => {
- if (role) {
- this.loadRoles(this.event2);
- }
- });
- }
-
- edit(selected: Role): void {
- const ref = this.dialogService.open(EditRoleComponent, {
- header: this.translate.instant('EDIT_ROLE_BUTTON'),
- //width: '70%',
- data: selected
- });
-
- ref.onClose.subscribe((role: Role) => {
- if (role) {
- this.loadRoles(this.event2);
- }
- });
-
- }
-
- editRoleIsDisabled(selectedRole: Role): boolean {
- if (selectedRole && !selectedRole.readOnly && USER_RIGHTS.G02.isGrantedToUser(this.rights)) {
- return false;
- } else {
- return true;
- }
- }
-
- createRoleIsDisabled(): boolean {
- if ( USER_RIGHTS.G01.isGrantedToUser(this.rights)) {
- return false;
- } else {
- return true;
- }
- }
-
- statusEnable(role: Role): boolean{
- if (USER_RIGHTS.G02.isGrantedToUser(this.rights) && !role.readOnly ) {
- return false;
- } else {
- return true;
- }
-
- }
-
- roleCanBeDeleted(role: Role): boolean{
- if (USER_RIGHTS.G02.isGrantedToUser(this.rights) && role.canBeDeleted) {
- return false;
- } else {
- return true;
- }
- }
-
- deleteRole(id: number): void {
- this.loading = true;
- this.confirmationService.confirm({
- accept: () => {
- this.roleservice.delete(id).subscribe(result => {
- console.log(result);
- this.loading = false;
- this.loadRoles(this.event2);
- this.notificationHandling.showDeleteRoleSuccess();
- },
- error => {
- console.log('error');
- this.loading = false;
- });
- // Actual logic to perform a confirmation
- }, reject: () => {
- this.loading = false;
- }
- });
- }
-
- passEvent(passEvent : Role) {
- if(passEvent){
- this.loadRoles(this.event2);
- }
-
- }
-}
diff --git a/app/features/roles/roles-per-user/roles-per-user.component.html b/app/features/roles/roles-per-user/roles-per-user.component.html
deleted file mode 100644
index 3617008..0000000
--- a/app/features/roles/roles-per-user/roles-per-user.component.html
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
{{'ROLES-PER-USER' | translate}}
-
-
-
-
-
-
-
-
-
diff --git a/app/features/roles/roles-per-user/roles-per-user.component.scss b/app/features/roles/roles-per-user/roles-per-user.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/roles/roles-per-user/roles-per-user.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/roles/roles-per-user/roles-per-user.component.spec.ts b/app/features/roles/roles-per-user/roles-per-user.component.spec.ts
deleted file mode 100644
index 4a3db30..0000000
--- a/app/features/roles/roles-per-user/roles-per-user.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { RolesPerUserComponent } from './roles-per-user.component';
-
-describe('RolesPerUserComponent', () => {
- let component: RolesPerUserComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ RolesPerUserComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(RolesPerUserComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/roles/roles-per-user/roles-per-user.component.ts b/app/features/roles/roles-per-user/roles-per-user.component.ts
deleted file mode 100644
index 597baf0..0000000
--- a/app/features/roles/roles-per-user/roles-per-user.component.ts
+++ /dev/null
@@ -1,80 +0,0 @@
-import { RtaUser } from './../../../shared/models/rta-user.interface';
-import { Component, OnInit, ViewChild } from '@angular/core';
-import { SearchUser } from '../../../shared/models/request/search-user.interface';
-import { SearchUserComponent } from './search-user/search-user.component';
-import { SearchResponse } from 'src/app/shared/models/search-response.interface';
-import { UsersService } from 'src/app/shared/services/roles-users-management/user.service';
-import { Page } from 'src/app/shared/models/paging/page.interface';
-
-@Component({
- selector: 'app-roles-per-user',
- templateUrl: './roles-per-user.component.html',
- styleUrls: ['./roles-per-user.component.scss']
-})
-export class RolesPerUserComponent implements OnInit {
- searchRequest: SearchUser;
- users: SearchResponse;
- loading: boolean;
- selectedUser: RtaUser;
- paginationEventRequest: { page: number, offset: number };
-
-
- constructor(private userservice: UsersService) { }
-
-
- @ViewChild(SearchUserComponent, { static: false })
- searchUserComponent: SearchUserComponent;
-
-
-
- ngOnInit(): void {
- }
-
- lastSearchCriteria: {
- userCode: string,
- name: string,
- surname: string,
- email: string,
- status: string
- };
-
- searchByCriteria(pageNumber = 0, pageSize = 10): void {
- // this.searchInitiated.emit(true);
- this.loading = true;
- this.searchRequest = this.searchUserComponent.searchCriteriaForm.value;
- this.userservice.searchByCriteriaPaged(pageNumber, pageSize,this.searchRequest,'search').subscribe((result: Page) => {
- this.users = result;
- console.log(this.users);
- this.loading = false;
- },
- error => {
- this.loading = false;
- });
- }
-
- public passData(user: RtaUser): void {
- this.selectedUser = user;
- }
-
- paginationEvent(paginationEvent) {
- this.paginationEventRequest = paginationEvent;
- this.searchByCriteria(this.paginationEventRequest.page, this.paginationEventRequest.offset);
- }
-
- passEvent(passEvent ) {
- if(passEvent){
- if(this.paginationEventRequest != undefined){
- this.searchByCriteria(this.paginationEventRequest.page, this.paginationEventRequest.offset);
- }else{
- this.searchByCriteria(0, 10);
- }
- }
- }
-
- clear() {
- this.searchUserComponent.resetForm();
- }
-
-
-
-}
diff --git a/app/features/roles/roles-per-user/search-results/search-results.component.html b/app/features/roles/roles-per-user/search-results/search-results.component.html
deleted file mode 100644
index 231cfb6..0000000
--- a/app/features/roles/roles-per-user/search-results/search-results.component.html
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-
-
- User Code
- User Name
- User Surname
- User Email
- Status
-
-
-
-
-
-
-
- {{user.userCode}}
- {{user.name}}
- {{user.surname}}
- {{user.email}}
- {{user.status}}
-
-
-
diff --git a/app/features/roles/roles-per-user/search-results/search-results.component.scss b/app/features/roles/roles-per-user/search-results/search-results.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/roles/roles-per-user/search-results/search-results.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/roles/roles-per-user/search-results/search-results.component.spec.ts b/app/features/roles/roles-per-user/search-results/search-results.component.spec.ts
deleted file mode 100644
index b67fb35..0000000
--- a/app/features/roles/roles-per-user/search-results/search-results.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { SearchResultsComponent } from './search-results.component';
-
-describe('SearchResultsComponent', () => {
- let component: SearchResultsComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ SearchResultsComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(SearchResultsComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/roles/roles-per-user/search-results/search-results.component.ts b/app/features/roles/roles-per-user/search-results/search-results.component.ts
deleted file mode 100644
index feaf6b3..0000000
--- a/app/features/roles/roles-per-user/search-results/search-results.component.ts
+++ /dev/null
@@ -1,61 +0,0 @@
-import { RtaUser } from './../../../../shared/models/rta-user.interface';
-import { Component, OnInit, Input, SimpleChanges, Output, EventEmitter, ViewChild } from '@angular/core';
-import { LazyLoadEvent } from 'primeng/api';
-import { Page } from 'src/app/shared/models/paging/page.interface';
-import { Table } from 'primeng/table';
-import { UserAccess } from 'src/app/shared/models/user-access.interface';
-
-@Component({
- selector: 'app-search-results',
- templateUrl: './search-results.component.html',
- styleUrls: ['./search-results.component.scss']
-})
-export class SearchResultsComponent implements OnInit {
- @Output() user: EventEmitter = new EventEmitter();
- @Output() paginationEvent = new EventEmitter<{ page: number, offset: number }>(); // TODO: Use interface.
- @Input() load: boolean;
- @Input() set users(results: Page) {
- if (results) {
- this._users = results;
- this.totalRecords = results.totalElements;
- this.load = false;
- if(this.selectedUser){
-
- }
- }
- }
- @ViewChild('usersTable') usersTable: Table;
- _users: Page;
- selectedUser: RtaUser;
- totalRecords: number;
- rows = 10;
-
-
- constructor() { }
-
- ngOnInit(): void {
- }
-
- ngOnChanges(changes: SimpleChanges): void {
- if(changes?.users){
- this.selectedUser = changes.users.currentValue?.data?.find((item: UserAccess) => item?.id === this.selectedUser?.id);
- this.user.emit(this.selectedUser);
- }
- }
-
- onLazyLoad(event: LazyLoadEvent) {
- if (this._users) {
- let pageToRequest = Math.floor(event.first / event.rows);
- let pageSize = event.rows;
- this.load = true;
- console.log('onLazyLoad', event, 'pageToRequest', pageToRequest, 'pageSize', pageSize)
- this.paginationEvent.emit({ page: pageToRequest, offset: pageSize });
- }
-
- }
-
- addSelectedUser(value: RtaUser) {
- this.user.emit(value);
- }
-
-}
diff --git a/app/features/roles/roles-per-user/search-user/search-user.component.html b/app/features/roles/roles-per-user/search-user/search-user.component.html
deleted file mode 100644
index 4852047..0000000
--- a/app/features/roles/roles-per-user/search-user/search-user.component.html
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
diff --git a/app/features/roles/roles-per-user/search-user/search-user.component.scss b/app/features/roles/roles-per-user/search-user/search-user.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/roles/roles-per-user/search-user/search-user.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/roles/roles-per-user/search-user/search-user.component.spec.ts b/app/features/roles/roles-per-user/search-user/search-user.component.spec.ts
deleted file mode 100644
index 7b77a4f..0000000
--- a/app/features/roles/roles-per-user/search-user/search-user.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { SearchUserComponent } from './search-user.component';
-
-describe('SearchUserComponent', () => {
- let component: SearchUserComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ SearchUserComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(SearchUserComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/roles/roles-per-user/search-user/search-user.component.ts b/app/features/roles/roles-per-user/search-user/search-user.component.ts
deleted file mode 100644
index dffcb81..0000000
--- a/app/features/roles/roles-per-user/search-user/search-user.component.ts
+++ /dev/null
@@ -1,104 +0,0 @@
-import { Component, OnInit, Output, EventEmitter } from '@angular/core';
-import { FormBuilder, FormGroup } from '@angular/forms';
-import { UserAutoComplete } from 'src/app/shared/models/response/user-autocomplete.interface';
-import { UsersService } from 'src/app/shared/services/roles-users-management/user.service';
-import { ErrorHandlingService } from 'src/app/shared/services/error-handling/error-handling.service';
-import { ApiService } from '.././../../../shared/services/api.service';
-
-@Component({
- selector: 'app-search-user',
- templateUrl: './search-user.component.html',
- styleUrls: ['./search-user.component.scss']
-})
-export class SearchUserComponent implements OnInit {
- searchCriteriaForm: FormGroup;
- userSuggestions: string[];
- userSuggestion: UserAutoComplete[];
-
- constructor(
- private fb: FormBuilder,
- private errorHandlingService: ErrorHandlingService,
- private userservice: UsersService
- ) { }
-
- ngOnInit(): void {
- this.searchCriteriaForm = this.fb.group({
- userCode: [null],
- name: [null],
- surname: [null],
- email: [null],
- status: [null]
- });
- }
-
- autoSuggestUserCode(event) {
- if (!event.query || event.query.length < 3) {
- this.userSuggestions = [];
- return;
- }
- this.userservice.getUserCodeAutoComplete(event.query).subscribe(
- (values: UserAutoComplete[]) => {
- let temp: string[] = [];
- this.userSuggestion = values;
- values.map(val => temp.push(val.id));
- this.userSuggestions = temp
- },
- err => this.errorHandlingService.showHttpResponseError(err)
- );
- }
-
- autoSuggestName(event) {
- if (!event.query || event.query.length < 3) {
- this.userSuggestions = [];
- return;
- }
- this.userservice.getUserNameAutocomplete(event.query).subscribe(
- (values: UserAutoComplete[]) => {
- let temp: string[] = [];
- this.userSuggestion = values;
- values.map(val => temp.push(val.name));
- this.userSuggestions = temp
- },
- err => this.errorHandlingService.showHttpResponseError(err)
- );
- }
-
- autoSuggestSurname(event) {
- if (!event.query || event.query.length < 3) {
- this.userSuggestions = [];
- return;
- }
- this.userservice.getUserSurnameAutoComplete(event.query).subscribe(
- (values: UserAutoComplete[]) => {
- let temp: string[] = [];
- this.userSuggestion = values;
- values.map(val => temp.push(val.surname));
- this.userSuggestions = temp
- },
- err => this.errorHandlingService.showHttpResponseError(err)
- );
- }
-
- autoSuggestEmail(event) {
- if (!event.query || event.query.length < 3) {
- this.userSuggestions = [];
- return;
- }
- this.userservice.getUserEmailAutoComplete(event.query).subscribe(
- (values: UserAutoComplete[]) => {
- let temp: string[] = [];
- this.userSuggestion = values;
- values.map(val => temp.push(val.email));
- this.userSuggestions = temp
- },
- err => this.errorHandlingService.showHttpResponseError(err)
- );
- }
-
- resetForm() {
- this.searchCriteriaForm.reset();
- }
-
-
-
-}
diff --git a/app/features/roles/roles-per-user/user-roles/user-roles.component.html b/app/features/roles/roles-per-user/user-roles/user-roles.component.html
deleted file mode 100644
index 8e18f8c..0000000
--- a/app/features/roles/roles-per-user/user-roles/user-roles.component.html
+++ /dev/null
@@ -1,101 +0,0 @@
-
-
-
-
- No selected user
-
-
- 0 && this.checkIfUserHasValue === true">
-
{{'ROLES-ASSIGNED-TO-USER' | translate}} {{(user ? user.name : "")}}
-
-
-
-
-
- iPower Client Code
- iPower Client Name
- Role Code
- Status
-
-
-
-
-
- {{userIPowerClient.ipowerClient.id}}
- {{userIPowerClient.ipowerClient.name}}
- {{userIPowerClient.role.name}}
- {{(userIPowerClient.role.status ? 'ENABLE' : 'DISABLE') | translate}}
-
-
-
-
-
-
-
-
-
-
- {{(user ? user.name : "This user")}} has not existing roles
-
-
-
-
-
-
-
-
-
-
diff --git a/app/features/roles/roles-per-user/user-roles/user-roles.component.scss b/app/features/roles/roles-per-user/user-roles/user-roles.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/roles/roles-per-user/user-roles/user-roles.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/roles/roles-per-user/user-roles/user-roles.component.spec.ts b/app/features/roles/roles-per-user/user-roles/user-roles.component.spec.ts
deleted file mode 100644
index 16d8daf..0000000
--- a/app/features/roles/roles-per-user/user-roles/user-roles.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { UserRolesComponent } from './user-roles.component';
-
-describe('UserRolesComponent', () => {
- let component: UserRolesComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ UserRolesComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(UserRolesComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/roles/roles-per-user/user-roles/user-roles.component.ts b/app/features/roles/roles-per-user/user-roles/user-roles.component.ts
deleted file mode 100644
index 1514374..0000000
--- a/app/features/roles/roles-per-user/user-roles/user-roles.component.ts
+++ /dev/null
@@ -1,133 +0,0 @@
-import { ErrorHandlingService } from './../../../../shared/services/error-handling/error-handling.service';
-import { RtaUser } from './../../../../shared/models/rta-user.interface';
-import { UserAccess } from './../../../../shared/models/user-access.interface';
-import { IPowerClient } from 'src/app/shared/models/ipower-client.interface';
-import { Component, OnInit, Input, SimpleChanges, EventEmitter, Output } from '@angular/core';
-import { Right, Role } from 'src/app/shared/models';
-import { ConfirmationService } from 'primeng/api';
-import { AssignUpdateRole } from 'src/app/shared/models/request/assign-update-role.interface';
-import { AuthService } from 'src/app/shared/services/auth.service';
-import { UsersService } from 'src/app/shared/services/roles-users-management/user.service';
-import { RolesService } from 'src/app/shared/services/roles-users-management/role.service';
-import { USER_RIGHTS } from 'src/app/shared/enums/USER_RIGHTS.enum';
-import { environment } from 'src/environments/environment'
-import { NotificationsHandlingService } from 'src/app/shared/services/notifications-handling/notifications-handling.service';
-
-@Component({
- selector: 'app-user-roles',
- templateUrl: './user-roles.component.html',
- styleUrls: ['./user-roles.component.scss']
-})
-export class UserRolesComponent implements OnInit {
- @Input() user: RtaUser;
- @Output() valueChange = new EventEmitter();
- selectedRole: Role;
- assignNewRole: AssignUpdateRole;
- selectedIpowerClient: string;
- rights: Right[];
- newIPowerClient: IPowerClient;
- userIPowerClient: UserAccess[];
- roles: Role[] = [];
- ipowerClientCodeSuggestions: string[];
- iPowerClientSuggestion: IPowerClient[];
- loading : boolean;
- userRights: Right[] = [];
- checkIfUserHasValue: boolean;
-
-
- constructor(
- private confirmationService: ConfirmationService,
- private auth: AuthService,
- private userservice: UsersService,
- private roleservice: RolesService,
- private errorHandlingService: ErrorHandlingService,
- private notificationService: NotificationsHandlingService
- ) { }
-
- ngOnInit(): void {
- if (this.auth.userRights.find(t => t.client.id == environment.globalRightsClientID)?.rights) {
- this.userRights = this.auth.userRights.find(t => t.client.id == environment.globalRightsClientID)?.rights;
- }
- this.roleservice.getRoles().subscribe(result => {
- this.roles = result;
- },
- error => {
- });
- console.log(this.userIPowerClient);
- }
-
- ngOnChanges(changes: SimpleChanges): void {
- if (this.user) {
- this.userIPowerClient = this.user?.userAccessUsers?.map((item) => item);
- this.checkIfUserHasValue = false;
- this.checkIfUserHasValue = this.user?.userAccessUsers?.some(x => x.status == 'Active');
- }
-
-
- }
-
- isDisabled(user: RtaUser): boolean {
- if (user != null && USER_RIGHTS.G04.isGrantedToUser(this.userRights)) {
- return false;
- } else {
- return true;
- }
- }
-
-
- autosuggestIPowerClientCode(event) {
- if (!event.query || event.query.length < 3) {
- this.ipowerClientCodeSuggestions = [];
- return;
- }
- this.userservice.getClientsByCode(event.query as string).subscribe(
- (values) => {
- let temp: string[] = [];
- this.iPowerClientSuggestion = values;
- values.map(val => temp.push(val.clientCode));
- this.ipowerClientCodeSuggestions = temp;
- },
- err => this.errorHandlingService.showHttpResponseError(err)
- );
- }
-
- disableUserRole(id: number): void {
- console.log(this.userIPowerClient);
- this.confirmationService.confirm({
- accept: () => {
- this.loading = true;
- this.userservice.disableUserRole(id).subscribe(result => {
- this.valueChange.emit(result);
- this.notificationService.showDisableUserRoleSuccess();
- this.loading = false;
- },
- error => {
- console.log('error');
- this.loading = false;
- });
- }, reject: () => {
- this.loading = false;
- }
- });
- }
-
- assignmentNewRole(): void {
- if (this.selectedRole.isGlobal) {
- this.newIPowerClient = Object.assign({ id: "PWC" });
- } else {
- this.newIPowerClient = this.iPowerClientSuggestion.find(client => client.clientCode === this.selectedIpowerClient);
- }
- this.assignNewRole = { id: null, ipowerClient: Object.assign(this.newIPowerClient), role: Object.assign(this.selectedRole), users: Object.assign(this.user) };
- console.log(this.assignNewRole);
- this.userservice.assignNewRole(this.assignNewRole).subscribe(result => {
- this.notificationService.showAssignmentNewRoleSuccess();
- this.valueChange.emit(result);
- },
- error => {
- console.error(error); // TODO: Handle this via a Messaging Service
- });
-
- }
-
-
-}
diff --git a/app/features/vertical-menu/vertical-menu.component.html b/app/features/vertical-menu/vertical-menu.component.html
deleted file mode 100644
index 88b9f8e..0000000
--- a/app/features/vertical-menu/vertical-menu.component.html
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
- {{'HELLO' | translate}} {{auth.userDetails?.name}}
- {{'SESSION_TIMEOUT' | translate}}: {{auth.tokenExpiresInSec$ | async | hourMinutesSecs}}
-
-
-
diff --git a/app/features/vertical-menu/vertical-menu.component.scss b/app/features/vertical-menu/vertical-menu.component.scss
deleted file mode 100644
index fc3cb90..0000000
--- a/app/features/vertical-menu/vertical-menu.component.scss
+++ /dev/null
@@ -1,97 +0,0 @@
-@import 'src/styles';
-
-.session-timer,
-.user-hello {
- font-size: 0.85em;
- margin: 0 auto;
- text-align: center;
- padding: 0.75em 0.25em;
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
-}
-
-:host ::ng-deep .p-component {
- font-weight: 600;
-
- &.p-menu {
- padding: 0;
- color: $black;
- border: none;
- width: 100%;
-
- .p-menuitem {
- text-align: left;
-
- &:first-child {
- margin-top: 5px;
-
- .p-menuitem-link {
- border-top: unset;
- }
- }
-
- &:last-child {
- margin-bottom: 5px;
- }
-
- .p-menuitem-link {
- padding: 15px;
- display: block;
- background: $light-grey;
- transition: 0.2s;
- border-top: 1px solid $black;
-
- &.p-menuitem-link-active {
- background: $orange;
-
- .p-menuitem-text {
- color: $white;
- }
-
- .p-menuitem-icon {
- color: $white;
- }
-
- &:hover {
- background: $orange;
-
- .p-menuitem-text {
- color: $white;
- }
-
- .p-menuitem-icon {
- color: $white;
- }
- }
- }
-
- &:hover {
- background: $black;
-
- .p-menuitem-text {
- color: $white;
- }
-
- .p-menuitem-icon {
- color: $white;
- }
- }
-
- &:focus {
- box-shadow: none;
- }
-
- .p-menuitem-text {
- color: $black;
- transition: 0.2s;
- }
-
- .p-menuitem-icon {
- color: $black;
- font-size: 1em;
- margin-right: 15px;
- transition: 0.2s;
- }
- }
- }
- }
-}
diff --git a/app/features/vertical-menu/vertical-menu.component.spec.ts b/app/features/vertical-menu/vertical-menu.component.spec.ts
deleted file mode 100644
index 703eddc..0000000
--- a/app/features/vertical-menu/vertical-menu.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { VerticalMenuComponent } from './vertical-menu.component';
-
-describe('VerticalMenuComponent', () => {
- let component: VerticalMenuComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ VerticalMenuComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(VerticalMenuComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/vertical-menu/vertical-menu.component.ts b/app/features/vertical-menu/vertical-menu.component.ts
deleted file mode 100644
index 5e610dc..0000000
--- a/app/features/vertical-menu/vertical-menu.component.ts
+++ /dev/null
@@ -1,74 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-import { VerticalMenu } from './../../shared/models/vertical-menu.interface';
-import { AuthService } from './../../shared/services/auth.service';
-
-@Component({
- selector: 'app-vertical-menu',
- templateUrl: './vertical-menu.component.html',
- styleUrls: ['./vertical-menu.component.scss']
-})
-export class VerticalMenuComponent implements OnInit {
-
- loggedIn = false;
- leftMenu: VerticalMenu;
-
- constructor(public auth: AuthService) { }
-
- ngOnInit(): void {
- this.loggedIn = this.auth.isLoggedIn();
- this.auth.authStatusChanged.subscribe(loggedIn => {
- this.loggedIn = loggedIn;
- this.initializeMenuItems();
- });
- this.initializeMenuItems();
- }
-
- initializeMenuItems() {
- this.leftMenu = {
- 'title': 'My Menu',
- 'items': [
- {
- label: 'Home',
- icon: 'pi pi-home',
- routerLink: '/pages/dashboard'
- },
- {
- label: 'Inbox',
- icon: 'pi pi-inbox',
- routerLink: '/pages/inbox'
- },
- {
- label: 'Processes',
- icon: 'pi pi-th-large',
- routerLink: '/pages/processes'
- },
- {
- label: 'Administration',
- icon: 'pi pi-cog',
- routerLink: '/pages/administration'
- },
- {
- label: 'Reports - Statistics',
- icon: 'pi pi-chart-line',
- disabled: true,
- },
- {
- label: 'My Profile',
- icon: 'pi pi-user',
- disabled: true
- },
- {
- label: 'Logout',
- icon: 'pi pi-sign-out',
- visible: this.loggedIn,
- command: () => this.logout()
- }
- ]
- };
- }
-
- logout(): void {
- this.auth.logout();
- }
-
-}
diff --git a/app/features/welcome/welcome.component.html b/app/features/welcome/welcome.component.html
deleted file mode 100644
index 7f62163..0000000
--- a/app/features/welcome/welcome.component.html
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- Nothing to see here, move along :)
-
-
-
-
- {{authService.userDetails | json}}
-
-
-
-
-
-
diff --git a/app/features/welcome/welcome.component.scss b/app/features/welcome/welcome.component.scss
deleted file mode 100644
index 2f71de1..0000000
--- a/app/features/welcome/welcome.component.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'src/styles';
diff --git a/app/features/welcome/welcome.component.spec.ts b/app/features/welcome/welcome.component.spec.ts
deleted file mode 100644
index a5aa496..0000000
--- a/app/features/welcome/welcome.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { WelcomeComponent } from './welcome.component';
-
-describe('WelcomeComponent', () => {
- let component: WelcomeComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ WelcomeComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(WelcomeComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/app/features/welcome/welcome.component.ts b/app/features/welcome/welcome.component.ts
deleted file mode 100644
index 057e0f8..0000000
--- a/app/features/welcome/welcome.component.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { AuthService } from './../../shared/services/auth.service';
-import { Component, OnInit } from '@angular/core';
-
-@Component({
- selector: 'app-welcome',
- templateUrl: './welcome.component.html',
- styleUrls: ['./welcome.component.scss']
-})
-export class WelcomeComponent implements OnInit {
-
- constructor(public authService: AuthService) { }
-
- ngOnInit(): void {
- }
-
-}
diff --git a/app/shared/auth-codeflow-config.ts b/app/shared/auth-codeflow-config.ts
deleted file mode 100644
index 2e2ac1f..0000000
--- a/app/shared/auth-codeflow-config.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-import { AuthConfig } from 'angular-oauth2-oidc';
-import { environment } from 'src/environments/environment';
-
-export const authCodeFlowConfig: AuthConfig = {
- // Url of the OAuth server
- issuer: environment.oAuth2.issuerUrl + environment.oAuth2.realmName,
-
- // URL of our Angular app to redirect the user to after login
- redirectUri: environment.oAuth2.redirectUri,
-
- // The id under which our app is registered in OpenAM server.
- clientId: environment.oAuth2.clientId,
-
- // Just needed if your auth server demands a secret. In general, this
- // is a sign that the auth server is not configured with SPAs in mind
- // and it might not enforce further best practices vital for security
- // such applications.
- // dummyClientSecret: 'dummy',
-
- // We use implicit flow, so we do not need that
- // responseType: 'code',
-
- // Scope for the permissions the client should request
- scope: environment.oAuth2.scope,
-
- requireHttps: environment.production,
-
- showDebugInformation: !environment.production,
-
- timeoutFactor: 1
-};
diff --git a/app/shared/back-button/search-list-state.service.spec.ts b/app/shared/back-button/search-list-state.service.spec.ts
deleted file mode 100644
index 9baf4c5..0000000
--- a/app/shared/back-button/search-list-state.service.spec.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { TestBed, inject } from '@angular/core/testing';
-
-import { SearchListStateService } from './search-list-state.service';
-
-describe('SearchListStateService', () => {
- beforeEach(() => {
- TestBed.configureTestingModule({
- providers: [SearchListStateService]
- });
- });
-
- it('should be created', inject([SearchListStateService], (service: SearchListStateService) => {
- expect(service).toBeTruthy();
- }));
-});
diff --git a/app/shared/back-button/search-list-state.service.ts b/app/shared/back-button/search-list-state.service.ts
deleted file mode 100644
index a8fcad4..0000000
--- a/app/shared/back-button/search-list-state.service.ts
+++ /dev/null
@@ -1,65 +0,0 @@
-import { Injectable } from '@angular/core';
-import { LazyLoadEvent } from 'primeng/api';
-import { Table } from 'primeng/table';
-
-@Injectable()
-export class SearchListStateService {
-
- private searchState: any = {};
- private page: number ;
- private lastPageVisit :number = -1;
- private event: LazyLoadEvent;
- private table : Table;
-
- constructor() { }
-
- public getTable() {
- return this.table;
- }
-
- public setTable(table : Table) {
- this.table = table ;
- }
-
- public getEvent() {
- return this.event;
- }
-
- public setEvent(event : LazyLoadEvent) {
- this.event = event ;
- }
-
- public getState() {
- return this.searchState;
- }
-
- public setState(state: any) {
- this.searchState = state;
- }
-
- public getLastPageVisit() {
- return this.lastPageVisit;
- }
-
- public setLastPageVisit(page: number) {
- this.lastPageVisit = page;
- }
-
- public getPage(): number {
- return this.page;
- }
-
- public setPage(page: number) {
- this.page = page;
- }
-
- public resetLastPage(){
- this.lastPageVisit = -1;
- }
-
- public clearState() {
- this.searchState = {};
- this.page = null;
- }
-
-}
diff --git a/app/shared/enums/CLASSIFICATION_STATUS.enum.ts b/app/shared/enums/CLASSIFICATION_STATUS.enum.ts
deleted file mode 100644
index bf314fb..0000000
--- a/app/shared/enums/CLASSIFICATION_STATUS.enum.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-export enum CLASSIFICATION_STATUS {
- UNCLASSIFIED = 'Unclassified',
- IGNORED = 'Ignored',
- CLASSIFIED = 'Classified'
-}
diff --git a/app/shared/enums/FILE_TYPE.enum.ts b/app/shared/enums/FILE_TYPE.enum.ts
deleted file mode 100644
index 2526300..0000000
--- a/app/shared/enums/FILE_TYPE.enum.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-export enum FILE_TYPE {
- PDF = 'ACROBAT',
- XLS = 'xls',
- DOCX = 'docx',
- PNG = 'png',
- DOC = 'doc',
- XLSX = 'xlsx'
-}
diff --git a/app/shared/enums/USER_ACCESS_STATUS.enum.ts b/app/shared/enums/USER_ACCESS_STATUS.enum.ts
deleted file mode 100644
index a39d3df..0000000
--- a/app/shared/enums/USER_ACCESS_STATUS.enum.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export enum USER_ACCESS_STATUS {
- ACTIVE = 'Active',
- INACTIVE = 'Inactive'
-}
diff --git a/app/shared/enums/USER_RIGHTS.enum.ts b/app/shared/enums/USER_RIGHTS.enum.ts
deleted file mode 100644
index 7ea7b43..0000000
--- a/app/shared/enums/USER_RIGHTS.enum.ts
+++ /dev/null
@@ -1,79 +0,0 @@
-import { Right } from './../models/right.interface';
-
-export class USER_RIGHTS {
- static readonly A01 = new USER_RIGHTS('A01', 'Configuration of Repetition Frequency', 1, true);
- static readonly A02 = new USER_RIGHTS('A02', 'Preview of Scheduling Procedure', 1, true);
- static readonly A03 = new USER_RIGHTS('A03', 'Preview of Scheduling Procedure according to User\'s Access Rights', 1, false);
- static readonly A04 = new USER_RIGHTS('A04', 'Rescheduling of Downloading Procedure (change of visiting sequence to clients workspaces)', 1, false);
-
- static readonly B01 = new USER_RIGHTS('B01', 'Preview of all Rules', 2, true);
- static readonly B02 = new USER_RIGHTS('B02', 'Preview of Rules, according to User\'s Access Rights', 2, false);
- static readonly B03 = new USER_RIGHTS('B03', 'Add New Rule', 2, true); //
- static readonly B04 = new USER_RIGHTS('B04', 'Edit Rule', 2, true); //
- static readonly B05 = new USER_RIGHTS('B05', 'Delete Rule', 2, true); //
- static readonly B06 = new USER_RIGHTS('B06', 'Change Rule Status', 2, true); //
- static readonly B07 = new USER_RIGHTS('B07', 'Define Confidence Level Range', 2, true); //
- static readonly B08 = new USER_RIGHTS('B08', 'Edit Rule, according to User\'s Access Rights', 2, false);
-
- static readonly C01 = new USER_RIGHTS('C01', 'Preview of Inbox, according to User\'s Access Rights', 3, false);
- static readonly C02 = new USER_RIGHTS('C02', 'Documents Manipulation(Documents Classification and Marking a file as "Ignore")', 3, false);
- static readonly C03 = new USER_RIGHTS('C03', 'Preview of Inbox', 3, true);
-
- static readonly D01 = new USER_RIGHTS('D01', 'Preview of all Processes', 4, true);
- static readonly D02 = new USER_RIGHTS('D02', 'Preview of Processes, according to User\'s Access Rights', 4, false);
- static readonly D03 = new USER_RIGHTS('D03', 'Documents Re - classification', 4, false);
- static readonly D04 = new USER_RIGHTS('D04', 'Data Capturing and Verification', 4, false);
- static readonly D05 = new USER_RIGHTS('D05', 'Validation of Journal Entries', 4, false);
- static readonly D06 = new USER_RIGHTS('D06', 'Manipulation of Exceptions', 4, false);
- static readonly D07 = new USER_RIGHTS('D07', 'Manipulation of Unhandled Data', 4, false);
- static readonly D08 = new USER_RIGHTS('D08', 'Execution of Undo Procedure', 4, false);
-
- static readonly E01 = new USER_RIGHTS('E01', 'Handling of all Clients Personal Data', 5, true);
- static readonly E02 = new USER_RIGHTS('E02', 'Handling of Clients Personal Data, according to User\'s Access Rights', 5, false);
-
- static readonly F01 = new USER_RIGHTS('F01', 'Access to all Reports', 6, true);
- static readonly F02 = new USER_RIGHTS('F02', 'Access to Reports, according to User\'s Access Rights', 6, false);
-
- static readonly G01 = new USER_RIGHTS('G01', 'Create New Roles', 7, true);
- static readonly G02 = new USER_RIGHTS('G02', 'Edit Roles', 7, true);
- static readonly G03 = new USER_RIGHTS('G03', 'Assign Rights to a Role', 7, true);
- static readonly G04 = new USER_RIGHTS('G04', 'Assign Roles to Users', 7, true);
-
- static readonly H01 = new USER_RIGHTS('H01', 'Preview of all Categories', 8, true);
- static readonly H02 = new USER_RIGHTS('H02', 'Add New Category', 8, true);
- static readonly H03 = new USER_RIGHTS('H03', 'Edit Category', 8, true);
- static readonly H04 = new USER_RIGHTS('H04', 'Delete Category', 8, true);
-
- static readonly I01 = new USER_RIGHTS('I01', 'Preview of all Templates', 9, true);
- static readonly I02 = new USER_RIGHTS('I02', 'Add New Template', 9, true);
- static readonly I03 = new USER_RIGHTS('I03', 'Edit Template', 9, true);
- static readonly I04 = new USER_RIGHTS('I04', 'Delete Template', 9, true);
-
- static readonly K01 = new USER_RIGHTS('K01', 'View Application Level Exceptions', 11, true);
-
- static readonly J01 = new USER_RIGHTS('J01', 'Edit Parameter Values', 10, true);
-
- // Private constructor to disallow the creation of other instances.
- private constructor(public readonly code: string, public readonly description: string, public readonly categoryId: number, isGlobal: boolean) { }
-
- public toString(): string {
- return this.code;
- }
-
- /*
- * WARNING:
- * Normally there is "normally" NO reason to use this method and you should use 'AuthService.userHasRightForClient(right: USER_RIGHTS, clientId: string)' instead.
- * Besides that, do what god lights you to do.
- */
- public isGrantedToUser(userRights: Right[]): boolean {
-
- // return true; // Bypass. Also has to be set in AuthService.userHasRightForClient()
-
- if (userRights == null) {
- return false;
- }
-
- let found = userRights.find(r => r.code == this.code);
- return found != null;
- }
-}
diff --git a/app/shared/enums/rta-error-message.ts b/app/shared/enums/rta-error-message.ts
deleted file mode 100644
index 081bb9c..0000000
--- a/app/shared/enums/rta-error-message.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-export enum RTAErrorMessage {
- TIMEOUT = 'TIMEOUT',
- CLIENT_NOT_FOUND = 'CLIENT_NOT_FOUND',
- USER_NOT_FOUND = 'USER_NOT_FOUND',
- PLATFORM_CONFIGURATION_NOT_FOUND = 'PLATFORM_CONFIGURATION_NOT_FOUND',
- USER_ACCESS_NOT_FOUND = 'USER_ACCESS_NOT_FOUND',
- ROLE_NOT_FOUND = 'ROLE_NOT_FOUND',
- USER_ACCESS_CONFLICT = 'USER_ACCESS_CONFLICT',
- DOCUMENT_CLASSIFICATION_NOT_FOUND = 'DOCUMENT_CLASSIFICATION_NOT_FOUND',
- DOCUMENT_SUB_CLASSIFICATION_NOT_FOUND = 'DOCUMENT_SUB_CLASSIFICATION_NOT_FOUND'
-}
diff --git a/app/shared/guards/auth.guard.spec.ts b/app/shared/guards/auth.guard.spec.ts
deleted file mode 100644
index 2f496a0..0000000
--- a/app/shared/guards/auth.guard.spec.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { TestBed } from '@angular/core/testing';
-
-import { AuthGuard } from './auth.guard';
-
-describe('AuthGuard', () => {
- let guard: AuthGuard;
-
- beforeEach(() => {
- TestBed.configureTestingModule({});
- guard = TestBed.inject(AuthGuard);
- });
-
- it('should be created', () => {
- expect(guard).toBeTruthy();
- });
-});
diff --git a/app/shared/guards/auth.guard.ts b/app/shared/guards/auth.guard.ts
deleted file mode 100644
index 89cbf76..0000000
--- a/app/shared/guards/auth.guard.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { filter, switchMap, tap } from 'rxjs/operators';
-import { AuthService } from './../services/auth.service';
-import { Injectable } from '@angular/core';
-import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, UrlTree, Router } from '@angular/router';
-import { Observable } from 'rxjs';
-
-@Injectable({
- providedIn: 'root'
-})
-export class AuthGuard implements CanActivate {
-
- constructor(private auth: AuthService, private router: Router) { }
-
- canActivate(
- route: ActivatedRouteSnapshot,
- state: RouterStateSnapshot): Observable | Promise | boolean | UrlTree {
-
- return this.auth.isDoneLoading$.pipe(
- filter(isDone => isDone),
- switchMap(_ => this.auth.isAuthenticated$),
- tap(isAuthenticated => isAuthenticated || this.auth.login(state.url)),
- );
- }
-}
diff --git a/app/shared/models/administration-section.interface.ts b/app/shared/models/administration-section.interface.ts
deleted file mode 100644
index 3a169cf..0000000
--- a/app/shared/models/administration-section.interface.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-import { CardItem } from "./card-item.interface";
-
-export interface AdministrationSection {
- title: string;
- subSections: CardItem[];
-}
diff --git a/app/shared/models/alteryx-exception.interface.ts b/app/shared/models/alteryx-exception.interface.ts
deleted file mode 100644
index eb696f6..0000000
--- a/app/shared/models/alteryx-exception.interface.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import {Record} from './record.interface';
-import {LookupData} from './lookup-data.interface';
-
-export interface AlteryxException {
-
- id: number;
- record: Record[];
- alteryxExceptionStatus: LookupData;
- alteryxRoutineId: number;
- alteryxExceptionDescription: string;
-}
diff --git a/app/shared/models/alteryx-unhandled-data.interface.ts b/app/shared/models/alteryx-unhandled-data.interface.ts
deleted file mode 100644
index 9f8c40f..0000000
--- a/app/shared/models/alteryx-unhandled-data.interface.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-import {Record} from './record.interface';
-import {LookupData} from './lookup-data.interface';
-
-export interface AlteryxUnhandledData {
- id:string;
- record: Record;
- alteryxUnhandledStatus: LookupData;
-}
-
diff --git a/app/shared/models/capturing-verification.interface.ts b/app/shared/models/capturing-verification.interface.ts
deleted file mode 100644
index cc574c6..0000000
--- a/app/shared/models/capturing-verification.interface.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export interface CapturingVerification {
- id: number;
- capturingVerificationsName: string;
-}
diff --git a/app/shared/models/card-item.interface.ts b/app/shared/models/card-item.interface.ts
deleted file mode 100644
index c41c009..0000000
--- a/app/shared/models/card-item.interface.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-export interface CardItem {
- title: string;
- subtitle: string;
- headerImage: string;
- footerImage: string;
- path: string;
-}
diff --git a/app/shared/models/category.interface.ts b/app/shared/models/category.interface.ts
deleted file mode 100644
index ab65f97..0000000
--- a/app/shared/models/category.interface.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import { DocumentClassification } from "./document-classification.interface";
-
-export interface Category {
- id: number;
- documentClassification?: DocumentClassification;
- categoryName: string;
- categoryCode: string;
-}
diff --git a/app/shared/models/chart.interface.ts b/app/shared/models/chart.interface.ts
deleted file mode 100644
index 3f0a2eb..0000000
--- a/app/shared/models/chart.interface.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-export interface PieModel {
- labels: string[];
- datasets: dataset[];
-}
-
-export interface dataset {
- data: number[];
- backgroundColor: string[];
- hoverBackgroundColor: string[];
-}
diff --git a/app/shared/models/configurator-parameter.interface.ts b/app/shared/models/configurator-parameter.interface.ts
deleted file mode 100644
index b3fca07..0000000
--- a/app/shared/models/configurator-parameter.interface.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-
-export interface ConfiguratorParameter {
- configurationId: number;
- configurationVariable: string;
- variableType: string;
- integerValue: number;
- stringValue: string;
-}
diff --git a/app/shared/models/dashboard-section.interface.ts b/app/shared/models/dashboard-section.interface.ts
deleted file mode 100644
index 1f1f4aa..0000000
--- a/app/shared/models/dashboard-section.interface.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { PieModel } from './chart.interface';
-
-export interface DashboardSection {
- type: string;
- totalClients: number;
- totalProcesses: number;
- totalExceptions: number;
- totalUnhandled: number;
- totalPages: number;
- totalElements: number;
- pie?: PieModel;
- selectedElements: number;
- selectedPage: number;
- resultsLoading: boolean;
- aggregatedResults: ProcessesPerClient[];
-}
-
-export interface ProcessesPerClient {
- clientName?: string;
- clientId: string;
- processesNumber: number;
- unhandledNumber: number;
- exceptionsNumber: number;
-}
diff --git a/app/shared/models/document-classification.interface.ts b/app/shared/models/document-classification.interface.ts
deleted file mode 100644
index fdf7af7..0000000
--- a/app/shared/models/document-classification.interface.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export interface DocumentClassification {
- classificationId: number;
- classificationName: string;
-}
diff --git a/app/shared/models/document-subclassification.interface.ts b/app/shared/models/document-subclassification.interface.ts
deleted file mode 100644
index 7513e95..0000000
--- a/app/shared/models/document-subclassification.interface.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import { DocumentClassification } from "./document-classification.interface";
-
-export interface DocumentSubclassification {
- subclassificationId: number;
- subclassificationName: string;
- documentClassification: DocumentClassification;
-}
diff --git a/app/shared/models/download-process-temp.interafce.ts b/app/shared/models/download-process-temp.interafce.ts
deleted file mode 100644
index 205ca2b..0000000
--- a/app/shared/models/download-process-temp.interafce.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-export interface DownloadProcessTemp {
- id: number;
- iPowerClientName: string;
- iPowerClientCode: string;
- dmsClientWorkspace: string;
- dmsActualWorkspace: string;
- status: string;
- results: number;
- downloadDate: Date;
-}
diff --git a/app/shared/models/downloading-procedure-metadata.interface.ts b/app/shared/models/downloading-procedure-metadata.interface.ts
deleted file mode 100644
index 900640b..0000000
--- a/app/shared/models/downloading-procedure-metadata.interface.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import {LookupData} from './lookup-data.interface';
-import {ReceivedFile} from './inbox-document.interface';
-
-export interface DownloadingProcedureMetadata {
- id: number;
- downloadingProcedureStart: Date;
- downloadingProcedureFinish: Date;
- downloadingProcedureStatusId: LookupData;
- estimatedTime: Date;
- receivedFiles: ReceivedFile[];
-}
diff --git a/app/shared/models/files-per-process.interface.ts b/app/shared/models/files-per-process.interface.ts
deleted file mode 100644
index e667776..0000000
--- a/app/shared/models/files-per-process.interface.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import {ReceivedFile} from './inbox-document.interface';
-
-export interface FilesPerProcess {
- id: number;
- receivedFile: ReceivedFile;
-}
-
diff --git a/app/shared/models/full-invoice-process.interface.ts b/app/shared/models/full-invoice-process.interface.ts
deleted file mode 100644
index 4f47c2e..0000000
--- a/app/shared/models/full-invoice-process.interface.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import {LookupData} from './lookup-data.interface';
-import {JournalEntry} from './journal-entry.interface';
-import {AlteryxException} from './alteryx-exception.interface';
-import {AlteryxUnhandledData} from './alteryx-unhandled-data.interface';
-import {FilesPerProcess} from './files-per-process.interface';
-import {ProcessFailedRecord} from './process-failed-record.interface';
-
-export interface FullInvoiceProcess {
- id: number;
- processCreationDatetime: Date;
- documentClassificationId: number;
- processStatus: LookupData;
- userId: string;
- filesPerProcess: FilesPerProcess[];
- recordsPerProcess: any;
- journalEntries: JournalEntry[];
- alteryxExceptions: AlteryxException[];
- alteryxUnhandled: AlteryxUnhandledData[];
- failedRecords: ProcessFailedRecord[];
-}
diff --git a/app/shared/models/i-power-assignment.interface.ts b/app/shared/models/i-power-assignment.interface.ts
deleted file mode 100644
index b447ebb..0000000
--- a/app/shared/models/i-power-assignment.interface.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-export interface IPowerAssignment {
- id: number;
- name: string;
- description: string;
- status: string;
-}
diff --git a/app/shared/models/inbox-batch.interface.ts b/app/shared/models/inbox-batch.interface.ts
deleted file mode 100644
index 9c8832c..0000000
--- a/app/shared/models/inbox-batch.interface.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import {ReceivedFile} from './inbox-document.interface';
-import {LookupData} from './lookup-data.interface';
-import { ReceivedFiles } from './receivedFiles.interface';
-
-
-export interface InboxBatch {
- batchId: number;
- documentCurrentStatusId: LookupData;
- documentStatusLastUpdate: Date;
- statusPerDocRecId: number;
- receivedFile: ReceivedFiles;
-}
diff --git a/app/shared/models/inbox-document.interface.ts b/app/shared/models/inbox-document.interface.ts
deleted file mode 100644
index 47e4830..0000000
--- a/app/shared/models/inbox-document.interface.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { FILE_TYPE } from '../enums/FILE_TYPE.enum';
-import { DocumentClassification } from './document-classification.interface';
-import { DocumentSubclassification } from './document-subclassification.interface';
-import { ReceivedFiles } from './receivedFiles.interface';
-import { StatusPerDocument } from './status-per-document.interface';
-
-export interface ReceivedFile extends ReceivedFiles {
-
- //This data comes from IMANAGER (Valasides)
- downloadingProcedureId: number;
- dmsWorkspacePath: string;
- iPowerClientCode: number;
- iPowerClientName: string;
- statusPerDocument: StatusPerDocument;
-
- //This data comes from Adones
- abbyClassification: DocumentClassification;
- abbySubClassification: DocumentSubclassification;
-}
\ No newline at end of file
diff --git a/app/shared/models/inbox-search-criteria.interface.ts b/app/shared/models/inbox-search-criteria.interface.ts
deleted file mode 100644
index 90f9c57..0000000
--- a/app/shared/models/inbox-search-criteria.interface.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import {FILE_TYPE} from '../enums/FILE_TYPE.enum';
-
-export interface InboxSearchCriteriaInterface {
- receivedFrom: Date;
- receivedTo: Date;
- fileCode: string;
- fileType: FILE_TYPE;
- //TODO change me in the future front and back
- ignore_status: boolean;
- ipowerClientName: string;
- ipowerClientCode: string;
- personalData: boolean;
- userId: string;
-}
diff --git a/app/shared/models/index.ts b/app/shared/models/index.ts
deleted file mode 100644
index 5bf5763..0000000
--- a/app/shared/models/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export * from './role.interface';
-export * from './right.interface';
-export * from './i-power-assignment.interface';
diff --git a/app/shared/models/invoice-master-data.interface.ts b/app/shared/models/invoice-master-data.interface.ts
deleted file mode 100644
index fe48407..0000000
--- a/app/shared/models/invoice-master-data.interface.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-export interface InvoiceMasterData {
- id: number;
- supplierName: string;
- supplierTaxCode: string;
- customerName: string;
- customerTaxCode: string;
- invoiceNumber: string;
- invoiceType: string;
- invoiceIssueDate: Date;
- deliveryAddress: string;
- totalPriceBeforeDiscount: number;
- discountPercentage: number;
- discountAmount: number;
- totalPriceBeforeVat: number;
- vatRate: number;
- vatCode: number;
- vatAmount: number;
- totalAmount: number;
- totalAmountInBaseCurrency: number;
- numberOfDetailLines: number;
-}
-
diff --git a/app/shared/models/invoice-process-search-criteria.interface.ts b/app/shared/models/invoice-process-search-criteria.interface.ts
deleted file mode 100644
index a5d177f..0000000
--- a/app/shared/models/invoice-process-search-criteria.interface.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { FILE_TYPE } from './../enums/FILE_TYPE.enum';
-export interface InvoiceProcessCriteriaInterface {
- userId: string;
- fromDate: Date;
- toDate: Date;
- docClassification: string;
- fileCode: string;
- fileType: FILE_TYPE;
- processId: number;
- processStatus: string;
- ipowerClientName: string;
- ipowerClientCode: string;
- personalData: boolean;
- username: string;
-}
diff --git a/app/shared/models/invoice-process.interface.ts b/app/shared/models/invoice-process.interface.ts
deleted file mode 100644
index 1cf994d..0000000
--- a/app/shared/models/invoice-process.interface.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import {FilesPerProcess} from './files-per-process.interface';
-import {LookupData} from './lookup-data.interface';
-
-export interface InvoiceProcess {
- id: number;
- processCreationDatetime: Date;
- documentClassificationId: number;
- processStatus: LookupData;
- userId: string;
- filesPerProcess: FilesPerProcess[];
-}
diff --git a/app/shared/models/invoice-processes-router-params.interface.ts b/app/shared/models/invoice-processes-router-params.interface.ts
deleted file mode 100644
index 9f356cd..0000000
--- a/app/shared/models/invoice-processes-router-params.interface.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export interface InvoiceProcessesRouterParams {
- clientCode: string;
- docClassification: number;
-}
diff --git a/app/shared/models/ipower-client.interface.ts b/app/shared/models/ipower-client.interface.ts
deleted file mode 100644
index 8c58bea..0000000
--- a/app/shared/models/ipower-client.interface.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-export interface IPowerClient {
- id: string;
- name: string;
- status: string;
- clientCode: string;
- bcServer: string;
- bcPort: string;
- bcDbInstance: string;
- hotFolderId: string;
- confidenceMinLvl: number;
- confidenceMaxLvl: number;
-}
diff --git a/app/shared/models/journal-entry.interface.ts b/app/shared/models/journal-entry.interface.ts
deleted file mode 100644
index 64cd199..0000000
--- a/app/shared/models/journal-entry.interface.ts
+++ /dev/null
@@ -1,48 +0,0 @@
-import { LookupData } from './lookup-data.interface';
-
-export interface JournalEntry {
- id: number;
- recordId: number;
- journalEntriesStatus: LookupData;
- postingDate: Date;
- documentType: string;
- documentNo: string;
- accountType: string;
- accountNo: string;
- description: string;
- eu3PartyTrade: string;
- genPostingType: string;
- genBusPostingGroup: string;
- genProdPostingGroup: string;
- vatBusPostingGroup: string;
- vatProdPostingGroup: string;
- deferralCode: number;
- currencyCode: string;
- vatBaseAmount: number;
- vatAmount: number;
- amount: number;
- amountLCY: number;
- balAccountType: string;
- balAccountNo: string;
- balGenPostingType: string;
- externalDocumentNo: string;
- dmsCodeNo: string;
- correction: string;
- comment: string;
- shortcutDimension1Code: string;
- shortcutDimension2Code: string;
- shortcutDimension3Code: string;
- shortcutDimension4Code: string;
- shortcutDimension5Code: string;
- shortcutDimension6Code: string;
- shortcutDimension7Code: string;
- shortcutDimension8Code: string;
- shortcutDimension9Code: string;
- shortcutDimension10Code: string;
- applied: string;
- appliedAutomatically: string;
- appliesToDocNo: string;
- appliesToDocType: string;
- appliesToExtDocNo: string;
- appliesToId: string;
-}
diff --git a/app/shared/models/journal-verification.interface.ts b/app/shared/models/journal-verification.interface.ts
deleted file mode 100644
index 6d9998f..0000000
--- a/app/shared/models/journal-verification.interface.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export interface JournalVerification {
- id: number;
- journalVerificationsName: string;
-}
diff --git a/app/shared/models/language.interface.ts b/app/shared/models/language.interface.ts
deleted file mode 100644
index f1a22af..0000000
--- a/app/shared/models/language.interface.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export interface Language {
- code: string;
- name: string;
-}
diff --git a/app/shared/models/lookup-data.interface.ts b/app/shared/models/lookup-data.interface.ts
deleted file mode 100644
index 61aa98d..0000000
--- a/app/shared/models/lookup-data.interface.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export interface LookupData {
- id: number;
- name: string;
-}
diff --git a/app/shared/models/paging/page.interface.ts b/app/shared/models/paging/page.interface.ts
deleted file mode 100644
index 218587a..0000000
--- a/app/shared/models/paging/page.interface.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import {Pageable} from './pageable.interface';
-import {Sort} from './sort.interface';
-
-
-export interface Page {
- data: T[];
- totalPages: number;
- totalElements: number;
-
-}
diff --git a/app/shared/models/paging/pageable.interface.ts b/app/shared/models/paging/pageable.interface.ts
deleted file mode 100644
index 6c6217b..0000000
--- a/app/shared/models/paging/pageable.interface.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import {Sort} from './sort.interface';
-
-export interface Pageable {
- sort: Sort;
- offset: number;
- pageNumber: number;
- pageSize: number;
- unpaged: boolean;
- paged: boolean;
-}
diff --git a/app/shared/models/paging/sort.interface.ts b/app/shared/models/paging/sort.interface.ts
deleted file mode 100644
index 3f7b142..0000000
--- a/app/shared/models/paging/sort.interface.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-export interface Sort {
- unsorted: boolean;
- sorted: boolean;
- empty: boolean;
-}
diff --git a/app/shared/models/process-failed-record.interface.ts b/app/shared/models/process-failed-record.interface.ts
deleted file mode 100644
index dd5a7d7..0000000
--- a/app/shared/models/process-failed-record.interface.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-export interface ProcessFailedRecord {
- id: number;
- processId: number;
- recordIdentifier: string;
-}
diff --git a/app/shared/models/process-history.interface.ts b/app/shared/models/process-history.interface.ts
deleted file mode 100644
index f4fb398..0000000
--- a/app/shared/models/process-history.interface.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import {LookupData} from './lookup-data.interface';
-import {ProcessStatus} from "./process-status.interface";
-
-export interface ProcessHistory {
- id: number;
- processStatus: ProcessStatus;
- processStatusUpdate: LookupData;
- processHistoryDescription: string;
- userId: string;
-}
diff --git a/app/shared/models/process-status.interface.ts b/app/shared/models/process-status.interface.ts
deleted file mode 100644
index 49ea0c6..0000000
--- a/app/shared/models/process-status.interface.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-
-export interface ProcessStatus {
- id: number;
- name: string;
-}
diff --git a/app/shared/models/pwc-user-interface.ts b/app/shared/models/pwc-user-interface.ts
deleted file mode 100644
index c9fb481..0000000
--- a/app/shared/models/pwc-user-interface.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-export interface PwcUser {
- email?: string;
- cloudEmail?: string;
- preferredMail?: string;
- guid: string;
-}
diff --git a/app/shared/models/real-time-execution.interface.ts b/app/shared/models/real-time-execution.interface.ts
deleted file mode 100644
index 042e995..0000000
--- a/app/shared/models/real-time-execution.interface.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export interface RealTimeExecution {
- status: string;
- receivedFiles: number;
- }
\ No newline at end of file
diff --git a/app/shared/models/receivedFiles.interface.ts b/app/shared/models/receivedFiles.interface.ts
deleted file mode 100644
index b432713..0000000
--- a/app/shared/models/receivedFiles.interface.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { FILE_TYPE } from '../enums/FILE_TYPE.enum';
-import { DownloadingProcedureMetadata } from './downloading-procedure-metadata.interface';
-
-export interface ReceivedFiles {
- id: number;
- downloadingProcedureMetadata: DownloadingProcedureMetadata;
- dmsFileCode: string;
- dmsFileName: string;
- dmsFileType: FILE_TYPE;
- dmsPersonalData: boolean;
- dmsClientCode: string;
- rtaReceivedDate: Date;
- dmsInsertedDate: Date;
- rtaFolderPath: string;
- dmsDocumentNumber : string;
- rtaFileName: string;
-}
diff --git a/app/shared/models/record.interface.ts b/app/shared/models/record.interface.ts
deleted file mode 100644
index 4582f19..0000000
--- a/app/shared/models/record.interface.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import {InvoiceMasterData} from './invoice-master-data.interface';
-
-export interface Record {
- id: number;
- documentClassificationId: number;
- documentSubclassificationId: number;
- ipowerClientId: number;
- dmsFileCode: string;
- abbyyConfidenceLvl: number;
- abbyyTemplate: string;
- invoiceMasterData: InvoiceMasterData;
-}
diff --git a/app/shared/models/request/assign-update-role.interface.ts b/app/shared/models/request/assign-update-role.interface.ts
deleted file mode 100644
index 94ce904..0000000
--- a/app/shared/models/request/assign-update-role.interface.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { RtaUser } from './../rta-user.interface';
-import { Role } from '../role.interface';
-import { IPowerClient } from 'src/app/shared/models/ipower-client.interface';
-import { UserAccess } from '../user-access.interface';
-
-export interface AssignUpdateRole {
- id: number;
- ipowerClient: IPowerClient;
- role: Role;
- users: RtaUser;
-}
\ No newline at end of file
diff --git a/app/shared/models/request/search-system-exceptions.interface.ts b/app/shared/models/request/search-system-exceptions.interface.ts
deleted file mode 100644
index fc0cd84..0000000
--- a/app/shared/models/request/search-system-exceptions.interface.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { IPowerClient } from "../ipower-client.interface";
-
-export interface SearchSystemException {
- processId: number;
- jobName: string;
- dmsFileCode: string;
- dateFrom: Date;
- dateTo: Date;
- clientId: IPowerClient;
-}
diff --git a/app/shared/models/request/search-user.interface.ts b/app/shared/models/request/search-user.interface.ts
deleted file mode 100644
index cca7530..0000000
--- a/app/shared/models/request/search-user.interface.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-export interface SearchUser {
- userCode: string;
- name: string;
- surname: string;
- email: string;
- status: string;
- }
\ No newline at end of file
diff --git a/app/shared/models/response/user-autocomplete.interface.ts b/app/shared/models/response/user-autocomplete.interface.ts
deleted file mode 100644
index 590e527..0000000
--- a/app/shared/models/response/user-autocomplete.interface.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-export interface UserAutoComplete {
- id: string;
- name: string;
- surname: string;
- email: string;
- status: string;
- }
\ No newline at end of file
diff --git a/app/shared/models/right.interface.ts b/app/shared/models/right.interface.ts
deleted file mode 100644
index fdbc138..0000000
--- a/app/shared/models/right.interface.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import { RightsCategory } from './rights-category.interface';
-import { Role } from './role.interface';
-import { IPowerAssignment } from './index';
-
-export interface Right {
- id: number;
- name: string;
- code: string;
- isGlobal: boolean;
- rightsCategory: RightsCategory;
- rolesList: Role[];
- ipowerAssignment: IPowerAssignment;
-}
diff --git a/app/shared/models/rights-by-client.interface.ts b/app/shared/models/rights-by-client.interface.ts
deleted file mode 100644
index 1034726..0000000
--- a/app/shared/models/rights-by-client.interface.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import { Right } from './right.interface';
-import { IPowerClient } from './ipower-client.interface';
-
-export interface RightsByClient {
- client: IPowerClient;
- rights: Right[];
-}
diff --git a/app/shared/models/rights-category.interface.ts b/app/shared/models/rights-category.interface.ts
deleted file mode 100644
index bc331fe..0000000
--- a/app/shared/models/rights-category.interface.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-import { Right } from 'src/app/shared/models';
-export interface RightsCategory {
- id: number;
- name: string;
- rights: Right[];
-}
diff --git a/app/shared/models/role.interface.ts b/app/shared/models/role.interface.ts
deleted file mode 100644
index 7844fe4..0000000
--- a/app/shared/models/role.interface.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import { UserAccess } from './user-access.interface';
-import { Right } from './index';
-
-export interface Role {
- id: number;
- name: string;
- description: string;
- readOnly: boolean;
- status: boolean;
- canBeDeleted: boolean;
- isGlobal: boolean;
- rightsList: Right[];
- userAccessRoles: UserAccess[];
-}
diff --git a/app/shared/models/rta-user.interface.ts b/app/shared/models/rta-user.interface.ts
deleted file mode 100644
index 9bc9f8f..0000000
--- a/app/shared/models/rta-user.interface.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { UserAccess } from './user-access.interface';
-export interface RtaUser {
- id: number;
- name: string;
- surname: string;
- email: string;
- status: string;
- userCode: string;
- userAccessUsers: UserAccess[];
-}
diff --git a/app/shared/models/scheduler-criteria.interface.ts b/app/shared/models/scheduler-criteria.interface.ts
deleted file mode 100644
index 10db104..0000000
--- a/app/shared/models/scheduler-criteria.interface.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-import {LookupData} from './lookup-data.interface';
-
-export interface SchedulerCriteriaInterface {
- iPowerClientCode: string;
- status: string;
-}
diff --git a/app/shared/models/search-response.interface.ts b/app/shared/models/search-response.interface.ts
deleted file mode 100644
index 676ed56..0000000
--- a/app/shared/models/search-response.interface.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-export interface SearchResponse {
- totalPages: number;
- totalElements: number;
- data: T[];
- }
\ No newline at end of file
diff --git a/app/shared/models/sentString.interface.ts b/app/shared/models/sentString.interface.ts
deleted file mode 100644
index 6c2d05f..0000000
--- a/app/shared/models/sentString.interface.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export interface SentStringInterface {
- value: string;
-}
diff --git a/app/shared/models/status-per-document.interface.ts b/app/shared/models/status-per-document.interface.ts
deleted file mode 100644
index 102e296..0000000
--- a/app/shared/models/status-per-document.interface.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { LookupData } from './lookup-data.interface';
-import { ReceivedFiles } from './receivedFiles.interface';
-
-export interface StatusPerDocument {
- statusPerDocRecId: number;
- batchId: number;
- documentStatusLastUpdate: Date;
- documentCurrentStatusId: LookupData;
- receivedFile: ReceivedFiles;
-}
diff --git a/app/shared/models/system-exception.interface.ts b/app/shared/models/system-exception.interface.ts
deleted file mode 100644
index 0a9bf5e..0000000
--- a/app/shared/models/system-exception.interface.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-export interface SystemException {
- id: number;
- processId: number;
- clientId: string;
- jobName: string;
- dmsFileCode: string;
- message: string;
- cause: string;
- creationDatetime : Date;
- trace: string;
-}
diff --git a/app/shared/models/template.interface.ts b/app/shared/models/template.interface.ts
deleted file mode 100644
index fc9ae10..0000000
--- a/app/shared/models/template.interface.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { IPowerClient } from './ipower-client.interface';
-import { Category } from './category.interface';
-import { DocumentClassification } from './document-classification.interface';
-export interface Template {
- id: number;
-
- // The 'category' field in Template objects comes from a different backend DTO than the pure Category model,
- // and thus does NOT have a DocumentClassification field. Use the documentClassification field below.
- category: Category;
-
- subCategoryCode: string;
- abbyyTemplate: string;
- client: IPowerClient;
- documentClassification: DocumentClassification;
-}
diff --git a/app/shared/models/user-access.interface.ts b/app/shared/models/user-access.interface.ts
deleted file mode 100644
index bc17698..0000000
--- a/app/shared/models/user-access.interface.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import { RtaUser } from './rta-user.interface';
-import { Role } from './role.interface';
-import { IPowerClient } from 'src/app/shared/models/ipower-client.interface';
-import { USER_ACCESS_STATUS } from '../enums/USER_ACCESS_STATUS.enum';
-
-export interface UserAccess {
- id: number;
- ipowerClient: IPowerClient;
- role: Role;
- users: RtaUser;
- status: USER_ACCESS_STATUS;
-}
diff --git a/app/shared/models/verification-rule.interface.ts b/app/shared/models/verification-rule.interface.ts
deleted file mode 100644
index b08f65d..0000000
--- a/app/shared/models/verification-rule.interface.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { Template } from './template.interface';
-import { DocumentClassification } from './document-classification.interface';
-import { IPowerClient } from './ipower-client.interface';
-import { CapturingVerification } from './capturing-verification.interface';
-import { JournalVerification } from './journal-verification.interface';
-
-export interface VerificationRule {
- id: number;
- confidenceLevelMinThreshold: number;
- alteryxRoutineId: string;
- verificationRuleStatus: string;
- client: IPowerClient;
- docClassificationCategory: DocumentClassification
- template: Template;
- capturingVerification: CapturingVerification;
- journalVerification: JournalVerification;
-}
diff --git a/app/shared/models/vertical-menu.interface.ts b/app/shared/models/vertical-menu.interface.ts
deleted file mode 100644
index 1d2fc51..0000000
--- a/app/shared/models/vertical-menu.interface.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-import { MenuItem } from 'primeng/api';
-
-export interface VerticalMenu {
- title: string;
- items: MenuItem[];
-}
diff --git a/app/shared/pipes/hour-minutes-secs.pipe.spec.ts b/app/shared/pipes/hour-minutes-secs.pipe.spec.ts
deleted file mode 100644
index f04f84a..0000000
--- a/app/shared/pipes/hour-minutes-secs.pipe.spec.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import { HourMinutesSecsPipe } from './hour-minutes-secs.pipe';
-
-describe('HourMinutesSecsPipe', () => {
- it('create an instance', () => {
- const pipe = new HourMinutesSecsPipe();
- expect(pipe).toBeTruthy();
- });
-});
diff --git a/app/shared/pipes/hour-minutes-secs.pipe.ts b/app/shared/pipes/hour-minutes-secs.pipe.ts
deleted file mode 100644
index 952230e..0000000
--- a/app/shared/pipes/hour-minutes-secs.pipe.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import { Pipe, PipeTransform } from '@angular/core';
-
-@Pipe({
- name: 'hourMinutesSecs'
-})
-export class HourMinutesSecsPipe implements PipeTransform {
-
- transform(totalSeconds: number, ...args: unknown[]): unknown {
- const hours = Math.floor(totalSeconds / 3600);
- const minutes = Math.floor((totalSeconds % 3600) / 60);
- const seconds = totalSeconds % 60;
- let result = `${minutes
- .toString()
- .padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`;
- if (!!hours) {
- result = `${hours.toString().padStart(2, '0')}:${minutes
- .toString()
- .padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`;
- }
- return result;
- }
-
-}
diff --git a/app/shared/primeng-shared/primeng-shared.module.ts b/app/shared/primeng-shared/primeng-shared.module.ts
deleted file mode 100644
index 0cfbe91..0000000
--- a/app/shared/primeng-shared/primeng-shared.module.ts
+++ /dev/null
@@ -1,91 +0,0 @@
-import { DynamicDialogModule } from 'primeng/dynamicdialog';
-import { DialogModule } from 'primeng/dialog';
-import { InputTextModule } from 'primeng/inputtext';
-import { ProgressSpinnerModule } from 'primeng/progressspinner';
-import { NgModule } from '@angular/core';
-import { CommonModule } from '@angular/common';
-import { CardModule } from 'primeng/card';
-import { FieldsetModule } from 'primeng/fieldset';
-import { TableModule } from 'primeng/table';
-import { ButtonModule } from 'primeng/button';
-import { AccordionModule } from 'primeng/accordion';
-import { SelectButtonModule } from 'primeng/selectbutton';
-import { ConfirmDialogModule } from 'primeng/confirmdialog';
-import { CheckboxModule } from 'primeng/checkbox';
-import { InputSwitchModule } from 'primeng/inputswitch';
-import { DropdownModule } from 'primeng/dropdown';
-import { MultiSelectModule } from 'primeng/multiselect';
-import { AutoCompleteModule } from 'primeng/autocomplete';
-import { NgxDocViewerModule } from 'ngx-doc-viewer';
-import { CalendarModule } from 'primeng/calendar';
-import { TooltipModule } from 'primeng/tooltip';
-import { ToolbarModule } from 'primeng/toolbar';
-import { MenubarModule } from 'primeng/menubar';
-import { MenuModule } from 'primeng/menu';
-import { BreadcrumbModule } from 'primeng/breadcrumb';
-import { RadioButtonModule } from 'primeng/radiobutton';
-import { ChartModule } from 'primeng/chart';
-
-@NgModule({
- declarations: [],
- imports: [
- CommonModule,
- CardModule,
- TableModule,
- FieldsetModule,
- ButtonModule,
- AccordionModule,
- InputTextModule,
- ProgressSpinnerModule,
- SelectButtonModule,
- InputTextModule,
- ConfirmDialogModule,
- CheckboxModule,
- InputSwitchModule,
- DialogModule,
- DropdownModule,
- MultiSelectModule,
- AutoCompleteModule,
- DynamicDialogModule,
- CalendarModule,
- TooltipModule,
- NgxDocViewerModule,
- ToolbarModule,
- MenuModule,
- MenubarModule,
- MenuModule,
- BreadcrumbModule,
- RadioButtonModule,
- ChartModule
- ],
- exports: [
- CardModule,
- TableModule,
- FieldsetModule,
- ButtonModule,
- AccordionModule,
- InputTextModule,
- ProgressSpinnerModule,
- SelectButtonModule,
- InputTextModule,
- ConfirmDialogModule,
- CheckboxModule,
- InputSwitchModule,
- DialogModule,
- DropdownModule,
- MultiSelectModule,
- AutoCompleteModule,
- DynamicDialogModule,
- CalendarModule,
- TooltipModule,
- NgxDocViewerModule,
- ToolbarModule,
- MenuModule,
- MenubarModule,
- MenuModule,
- BreadcrumbModule,
- RadioButtonModule,
- ChartModule
- ]
-})
-export class PrimengSharedModule { }
diff --git a/app/shared/services/administration/application-level-exception.service.ts b/app/shared/services/administration/application-level-exception.service.ts
deleted file mode 100644
index fd703e9..0000000
--- a/app/shared/services/administration/application-level-exception.service.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { HttpClient } from "@angular/common/http";
-import { Injectable } from "@angular/core";
-import { environment } from "src/environments/environment";
-import { SystemException } from "../../models/system-exception.interface";
-import { GenericRestService } from "../generic-rest.service";
-
-@Injectable({
- providedIn: 'root'
-})
-export class ApplicationLevelExceptionService extends GenericRestService {
-
- constructor(private http: HttpClient) {
- super(`${environment.baseApiUrl}${environment.apiUrl.documentsProcessesWs}/exceptions`, http);
- }
-
-}
diff --git a/app/shared/services/administration/application-level-exception.spec.ts b/app/shared/services/administration/application-level-exception.spec.ts
deleted file mode 100644
index 45a8520..0000000
--- a/app/shared/services/administration/application-level-exception.spec.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { TestBed } from '@angular/core/testing';
-import { ApplicationLevelExceptionService } from './application-level-exception.service';
-
-
-describe('ApplicationLevelExceptionService', () => {
- let service: ApplicationLevelExceptionService;
-
- beforeEach(() => {
- TestBed.configureTestingModule({});
- service = TestBed.inject(ApplicationLevelExceptionService);
- });
-
- it('should be created', () => {
- expect(service).toBeTruthy();
- });
-});
diff --git a/app/shared/services/administration/capturing-verifications.service.spec.ts b/app/shared/services/administration/capturing-verifications.service.spec.ts
deleted file mode 100644
index e37c47c..0000000
--- a/app/shared/services/administration/capturing-verifications.service.spec.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { TestBed } from '@angular/core/testing';
-
-import { CapturingVerificationsService } from './capturing-verifications.service';
-
-describe('CapturingVerificationsService', () => {
- let service: CapturingVerificationsService;
-
- beforeEach(() => {
- TestBed.configureTestingModule({});
- service = TestBed.inject(CapturingVerificationsService);
- });
-
- it('should be created', () => {
- expect(service).toBeTruthy();
- });
-});
diff --git a/app/shared/services/administration/capturing-verifications.service.ts b/app/shared/services/administration/capturing-verifications.service.ts
deleted file mode 100644
index 186bf10..0000000
--- a/app/shared/services/administration/capturing-verifications.service.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import { environment } from 'src/environments/environment';
-import { CapturingVerification } from './../../models/capturing-verification.interface';
-import { HttpClient } from '@angular/common/http';
-import { Injectable } from '@angular/core';
-import { Observable } from 'rxjs';
-
-@Injectable({
- providedIn: 'root'
-})
-export class CapturingVerificationsService {
-
- baseUrl: string;
-
- constructor(private http: HttpClient) {
- this.baseUrl = `${environment.baseApiUrl}${environment.apiUrl.verificationRulesWs}/verifications/capturingVerifications`;
- }
-
- getCapturingVerifications(): Observable {
- return this.http.get(this.baseUrl);
- }
-}
diff --git a/app/shared/services/administration/categories.service.spec.ts b/app/shared/services/administration/categories.service.spec.ts
deleted file mode 100644
index 1163088..0000000
--- a/app/shared/services/administration/categories.service.spec.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { TestBed } from '@angular/core/testing';
-
-import { CategoriesService } from './categories.service';
-
-describe('CategoriesService', () => {
- let service: CategoriesService;
-
- beforeEach(() => {
- TestBed.configureTestingModule({});
- service = TestBed.inject(CategoriesService);
- });
-
- it('should be created', () => {
- expect(service).toBeTruthy();
- });
-});
diff --git a/app/shared/services/administration/categories.service.ts b/app/shared/services/administration/categories.service.ts
deleted file mode 100644
index 6a61061..0000000
--- a/app/shared/services/administration/categories.service.ts
+++ /dev/null
@@ -1,60 +0,0 @@
-import { environment } from 'src/environments/environment';
-import { Category } from './../../models/category.interface';
-import { GenericRestService } from './../generic-rest.service';
-import { Injectable } from '@angular/core';
-import { HttpClient } from '@angular/common/http';
-import { Observable } from 'rxjs';
-
-@Injectable({
- providedIn: 'root'
-})
-export class CategoriesService extends GenericRestService {
-
- constructor(private http: HttpClient) {
- super(`${environment.baseApiUrl}${environment.apiUrl.verificationRulesWs}/categories`, http); // TODO: Change this when GenericRestService<> changes.
- }
-
- public autosuggestCategoryName(name: string, classificationId: number = null): Observable {
- return this.http.get(this.baseUrl + '/autocomplete/categoryByNameAndDocClassification', {
- params: {
- name: name,
- classificationId: (classificationId ? classificationId.toString() : '')
- }
- });
- }
-
- public autosuggestCategoryCode(code: string, classificationId: number = null): Observable {
- return this.http.get(this.baseUrl + '/autocomplete/categoryByCodeAndDocClassification', {
- params: {
- code: code,
- classificationId: (classificationId ? classificationId.toString() : '')
- }
- });
- }
-
- public createNewCategory(category: Category) {
-
- // Create the model required by the backend ('CreateCategoryRequestModel') before using the generic create method.
- let createCategoryRequestModel = {
- id: null,
- docClassificationId: category.documentClassification.classificationId,
- categoryName: category.categoryName,
- categoryCode: category.categoryCode
- }
-
- return super.create(createCategoryRequestModel);
- }
-
- public updateCategory(category: Category) {
-
- // Create the model required by the backend ('CreateCategoryRequestModel') before using the generic create method.
- let updateCategoryRequestModel = {
- id: category.id,
- docClassificationId: category.documentClassification.classificationId,
- categoryName: category.categoryName,
- categoryCode: category.categoryCode
- }
-
- return super.update(updateCategoryRequestModel);
- }
-}
diff --git a/app/shared/services/administration/configurator.service.spec.ts b/app/shared/services/administration/configurator.service.spec.ts
deleted file mode 100644
index 8d11d96..0000000
--- a/app/shared/services/administration/configurator.service.spec.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { TestBed } from '@angular/core/testing';
-
-import { ConfiguratorService } from './configurator.service';
-
-describe('ConfiguratorService', () => {
- let service: ConfiguratorService;
-
- beforeEach(() => {
- TestBed.configureTestingModule({});
- service = TestBed.inject(ConfiguratorService);
- });
-
- it('should be created', () => {
- expect(service).toBeTruthy();
- });
-});
diff --git a/app/shared/services/administration/configurator.service.ts b/app/shared/services/administration/configurator.service.ts
deleted file mode 100644
index 8d8693c..0000000
--- a/app/shared/services/administration/configurator.service.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-import { Injectable } from '@angular/core';
-import {HttpClient} from '@angular/common/http';
-import {environment} from '../../../../environments/environment';
-import {Observable} from 'rxjs';
-import {ConfiguratorParameter} from '../../models/configurator-parameter.interface';
-import {GenericRestService} from '../generic-rest.service';
-
-@Injectable({
- providedIn: 'root'
-})
-export class ConfiguratorService extends GenericRestService {
-
- constructor(private http: HttpClient) {
- super(`${environment.baseApiUrl}${environment.apiUrl.configurationWs}/platform-configurations`, http);
- }
-
- getConfiguratorParameters(): Observable {
- return this.http.get(this.baseUrl + `/all`);
- }
-
- public updateConfiguratorParameter(parameter: ConfiguratorParameter) {
-
- // Create the model required by the backend ('CreateCategoryRequestModel') before using the generic create method.
- const updateParameterRequestModel = {
- configurationId: parameter.configurationId,
- configurationVariable: parameter.configurationVariable,
- variableType: parameter.variableType,
- integerValue: parameter.integerValue,
- stringValue: parameter.stringValue
- };
-
- // return super.update(updateParameterRequestModel);
- return this.http.put(`${this.baseUrl}/` + parameter.configurationId, updateParameterRequestModel);
- }
-}
diff --git a/app/shared/services/administration/document-classifications.service.spec.ts b/app/shared/services/administration/document-classifications.service.spec.ts
deleted file mode 100644
index c5fec67..0000000
--- a/app/shared/services/administration/document-classifications.service.spec.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { TestBed } from '@angular/core/testing';
-
-import { DocumentClassificationsService } from './document-classifications.service';
-
-describe('DocumentClassificationsService', () => {
- let service: DocumentClassificationsService;
-
- beforeEach(() => {
- TestBed.configureTestingModule({});
- service = TestBed.inject(DocumentClassificationsService);
- });
-
- it('should be created', () => {
- expect(service).toBeTruthy();
- });
-});
diff --git a/app/shared/services/administration/document-classifications.service.ts b/app/shared/services/administration/document-classifications.service.ts
deleted file mode 100644
index 012a555..0000000
--- a/app/shared/services/administration/document-classifications.service.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { environment } from 'src/environments/environment';
-import { HttpClient } from '@angular/common/http';
-import { Injectable } from '@angular/core';
-import { DocumentClassification } from '../../models/document-classification.interface';
-import { GenericRestService } from '../generic-rest.service';
-
-@Injectable({
- providedIn: 'root'
-})
-export class DocumentClassificationsService extends GenericRestService {
-
- constructor(private http: HttpClient) {
- super(`${environment.baseApiUrl}${environment.apiUrl.configurationWs}/documents-classifications`, http); // TODO: Change this when GenericRestService<> changes.
- }
-}
diff --git a/app/shared/services/administration/document-subclassifications.service.spec.ts b/app/shared/services/administration/document-subclassifications.service.spec.ts
deleted file mode 100644
index 94df12d..0000000
--- a/app/shared/services/administration/document-subclassifications.service.spec.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { TestBed } from '@angular/core/testing';
-
-import { DocumentSubclassificationsService } from './document-subclassifications.service';
-
-describe('DocumentSubclassificationsService', () => {
- let service: DocumentSubclassificationsService;
-
- beforeEach(() => {
- TestBed.configureTestingModule({});
- service = TestBed.inject(DocumentSubclassificationsService);
- });
-
- it('should be created', () => {
- expect(service).toBeTruthy();
- });
-});
diff --git a/app/shared/services/administration/document-subclassifications.service.ts b/app/shared/services/administration/document-subclassifications.service.ts
deleted file mode 100644
index 6424a5b..0000000
--- a/app/shared/services/administration/document-subclassifications.service.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { environment } from 'src/environments/environment';
-import { Observable } from 'rxjs';
-import { HttpClient } from '@angular/common/http';
-import { Injectable } from '@angular/core';
-import { DocumentSubclassification } from '../../models/document-subclassification.interface';
-import { GenericRestService } from '../generic-rest.service';
-
-@Injectable({
- providedIn: 'root'
-})
-export class DocumentSubclassificationsService extends GenericRestService {
-
- constructor(private http: HttpClient) {
- super(`${environment.baseApiUrl}${environment.apiUrl.configurationWs}/documents-subclassifications`, http); // TODO: Change this when GenericRestService<> changes.
- }
-
- public getByDocumentClassificationId(docClassificationId: number): Observable {
- return this.http.get(this.baseUrl + '/categories/' + docClassificationId);
- }
-}
diff --git a/app/shared/services/administration/ipower-clients.service.spec.ts b/app/shared/services/administration/ipower-clients.service.spec.ts
deleted file mode 100644
index 8e003ff..0000000
--- a/app/shared/services/administration/ipower-clients.service.spec.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { TestBed } from '@angular/core/testing';
-
-import { IpowerClientsService } from './ipower-clients.service';
-
-describe('IpowerClientsService', () => {
- let service: IpowerClientsService;
-
- beforeEach(() => {
- TestBed.configureTestingModule({});
- service = TestBed.inject(IpowerClientsService);
- });
-
- it('should be created', () => {
- expect(service).toBeTruthy();
- });
-});
diff --git a/app/shared/services/administration/ipower-clients.service.ts b/app/shared/services/administration/ipower-clients.service.ts
deleted file mode 100644
index 4742e04..0000000
--- a/app/shared/services/administration/ipower-clients.service.ts
+++ /dev/null
@@ -1,68 +0,0 @@
-import { GenericRestService } from './../generic-rest.service';
-import { AuthService } from './../auth.service';
-import { environment } from 'src/environments/environment';
-import { HttpClient } from '@angular/common/http';
-import { IPowerClient } from './../../models/ipower-client.interface';
-import { Injectable } from '@angular/core';
-import { Observable } from 'rxjs';
-
-@Injectable({
- providedIn: 'root'
-})
-export class IpowerClientsService extends GenericRestService {
-
- constructor(private http: HttpClient, private authService: AuthService) {
- super(`${environment.baseApiUrl}${environment.apiUrl.usersWs}/users`, http);
- }
-
- public getClientsByUser(): Observable {
- return this.http.get(this.baseUrl + '/clientsByUser', {
- params: {
- userId: '' + this.authService.userDetails.id
- }
- });
- }
-
- public getClientsByNameDistinct(name: string): Observable {
- return this.http.get(this.baseUrl + '/clientsByName', {
- params: {
- name: name,
- userId: '' + this.authService.userDetails.id
- }
- });
- }
-
- public getClientsByNameOnly(name: string): Observable {
- return this.http.get(this.baseUrl + '/clientsByNameOnly', {
- params: {
- name: name
- }
- });
- }
-
- public getClientsByCodeDistinct(code: string): Observable {
- return this.http.get(this.baseUrl + '/clientsByCode', {
- params: {
- code: code,
- userId: '' + /*'CY136279'*/ this.authService.userDetails.id
- }
- });
- }
-
- public getClientsByCodeOnly(code: string): Observable {
- return this.http.get(this.baseUrl + '/clientsByCodeOnly', {
- params: {
- code: code
- }
- });
- }
-
- public getClientById(id: number): Observable {
- return this.http.get(this.baseUrl + '/clientById', {
- params: {
- id: '' + id,
- userId: '' + this.authService.userDetails.id
- }
- });
- }
-}
diff --git a/app/shared/services/administration/journal-verifications.service.spec.ts b/app/shared/services/administration/journal-verifications.service.spec.ts
deleted file mode 100644
index d5ad6ba..0000000
--- a/app/shared/services/administration/journal-verifications.service.spec.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { TestBed } from '@angular/core/testing';
-
-import { JournalVerificationsService } from './journal-verifications.service';
-
-describe('JournalVerificationsService', () => {
- let service: JournalVerificationsService;
-
- beforeEach(() => {
- TestBed.configureTestingModule({});
- service = TestBed.inject(JournalVerificationsService);
- });
-
- it('should be created', () => {
- expect(service).toBeTruthy();
- });
-});
diff --git a/app/shared/services/administration/journal-verifications.service.ts b/app/shared/services/administration/journal-verifications.service.ts
deleted file mode 100644
index 29da722..0000000
--- a/app/shared/services/administration/journal-verifications.service.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import { environment } from 'src/environments/environment';
-import { Observable } from 'rxjs';
-import { HttpClient } from '@angular/common/http';
-import { Injectable } from '@angular/core';
-import { JournalVerification } from '../../models/journal-verification.interface';
-
-@Injectable({
- providedIn: 'root'
-})
-export class JournalVerificationsService {
-
- baseUrl: string;
-
- constructor(private http: HttpClient) {
- this.baseUrl = `${environment.baseApiUrl}${environment.apiUrl.verificationRulesWs}/verifications/journalVerifications`;
- }
-
- getJournalVerifications(): Observable {
- return this.http.get(this.baseUrl);
- }
-}
diff --git a/app/shared/services/administration/templates.service.spec.ts b/app/shared/services/administration/templates.service.spec.ts
deleted file mode 100644
index d313126..0000000
--- a/app/shared/services/administration/templates.service.spec.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { TestBed } from '@angular/core/testing';
-
-import { TemplatesService } from './templates.service';
-
-describe('TemplatesService', () => {
- let service: TemplatesService;
-
- beforeEach(() => {
- TestBed.configureTestingModule({});
- service = TestBed.inject(TemplatesService);
- });
-
- it('should be created', () => {
- expect(service).toBeTruthy();
- });
-});
diff --git a/app/shared/services/administration/templates.service.ts b/app/shared/services/administration/templates.service.ts
deleted file mode 100644
index 48635a6..0000000
--- a/app/shared/services/administration/templates.service.ts
+++ /dev/null
@@ -1,53 +0,0 @@
-import { environment } from 'src/environments/environment';
-import { Category } from './../../models/category.interface';
-import { IPowerClient } from './../../models/ipower-client.interface';
-import { Observable } from 'rxjs';
-import { GenericRestService } from './../generic-rest.service';
-import { Injectable } from '@angular/core';
-import { Template } from '../../models/template.interface';
-import { HttpClient } from '@angular/common/http';
-
-@Injectable({
- providedIn: 'root'
-})
-export class TemplatesService extends GenericRestService {
-
- constructor(private http: HttpClient) {
- super(`${environment.baseApiUrl}${environment.apiUrl.verificationRulesWs}/templates`, http); // TODO: Change this when GenericRestService<> changes.
- }
-
- public createNewTemplate(template: Template): Observable {
- // Create the model required by the backend ('CreateTemplateRequestModel') before using the generic create method.
- let createCategoryRequestModel = {
- id: null,
- category: template.category,
- subCategoryCode: template.subCategoryCode,
- abbyyTemplate: template.abbyyTemplate,
- clientId: template.client.id,
-
- // Just to comply to the required Template interface.
- documentClassification: null,
- client: null
- }
-
- return super.create(createCategoryRequestModel);
- }
-
- public updateTemplate(template: Template): Observable {
-
- // Create the model required by the backend ('CreateTemplateRequestModel') before using the generic create method.
- let updateCategoryRequestModel = {
- id: template.id,
- category: template.category,
- subCategoryCode: template.subCategoryCode,
- abbyyTemplate: template.abbyyTemplate,
- clientId: template.client.id,
-
- // Just to comply to the required Template interface.
- documentClassification: null,
- client: null
- }
-
- return super.update(updateCategoryRequestModel);
- }
-}
diff --git a/app/shared/services/administration/verification-rules.service.spec.ts b/app/shared/services/administration/verification-rules.service.spec.ts
deleted file mode 100644
index c949921..0000000
--- a/app/shared/services/administration/verification-rules.service.spec.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { TestBed } from '@angular/core/testing';
-
-import { VerificationRulesService } from './verification-rules.service';
-
-describe('VerificationRulesServiceService', () => {
- let service: VerificationRulesService;
-
- beforeEach(() => {
- TestBed.configureTestingModule({});
- service = TestBed.inject(VerificationRulesService);
- });
-
- it('should be created', () => {
- expect(service).toBeTruthy();
- });
-});
diff --git a/app/shared/services/administration/verification-rules.service.ts b/app/shared/services/administration/verification-rules.service.ts
deleted file mode 100644
index 950b45f..0000000
--- a/app/shared/services/administration/verification-rules.service.ts
+++ /dev/null
@@ -1,64 +0,0 @@
-import { environment } from 'src/environments/environment';
-import { CreateVerificationRuleFormValue } from './../../../features/administration/forms/verification-rule-form/create-verification-rule-form-value.interface';
-import { VerificationRule } from './../../models/verification-rule.interface';
-import { GenericRestService } from '../generic-rest.service';
-import { HttpClient } from '@angular/common/http';
-import { Injectable } from '@angular/core';
-import { Observable } from 'rxjs';
-import { CapturingVerification } from '../../models/capturing-verification.interface';
-import { JournalVerification } from '../../models/journal-verification.interface';
-
-@Injectable({
- providedIn: 'root'
-})
-export class VerificationRulesService extends GenericRestService {
-
- constructor(private http: HttpClient) {
- super(`${environment.baseApiUrl}${environment.apiUrl.verificationRulesWs}/verifications`, http); // TODO: Change this when GenericRestService<> changes.
- }
-
- public createNewVerificationRule(verificationRuleFormValue: CreateVerificationRuleFormValue): Observable {
-
- // Create the model required by the backend ('CreateRuleRequestModel') before using the generic create method.
- let updateCategoryRequestModel = {
- id: null,
- confidenceLevelMinThreshold: verificationRuleFormValue.confidenceLevelMinThreshold,
- alteryxRoutineId: verificationRuleFormValue.alteryxRoutineId,
- clientId: verificationRuleFormValue.clientId,
- categoryId: verificationRuleFormValue.categoryId,
- verificationRuleStatus: verificationRuleFormValue.verificationRuleStatus,
- subCategoryCode: verificationRuleFormValue.subCategoryCode,
- capturingVerification: verificationRuleFormValue.capturingVerification,
- journalVerification: verificationRuleFormValue.journalVerification
- }
-
- return super.create(updateCategoryRequestModel);
- }
-
- public updateVerificationRule(verificationRuleFormValue: CreateVerificationRuleFormValue): Observable {
-
- // Create the model required by the backend ('CreateRuleRequestModel') before using the generic create method.
- let updateCategoryRequestModel = {
- id: verificationRuleFormValue.id,
- confidenceLevelMinThreshold: verificationRuleFormValue.confidenceLevelMinThreshold,
- alteryxRoutineId: verificationRuleFormValue.alteryxRoutineId,
- clientId: verificationRuleFormValue.clientId,
- categoryId: verificationRuleFormValue.categoryId,
- verificationRuleStatus: verificationRuleFormValue.verificationRuleStatus,
- subCategoryCode: verificationRuleFormValue.subCategoryCode,
- capturingVerification: verificationRuleFormValue.capturingVerification,
- journalVerification: verificationRuleFormValue.journalVerification,
- template: verificationRuleFormValue.template
- }
-
- return super.update(updateCategoryRequestModel);
- }
-
- public getCapturingVerifications(): Observable {
- return this.http.get(this.baseUrl + '/capturingVerifications');
- }
-
- public getJournalVerifications(): Observable {
- return this.http.get(this.baseUrl + '/journalVerifications');
- }
-}
diff --git a/app/shared/services/api.service.spec.ts b/app/shared/services/api.service.spec.ts
deleted file mode 100644
index abbafae..0000000
--- a/app/shared/services/api.service.spec.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { TestBed } from '@angular/core/testing';
-
-import { ApiService } from './api.service';
-
-describe('ApiService', () => {
- let service: ApiService;
-
- beforeEach(() => {
- TestBed.configureTestingModule({});
- service = TestBed.inject(ApiService);
- });
-
- it('should be created', () => {
- expect(service).toBeTruthy();
- });
-});
diff --git a/app/shared/services/api.service.ts b/app/shared/services/api.service.ts
deleted file mode 100644
index 8f336ba..0000000
--- a/app/shared/services/api.service.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-import { RtaUser } from './../models/rta-user.interface';
-import { Injectable } from '@angular/core';
-import { Observable, of } from 'rxjs';
-import { HttpClient } from '@angular/common/http';
-import { environment } from 'src/environments/environment';
-import { USER_ACCESS_STATUS } from '../enums/USER_ACCESS_STATUS.enum';
-
-
-@Injectable({
- providedIn: 'root'
-})
-export class ApiService {
-
- constructor(private http: HttpClient) { }
-
- private apiUrl = `${environment.baseApiUrl}${environment.apiUrl.usersWs}`;
-
- getUserByEmail(email: string, userAccessesStatus: USER_ACCESS_STATUS = null): Observable {
- const url = `${this.apiUrl}/users/userByEmail`;
-
- // Include the 'userAccessesStatus' query-param ONLY if it was provided.
- let myParams;
- if (userAccessesStatus != null) {
- myParams = {
- email: email,
- userAccessesStatus: userAccessesStatus
- }
- } else {
- myParams = {
- email: email
- }
- }
-
- return this.http.get(url, { params: myParams });
- }
-}
diff --git a/app/shared/services/auth.service.spec.ts b/app/shared/services/auth.service.spec.ts
deleted file mode 100644
index a761949..0000000
--- a/app/shared/services/auth.service.spec.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { TestBed } from '@angular/core/testing';
-
-import { AuthService } from './auth.service';
-
-describe('AuthService', () => {
- let service: AuthService;
-
- beforeEach(() => {
- TestBed.configureTestingModule({});
- service = TestBed.inject(AuthService);
- });
-
- it('should be created', () => {
- expect(service).toBeTruthy();
- });
-});
diff --git a/app/shared/services/auth.service.ts b/app/shared/services/auth.service.ts
deleted file mode 100644
index 76f7af4..0000000
--- a/app/shared/services/auth.service.ts
+++ /dev/null
@@ -1,189 +0,0 @@
-import { USER_RIGHTS } from './../enums/USER_RIGHTS.enum';
-import { IPowerClient } from './../models/ipower-client.interface';
-import { RightsByClient } from './../models/rights-by-client.interface';
-import { RtaUser } from './../models/rta-user.interface';
-import { environment } from 'src/environments/environment';
-import { ApiService } from './api.service';
-import { PwcUser } from './../models/pwc-user-interface';
-import { authCodeFlowConfig } from '../auth-codeflow-config';
-import { OAuthService } from 'angular-oauth2-oidc';
-import { EventEmitter, Injectable, Output } from '@angular/core';
-import { Router } from '@angular/router';
-import { BehaviorSubject, ReplaySubject, Observable, combineLatest, from, interval } from 'rxjs';
-import { catchError, filter, map, mergeMap } from 'rxjs/operators';
-import { Right } from '../models';
-import { UserAccess } from '../models/user-access.interface';
-import { USER_ACCESS_STATUS } from '../enums/USER_ACCESS_STATUS.enum';
-
-@Injectable({
- providedIn: 'root'
-})
-export class AuthService {
-
- @Output() authStatusChanged = new EventEmitter();
-
- private isAuthenticatedSubject$ = new BehaviorSubject(false);
- public isAuthenticated$ = this.isAuthenticatedSubject$.asObservable();
-
- private isDoneLoadingSubject$ = new ReplaySubject();
- public isDoneLoading$ = this.isDoneLoadingSubject$.asObservable();
-
- public tokenExpiresInSec$ = new BehaviorSubject(0);
-
- private loggedInUserDetails: RtaUser;
- private loggedInUserRights: RightsByClient[] = [];
-
- /**
- * Publishes "true" only if all the asynchronous initial login calls have completed and the user ended up being authenticated.
- * Essentially, it combines:
- * - the latest known status of the user (whether they are authorized)
- * - whether all the oauth2 shenanigan calls have been completed :P
- */
- public canActivateProtectedRoutes$: Observable = combineLatest([
- this.isAuthenticated$,
- this.isDoneLoading$
- ]).pipe(
- map(values => values.every(b => b))
- );
-
- constructor(private router: Router, private oauthService: OAuthService, private api: ApiService) {
-
- this.oauthService.events
- .subscribe(_ => {
- this.isAuthenticatedSubject$.next(this.oauthService.hasValidAccessToken());
- });
-
- this.oauthService.events
- .pipe(filter(e => ['token_received'].includes(e.type)))
- .subscribe(e => this.oauthService.loadUserProfile());
-
- this.oauthService.events
- .pipe(filter(e => ['session_terminated', 'session_error'].includes(e.type)))
- .subscribe(e => this.navigateToLoginPage());
- }
-
- private navigateToLoginPage(): void {
- this.router.navigateByUrl('/login');
- }
-
- public initializeOAuth2Login(): void {
- this.oauthService.configure(authCodeFlowConfig);
-
- from(this.oauthService.loadDiscoveryDocument())
- .pipe(
- mergeMap((successEvent) => {
- console.log('successEvent', successEvent);
- return from(this.oauthService.tryLoginImplicitFlow());
- }),
- // @TODO: Handle errors
- catchError((err) => {
- return err;
- })
- ).subscribe(() => {
- if (!this.oauthService.hasValidAccessToken()) {
- if (environment.oAuth2.autoLogin) {
- this.oauthService.initImplicitFlow();
- }
- else {
- this.authStatusChanged.emit(false);
- }
- } else {
- // Succesfully authenticated :)
- this.authStatusChanged.emit(true);
- this.getUserDetails();
- }
- });
- }
-
- public getUserDetails(): void {
- const email = environment.staging || environment.production ?
- (this.oauthService.getIdentityClaims() as PwcUser).cloudEmail :
- (this.oauthService.getIdentityClaims() as PwcUser).email;
-
- // Request only the ACTIVE UserAccess relations of the user.
- this.api.getUserByEmail(email, USER_ACCESS_STATUS.ACTIVE).subscribe((result) => {
- this.loggedInUserDetails = result;
-
- // Process the received user data and assign a proper value to 'this.loggedInUserRights'.
- this.assignLoggedInUserRights(result);
-
- this.isDoneLoadingSubject$.next(true);
-
- this.startTokenExpirationCounter();
-
- console.log('Logged-in User\'s Rights', this.userRights);
- },
- err => {
- // @TODO: Handle errors
- console.log(err);
- this.isDoneLoadingSubject$.next(true);
- });
- }
-
- private assignLoggedInUserRights(user: RtaUser) {
-
- // ClientId to RightsByClient.
- let rightsPerClientMap: Map = new Map();
-
- user.userAccessUsers.forEach(ua => {
-
- // If we don't have an entry for this client, create it. Initialise it with the client, but no rights.
- if (!rightsPerClientMap.has(ua.ipowerClient.id)) {
- let newEntry: RightsByClient = {
- client: ua.ipowerClient,
- rights: []
- }
- rightsPerClientMap.set(ua.ipowerClient.id, newEntry);
- }
-
- // Now, regardless of whether the entry existed or not, add the rights. -Map does not
- rightsPerClientMap.get(ua.ipowerClient.id).rights = rightsPerClientMap.get(ua.ipowerClient.id).rights.concat(ua.role.rightsList);
- });
-
- // Finally, pass them all unto the 'loggedInUserRights' variable.
- this.loggedInUserRights = [];
- rightsPerClientMap.forEach((value, key) => this.loggedInUserRights.push(value));
- }
-
- // This is mostly useful if "autoLogin" is false in environment, so we manually trigger the final step of the OAuth2 login flow.
- login(targetUrl?: string): void {
- this.oauthService.initLoginFlow(targetUrl || this.router.url);
- }
-
- logout(): void {
- this.loggedInUserDetails = null;
- this.loggedInUserRights = null;
- this.oauthService.logOut(true);
-
- this.authStatusChanged.emit(false);
- this.router.navigateByUrl('/login');
- }
-
- isLoggedIn(): boolean {
- return this.oauthService.hasValidAccessToken();
- }
-
- startTokenExpirationCounter(): void {
- const expiringAt = this.oauthService.getAccessTokenExpiration() ? this.oauthService.getAccessTokenExpiration() : Date.now();
- const now = Date.now();
-
- let remainingSecs = Math.floor(expiringAt / 1000) - Math.floor(now / 1000);
- const secondsCounter = interval(1000);
- // Subscribe to begin publishing values
- const subscription = secondsCounter.subscribe(n => {
- remainingSecs = remainingSecs > 0 ? remainingSecs - 1 : remainingSecs;
- this.tokenExpiresInSec$.next(remainingSecs);
- });
-
- }
-
- /*
- * Public Methods
- */
- public get userDetails(): RtaUser { return this.loggedInUserDetails; }
- public get userRights(): RightsByClient[] { return this.loggedInUserRights; }
- public userHasRightForClient(right: USER_RIGHTS, clientId: string): boolean {
- // return true; // Bypass. Also has to be set in USER_RIGHTS.isGrantedToUser()
- return this.userRights.find(rdc => rdc.client.id == clientId)?.rights?.find(r => r.code == right.code) != null;
- }
-}
diff --git a/app/shared/services/dashboard/dashboard.service.spec.ts b/app/shared/services/dashboard/dashboard.service.spec.ts
deleted file mode 100644
index 261ef98..0000000
--- a/app/shared/services/dashboard/dashboard.service.spec.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { TestBed } from '@angular/core/testing';
-
-import { DashboardService } from './dashboard.service';
-
-describe('DashboardService', () => {
- let service: DashboardService;
-
- beforeEach(() => {
- TestBed.configureTestingModule({});
- service = TestBed.inject(DashboardService);
- });
-
- it('should be created', () => {
- expect(service).toBeTruthy();
- });
-});
diff --git a/app/shared/services/dashboard/dashboard.service.ts b/app/shared/services/dashboard/dashboard.service.ts
deleted file mode 100644
index ce6164d..0000000
--- a/app/shared/services/dashboard/dashboard.service.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-import { Injectable } from '@angular/core';
-import { HttpClient } from '@angular/common/http';
-import { Observable, of, } from 'rxjs';
-import { environment } from 'src/environments/environment';
-import { GenericRestService } from 'src/app/shared/services/generic-rest.service';
-import { AuthService } from 'src/app/shared/services/auth.service';
-import { DashboardSection } from 'src/app/shared/models/dashboard-section.interface';
-
-
-@Injectable({
- providedIn: 'root'
-})
-export class DashboardService extends GenericRestService {
-
- constructor(private http: HttpClient, private authService: AuthService) {
- super(`${environment.baseApiUrl}${environment.apiUrl.documentsProcessesWs}/dashboard`, http);
- }
-
- getDashboardSections(sectionType: string, sectionPage: string, sectionOffset: string, clients: string[]) {
- const parameters = {
- page: sectionPage,
- offset: sectionOffset,
- };
-
- const data = {
- userId: this.authService?.userDetails?.id?.toString(),
- type: sectionType,
- clients: clients,
- };
-
- return this.http.post(this.baseUrl, data, { params: parameters });
- }
-
-}
diff --git a/app/shared/services/document-classification.service.spec.ts b/app/shared/services/document-classification.service.spec.ts
deleted file mode 100644
index abe6eab..0000000
--- a/app/shared/services/document-classification.service.spec.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { TestBed } from '@angular/core/testing';
-
-import { DocumentClassificationService } from './document-classification.service';
-
-describe('DocumentClassificationService', () => {
- let service: DocumentClassificationService;
-
- beforeEach(() => {
- TestBed.configureTestingModule({});
- service = TestBed.inject(DocumentClassificationService);
- });
-
- it('should be created', () => {
- expect(service).toBeTruthy();
- });
-});
diff --git a/app/shared/services/document-classification.service.ts b/app/shared/services/document-classification.service.ts
deleted file mode 100644
index 8f0fbce..0000000
--- a/app/shared/services/document-classification.service.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { environment } from 'src/environments/environment';
-import {Injectable} from '@angular/core';
-import {GenericRestService} from './generic-rest.service';
-import {InboxBatch} from '../models/inbox-batch.interface';
-import {DocumentClassification} from '../models/document-classification.interface';
-import {HttpClient} from '@angular/common/http';
-import {DocumentSubclassification} from '../models/document-subclassification.interface';
-
-@Injectable({
- providedIn: 'root'
-})
-export class DocumentClassificationService extends GenericRestService {
-
- constructor(private http: HttpClient) {
- super(`${environment.baseApiUrl}${environment.apiUrl.configurationWs}/documents-classifications`, http);
- }
-
-
-}
diff --git a/app/shared/services/document-subclassification.service.spec.ts b/app/shared/services/document-subclassification.service.spec.ts
deleted file mode 100644
index 2ea313c..0000000
--- a/app/shared/services/document-subclassification.service.spec.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { TestBed } from '@angular/core/testing';
-
-import { DocumentSubclassificationService } from './document-subclassification.service';
-
-describe('DocumentSubclassificationService', () => {
- let service: DocumentSubclassificationService;
-
- beforeEach(() => {
- TestBed.configureTestingModule({});
- service = TestBed.inject(DocumentSubclassificationService);
- });
-
- it('should be created', () => {
- expect(service).toBeTruthy();
- });
-});
diff --git a/app/shared/services/document-subclassification.service.ts b/app/shared/services/document-subclassification.service.ts
deleted file mode 100644
index 46b2b26..0000000
--- a/app/shared/services/document-subclassification.service.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { environment } from 'src/environments/environment';
-import {Injectable} from '@angular/core';
-import {GenericRestService} from './generic-rest.service';
-import {DocumentSubclassification} from '../models/document-subclassification.interface';
-import {HttpClient} from '@angular/common/http';
-
-@Injectable({
- providedIn: 'root'
-})
-export class DocumentSubclassificationService extends GenericRestService {
-
- constructor(private http: HttpClient) {
- super( `${environment.baseApiUrl}${environment.apiUrl.configurationWs}/documents-subclassifications`, http);
- }
-
-}
diff --git a/app/shared/services/error-handling/error-handling.service.spec.ts b/app/shared/services/error-handling/error-handling.service.spec.ts
deleted file mode 100644
index b34c5b4..0000000
--- a/app/shared/services/error-handling/error-handling.service.spec.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { TestBed } from '@angular/core/testing';
-
-import { ErrorHandlingService } from './error-handling.service';
-
-describe('ErrorHandlingService', () => {
- let service: ErrorHandlingService;
-
- beforeEach(() => {
- TestBed.configureTestingModule({});
- service = TestBed.inject(ErrorHandlingService);
- });
-
- it('should be created', () => {
- expect(service).toBeTruthy();
- });
-});
diff --git a/app/shared/services/error-handling/error-handling.service.ts b/app/shared/services/error-handling/error-handling.service.ts
deleted file mode 100644
index 124707a..0000000
--- a/app/shared/services/error-handling/error-handling.service.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-import { TranslateService } from '@ngx-translate/core';
-import { RTAErrorMessage } from './../../enums/rta-error-message';
-import { Injectable } from '@angular/core';
-import { MessageService } from 'primeng/api';
-import { HttpErrorResponse } from '@angular/common/http';
-
-@Injectable({
- providedIn: 'root',
-})
-export class ErrorHandlingService {
-
- constructor(private messageService: MessageService, private translate: TranslateService) { }
-
- showHttpResponseError(error: HttpErrorResponse): void {
- this.messageService.add({
- severity: 'error',
- summary: this.translate.instant('RTA_ERRORS.TITLE_ERROR'),
- detail: this.httpErrorResponseToMessage(error)
- });
- }
-
- showErrorMessage(message: string): void {
- this.messageService.add({
- severity: 'error',
- summary: this.translate.instant('RTA_ERRORS.TITLE_ERROR'),
- detail: message
- });
- }
-
- clearErrors(): void {
- this.messageService.clear();
- }
-
- private httpErrorResponseToMessage(error: HttpErrorResponse): string {
- if (error && error.status === 0) {
- return this.translate.instant(`RTA_ERRORS.${RTAErrorMessage.TIMEOUT.toString()}`);
- }
- const errMsg = this.translate.instant(`RTA_ERRORS.${error.message}`);
- return errMsg ?? this.translate.instant('RTA_ERRORS.UNKNOWN_ERROR');
- }
-}
diff --git a/app/shared/services/generic-rest.service.spec.ts b/app/shared/services/generic-rest.service.spec.ts
deleted file mode 100644
index 686487b..0000000
--- a/app/shared/services/generic-rest.service.spec.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { TestBed } from '@angular/core/testing';
-
-import { GenericRestService } from './generic-rest.service';
-
-describe('GenericRestService', () => {
- let service: GenericRestService;
-
- beforeEach(() => {
- TestBed.configureTestingModule({});
- service = TestBed.inject(GenericRestService);
- });
-
- it('should be created', () => {
- expect(service).toBeTruthy();
- });
-});
diff --git a/app/shared/services/generic-rest.service.ts b/app/shared/services/generic-rest.service.ts
deleted file mode 100644
index 5b8f7a2..0000000
--- a/app/shared/services/generic-rest.service.ts
+++ /dev/null
@@ -1,107 +0,0 @@
-import {Injectable} from '@angular/core';
-import {HttpClient} from '@angular/common/http';
-import {Observable} from 'rxjs';
-import {Page} from '../models/paging/page.interface';
-import {environment} from '../../../environments/environment';
-
-
-@Injectable({
- providedIn: 'root'
-})
-export class GenericRestService {
-
-
- // tslint:disable-next-line:variable-name
- private _baseUrl: string;
-
- public get baseUrl(): string {
- return this._baseUrl;
- }
-
- constructor(url: string, private httpService: HttpClient) {
- // TODO when we unify the backend will be like that but for now
- // if (url.endsWith('/')) {
- // throw Error('Malformed url: ' + url + '\nEnds with slash');
- // }
- // if (url.startsWith('/')) {
- // throw Error('Malformed url: ' + url + '\nStarts with slash');
- // }
- // this._baseUrl = environment.ApiUrl + '/' + url;
- // will be like this
- if (url.endsWith('/')) {
- throw Error('Malformed url: ' + url + '\nEnds with slash');
- }
- if (url.startsWith('/')) {
- throw Error('Malformed url: ' + url + '\nStarts with slash');
- }
- this._baseUrl = url;
- // this remains unchanged
- this._baseUrl = url;
- }
-
-
- public getAll(): Observable {
- return this.httpService.get(this.baseUrl + '/all');
- }
-
- public getAllPaged(page: number, offset: number): Observable> {
- if (!environment.production && offset !== 10) {
-
- console.log('DEV MESSAGE: The deal is 10 results per page. Your offset became 10.I only show up in non-prod environment :)');
- }
- return this.httpService.get>(this.baseUrl + '/all', {
- params: {
- page: page.toString(),
- offset: '10'
- }
- });
- }
-
- public getById(id: string | number): Observable {
- return this.httpService.get(this.baseUrl + '/' + id.toString());
- }
-
- public update(data: T): Observable {
- return this.httpService.put(this.baseUrl, data);
- }
-
- public create(data: T): Observable {
- return this.httpService.post(this.baseUrl, data);
- }
-
- public delete(id: string | number): Observable {
- return this.httpService.delete(this.baseUrl + '/' + id.toString());
- }
-
- public deleteById(data: T): Observable {
- return this.httpService.delete(this.baseUrl, data);
- }
-
-
- public searchByCriteriaPaged(page: number, offset: number, criteria: any, urlExtension: string): Observable> {
- // TODO make this better
- if (!environment.production && offset !== 10) {
-
- console.log('DEV MESSAGE: The deal is 10 results per page. Your offset became 10.I only show up in non-prod environment :)');
- }
- if (urlExtension) {
- if (urlExtension.endsWith('/')) {
- throw Error('Malformed url: ' + urlExtension + '\nEnds with slash');
-
- }
- if (urlExtension.startsWith('/')) {
- throw Error('Malformed url: ' + urlExtension + '\nStarts with slash');
- }
- urlExtension = '/' + urlExtension;
- } else {
- urlExtension = '';
- }
-
- return this.httpService.post>(this.baseUrl + urlExtension, criteria, {
- params: {
- page: page.toString(),
- offset: '10'
- }
- });
- }
-}
diff --git a/app/shared/services/inbox-management.service.spec.ts b/app/shared/services/inbox-management.service.spec.ts
deleted file mode 100644
index 77aeb50..0000000
--- a/app/shared/services/inbox-management.service.spec.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { TestBed } from '@angular/core/testing';
-
-import { InboxManagementService } from './inbox-management.service';
-
-describe('InboxManagementService', () => {
- let service: InboxManagementService;
-
- beforeEach(() => {
- TestBed.configureTestingModule({});
- service = TestBed.inject(InboxManagementService);
- });
-
- it('should be created', () => {
- expect(service).toBeTruthy();
- });
-});
diff --git a/app/shared/services/inbox-management.service.ts b/app/shared/services/inbox-management.service.ts
deleted file mode 100644
index a33474d..0000000
--- a/app/shared/services/inbox-management.service.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-import { environment } from 'src/environments/environment';
-import {Injectable} from '@angular/core';
-import {GenericRestService} from './generic-rest.service';
-import {HttpClient, HttpResponse} from '@angular/common/http';
-import {InboxBatch} from '../models/inbox-batch.interface';
-
-@Injectable({
- providedIn: 'root'
-})
-export class InboxManagementService extends GenericRestService {
-
- constructor(private http: HttpClient) {
- super(`${environment.baseApiUrl}${environment.apiUrl.documentsProcessesWs}/status`, http);
- }
-
- downloadFile(url: string): any {
- return this.http.get(url, {responseType: 'blob'});
- }
-
-
- ignoreFile(id: string): any {
- return this.http.post(`${this.baseUrl}/ignore/${id}`, '');
- }
-
- forward(id: string): any {
- return this.http.post(`${this.baseUrl}/forward/${id}`, '');
- }
-
- reclassify(doc: InboxBatch): any {
- return this.http.put(`${this.baseUrl}/reclassify`, doc);
- }
-
-}
diff --git a/app/shared/services/invoice-download-scheduler.service.ts b/app/shared/services/invoice-download-scheduler.service.ts
deleted file mode 100644
index 332fac2..0000000
--- a/app/shared/services/invoice-download-scheduler.service.ts
+++ /dev/null
@@ -1,59 +0,0 @@
-import {environment} from 'src/environments/environment';
-import {Injectable} from '@angular/core';
-import {GenericRestService} from './generic-rest.service';
-import {HttpClient} from '@angular/common/http';
-import {Observable} from 'rxjs';
-import {DownloadingProcedureMetadata} from '../models/downloading-procedure-metadata.interface';
-import {DownloadProcessTemp} from '../models/download-process-temp.interafce';
-import {SentStringInterface} from '../models/sentString.interface';
-
-
-@Injectable({
- providedIn: 'root'
-})
-export class InvoiceDownloadSchedulerService extends GenericRestService {
-
- constructor(private http: HttpClient) {
- super(`${environment.baseApiUrl}${environment.apiUrl.documentsProcessesWs}/downloading-procedure`, http);
- }
-
- public getAllByUserId(id:number): Observable {
- return this.http.get(this.baseUrl + '/all/' + id.toString());
- }
-
- public highPriority(id: string): Observable {
- return this.http.get(this.baseUrl + '/' + 'high-priority/' + id);
- }
-
- public reschedule(id: string): Observable {
- return this.http.get(this.baseUrl + '/' + 'reschedule/' + id);
- }
-
- public getAllDownloadingProcedure(): Observable {
- return this.http.get(this.baseUrl + '/all');
- }
-
- public getWorkspaces(): Observable {
- return this.http.get(this.baseUrl + '/workspace/all');
- }
-
- public getMetadata(): Observable {
- return this.http.get(this.baseUrl + '/metadata/latest');
- }
-
- public getStatuses(): Observable {
- return this.http.get(this.baseUrl + '/status/all');
- }
-
- public getTimeIntervals(): Observable {
- return this.http.get(this.baseUrl + '/time/interval/all');
- }
-
- public getCurrentFrequency(): Observable {
- return this.http.get(this.baseUrl + '/time/interval');
- }
-
- public updateTimeIntervals(frequency: string): Observable {
- return this.http.put(this.baseUrl + '/time/interval', null, {params: {frequency}});
- }
-}
diff --git a/app/shared/services/invoice-processes.service.spec.ts b/app/shared/services/invoice-processes.service.spec.ts
deleted file mode 100644
index 9a2309f..0000000
--- a/app/shared/services/invoice-processes.service.spec.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { TestBed } from '@angular/core/testing';
-
-import { InvoiceProcessesService } from './invoice-processes.service';
-
-describe('InvoiceProcessesService', () => {
- let service: InvoiceProcessesService;
-
- beforeEach(() => {
- TestBed.configureTestingModule({});
- service = TestBed.inject(InvoiceProcessesService);
- });
-
- it('should be created', () => {
- expect(service).toBeTruthy();
- });
-});
diff --git a/app/shared/services/invoice-processes.service.ts b/app/shared/services/invoice-processes.service.ts
deleted file mode 100644
index d80b5eb..0000000
--- a/app/shared/services/invoice-processes.service.ts
+++ /dev/null
@@ -1,149 +0,0 @@
-import { environment } from 'src/environments/environment';
-import { Injectable } from '@angular/core';
-import { GenericRestService } from './generic-rest.service';
-import { LookupData } from '../models/lookup-data.interface';
-import { HttpClient } from '@angular/common/http';
-import { Observable, of, } from 'rxjs';
-import { FullInvoiceProcess } from '../models/full-invoice-process.interface';
-import { InvoiceProcess } from '../models/invoice-process.interface';
-import { AlteryxUnhandledData } from '../models/alteryx-unhandled-data.interface';
-import { InvoiceMasterData } from '../models/invoice-master-data.interface';
-import { SentStringInterface } from '../models/sentString.interface';
-import {JournalEntry} from "../models/journal-entry.interface";
-import {AlteryxException} from "../models/alteryx-exception.interface";
-import {ProcessFailedRecord} from "../models/process-failed-record.interface";
-import {ProcessHistory} from "../models/process-history.interface";
-
-@Injectable({
- providedIn: 'root'
-})
-export class InvoiceProcessesService extends GenericRestService {
-
- constructor(private http: HttpClient) {
- super(`${environment.baseApiUrl}${environment.apiUrl.documentsProcessesWs}/processes`, http);
- }
-
- getAllStatuses(): Observable {
- return this.http.get