diff --git a/src/app/header/header.component.html b/src/app/header/header.component.html index 5622c8a0..31c852f0 100644 --- a/src/app/header/header.component.html +++ b/src/app/header/header.component.html @@ -4,67 +4,44 @@
diff --git a/src/app/header/header.component.scss b/src/app/header/header.component.scss index 4b28f66e..38063f2d 100644 --- a/src/app/header/header.component.scss +++ b/src/app/header/header.component.scss @@ -2,216 +2,110 @@ #header { width: 100%; background-color: white; - position: sticky; /* Change from relative to sticky */ - top: 0; /* Stick to the top */ - z-index: 1000; /* Ensure header stays above other content */ - box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Optional: adds shadow for visual separation */ -} - -#header { - transition: box-shadow 0.3s ease; + border-bottom: 1px solid #dfe1e2; } - .usa-header { - padding: 0.5rem 0; + padding: 0.75rem 0; border-bottom: none; } .grid-container-widescreen { - max-width: 1400px; + max-width: 1200px; margin: 0 auto; - padding: 0 1rem; + padding: 0 2rem; } -/* Main Navigation Container */ +/* Navigation Container */ .usa-nav { display: flex; + justify-content: space-between; align-items: center; - width: 100%; padding: 0; - flex-wrap: nowrap; + width: 100%; } -/* Left Logo */ +/* Logo Styling */ .logo-container { - flex-shrink: 0; - padding-right: 2rem; -} - -.logo-container img { - height: 40px; - width: auto; -} - -/* Center Navigation */ -.usa-nav__primary { display: flex; align-items: center; - margin: 0; - padding: 0; - list-style: none; - flex-grow: 1; - justify-content: center; gap: 1rem; -} -.usa-nav__primary-item { - margin: 0; -} - -.usa-nav__link { - color: #1b1b1b; - text-decoration: none; - padding: 0.5rem 1rem; - display: block; -} - -.usa-nav__link:hover { - color: #005ea2; -} + .gsa-logo-img { + height: 50px; + width: auto; + } -.usa-current { - color: #005ea2; - font-weight: bold; + .srt-logo-img { + height: 32px; + width: auto; + } } -/* Right Side Navigation Group */ +/* Navigation Links */ .right-nav-group { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; - margin-left: auto; -} - -.right-nav-group .nav-item { - display: flex; - align-items: center; -} - -.gsa-logo-item { - margin-left: 1rem; + gap: 1.5rem; } -.gsa-logo-item img { - height: 40px; - width: auto; -} - -/* User Menu */ -.user-menu { - position: relative; -} - -.usa-button.usa-button--outline { - display: flex; - align-items: center; - padding: 0.5rem 1rem; - background-color: transparent; - border: 1px solid #ffffff; - color: #005ea2; - font-weight: normal; +.nav-item { margin: 0; - white-space: nowrap; - box-shadow: none; /* Remove box shadow */ -} - -.usa-icon { - width: 1.25rem; - height: 1.25rem; - margin-left: 0.5rem; -} - -/* Dropdown Menu */ -.usa-nav__submenu { - position: absolute; - top: 100%; - right: 0; - background: white; - border: 1px solid #dfe1e2; - border-radius: 4px; - box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); - min-width: 150px; - display: block; - visibility: hidden; /* Hide initially */ - opacity: 0; - z-index: 1000; - margin-top: 0.25rem; - padding: 0.5rem 0; - transition: opacity 0.2s ease, visibility 0.2s ease; -} - -/* Keep submenu visible briefly after mouse leaves button */ -.user-menu:hover .usa-nav__submenu, -.usa-nav__submenu:hover { - visibility: visible; - opacity: 1; - transition-delay: 0s; /* Show immediately */ } -.user-menu:hover .usa-nav__submenu { - transition-delay: 0s, 0.2s; /* 200ms delay for hiding */ -} - -.usa-nav__submenu a { - color: #1b1b1b; +.nav-link { + color: #71767a; text-decoration: none; - padding: 0.5rem 1rem; - display: block; -} + font-size: 0.9rem; + display: inline-flex; + align-items: center; -.usa-nav__submenu a:hover { - background-color: #f0f0f0; + &:hover { + color: #1a4480; + } } -/* Skip Nav */ +/* Skip Nav (maintaining accessibility) */ .usa-skipnav { position: absolute; left: -999em; padding: 0.5rem 1rem; background-color: white; z-index: 1000; -} - -.usa-skipnav:focus { - left: 0; -} -/* Border Bottom */ -.border-bottom { - border-bottom: 1px solid #dfe1e2; + &:focus { + left: 0; + } } -/* Responsive Adjustments */ -@media (max-width: 1024px) { - .usa-nav__primary { - gap: 0.5rem; - } - - .usa-nav__link { - padding: 0.5rem; - } +/* External link icon styling */ +.external-link-icon { + margin-left: 4px; + fill: currentColor; + vertical-align: middle; + display: inline-block; } +/* Responsive adjustments */ @media (max-width: 768px) { - .usa-nav { - flex-wrap: wrap; + .grid-container-widescreen { + padding: 0 1rem; } - - .usa-nav__primary { - order: 3; - width: 100%; - margin-top: 1rem; - flex-wrap: wrap; - } - + .right-nav-group { - order: 2; + gap: 1rem; } .logo-container { - order: 1; + .gsa-logo-img { + height: 40px; + } + + .srt-logo-img { + height: 24px; + } } } \ No newline at end of file diff --git a/src/app/solicitation/solicitation-report/solicitation-report.component.html b/src/app/solicitation/solicitation-report/solicitation-report.component.html index 7eda1b4b..0799dc20 100644 --- a/src/app/solicitation/solicitation-report/solicitation-report.component.html +++ b/src/app/solicitation/solicitation-report/solicitation-report.component.html @@ -1,122 +1,119 @@ +
    -
  • L
  • -
  • O
  • -
  • A
  • -
  • D
  • -
  • I
  • -
  • N
  • -
  • G
  • -
  • .
  • -
  • .
  • -
  • .
  • +
  • + {{char}} +
-
- -
-
- -

- Solicitation Review Results -

- -

- Below are the results of the solicitation review process, focusing on Section 508 compliance requirements. The table - provides details on each solicitation’s adherence to accessibility standards. -

-
-
+ +
+
+

Daily report

+

SRT results for {{ today | date:'MMMM d, yyyy' }}

+

Review the solicitations posted to SAM.gov for 508 compliance for your agency

+
- -
-
- - - - + + + Export as CSV file +
- - -
Export As:
-
- - - - - - {{col.title}} - - - - - - - - - - - - Solicitation # - {{sol.solNum}} - - Title{{sol.title}} - Notice Type{{sol.noticeType}} - Date Posted{{sol.date}} - - Review Result - - - - EPA Review - - - Action Status{{sol.actionStatus}} - Action Date{{sol.actionDate}} - Agency{{sol.agency}} - URL{{sol.url}} - Office{{sol.office}} - - - + + + + + + + Solicitation # + Title + Notice Type + Date + +
+
+ Review Result + +
+ + +
+ + Latest action date + Office + +
-
- Total Solicitation {{totalRecordCount}} -
+ + + + + + {{solicitation.solNum}} + + {{solicitation.title}} + {{solicitation.noticeType}} + {{solicitation.date | date:'MMM d, yyyy'}} + +
+ + {{solicitation.reviewRec}} +
+ + {{solicitation.actionDate | date:'MMM d, yyyy'}} + {{solicitation.office}} + +
+
+ + +
+ Total Solicitations: {{totalRecordCount}} +
\ No newline at end of file diff --git a/src/app/solicitation/solicitation-report/solicitation-report.component.scss b/src/app/solicitation/solicitation-report/solicitation-report.component.scss index a91601f3..e9f799ea 100644 --- a/src/app/solicitation/solicitation-report/solicitation-report.component.scss +++ b/src/app/solicitation/solicitation-report/solicitation-report.component.scss @@ -1,298 +1,290 @@ -/* Style for the CSV export icon */ -#csvlogo { - max-height: 2.5rem; - padding-left: 0.625rem; - margin-left: 0.9375rem; /* Add margin to space it nicely from other elements */ - cursor: pointer; -} - -/* Align elements vertically */ -.grid-col { - display: flex; - align-items: center; /* Align content vertically to look more balanced */ -} - -/* Button styling */ -.button { - background-color: white; -} - -/* Override for PrimeNG theme for the workflow table */ -body .p-datatable .p-datatable-tbody td.p-resizable-column { - color: #111111; -} - -body p-paginator div a { - color: #111111 !important; -} - -body p-paginator div a.p-highlight { - background-color: #112e51 !important; - color: white !important; +/* Main Container Styles */ +.main-container { + padding: 2rem; + font-family: "Source Sans Pro", "Helvetica Neue", "Helvetica", "Roboto", "Arial", sans-serif; + } + + /* Header Styles */ + h1 { + font-size: 2.5rem; font-weight: bold; -} - -/* Table header styling */ -th { + margin: 0 0 1rem 0; + color: #1b1b1b; + } + + h2 { + font-size: 1.75rem; + font-weight: normal; + margin: 0 0 1rem 0; + color: #1b1b1b; + } + + .description { font-size: 1.125rem; - font-weight: bold !important; - vertical-align: top; -} - -/* Global font family */ -body { - font-family: "Source Sans Pro", "Helvetica Neue", "Helvetica", "Roboto", "Arial", sans-serif !important; -} - -/* Result styles */ -.result-red span, -.result-red i { + color: #1b1b1b; + margin-bottom: 2rem; + } + + /* Search and Export Section */ + .search-export-container { + margin-bottom: 2rem; + } + + .search-button-group { + display: flex; + align-items: center; + gap: 1rem; + } + + .search-input { + /* Updated styles for search input */ + flex: 0 1 auto; /* Allow it to shrink but not grow beyond its content */ + max-width: 400px; /* Set a maximum width */ + width: 100%; /* Make it responsive */ + + padding: 0.75rem; + border: 1px solid #565c65; + border-radius: 0.25rem; font-size: 1rem; - color: #cc0000; + } + + .search-button { + padding: 0.75rem 1.25rem; + background-color: #005ea2; + color: white; + border: none; + border-radius: 0.25rem; + cursor: pointer; font-weight: bold; -} - -.result-green span, -.result-green i { - font-size: 1rem; + white-space: nowrap; + } + + .search-button:hover { + background-color: #0b4778; + } + + .export-link { + display: flex; + align-items: center; + color: #005ea2; + text-decoration: none; font-weight: bold; - color: green; -} - -.result-yellow span, -.result-yellow i { - font-size: 1rem; + white-space: nowrap; + } + + .export-link i { + margin-right: 0.5rem; + } + + .export-link:hover { + text-decoration: underline; + } + + /* Table Styles */ + .srt-table { + width: 100%; + border-collapse: collapse; + } + + :host ::ng-deep { + .p-datatable { + .p-datatable-header { + background: #ffffff; + border: none; + padding: 1rem; + } + + .p-datatable-thead > tr > th { + background: #f0f0f0; + padding: 1rem; + border: 1px solid #dfe1e2; + color: #1b1b1b; + font-weight: bold; + text-align: left; + } + + .p-datatable-tbody > tr > td { + padding: 1rem; + border: 1px solid #dfe1e2; + color: #1b1b1b; + } + + .p-sortable-column:hover { + background: #e6e6e6; + } + + .p-paginator { + padding: 1rem; + background: #ffffff; + border: none; + } + .p-datatable-tbody > tr:hover { + background-color: #eaeaea; /* Dark background for the entire row */ + color: #fff; /* Light text for better contrast */ + transition: background-color 0.3s ease; /* Smooth transition */ + } + } + } + + /* Status Indicators */ + .status-indicator { + display: flex; + align-items: center; + gap: 0.5rem; font-weight: bold; - color: #635401; -} - -/* Animation styles */ -ul.cb-slide-show { + } + + .status-indicator i { + font-size: 1.25rem; + } + + .status-compliant { + color: #00a91c; + } + + .status-compliant i { + color: #00a91c; + } + + .status-noncompliant { + color: #d54309; + } + + .status-noncompliant i { + color: #d54309; + } + + .status-not-applicable { + color: #ff9f00; + } + + .status-not-applicable i { + color: #ff9f00; + } + + .clickable-cell { + cursor: pointer; + } + + .clickable-cell:hover { + background-color: transparent; /* Remove hover effect on individual cells */ + } + + .sol-num-cell { + cursor: default; + } + + .solicitation-link { + color: #005ea2; + text-decoration: none; + font-weight: 500; + } + + .solicitation-link:hover { + text-decoration: underline; + } + + #total-count { + margin-top: 1rem; + text-align: right; + font-weight: 500; + } + + .header-with-filter { + display: flex; + flex-direction: column; + gap: 0.5rem; + } + + .header-title { + display: flex; + align-items: center; + gap: 0.5rem; + } + + /* Loading Animation */ + .solic-nosolic { + height: calc(100vh - 60px); + display: table; + width: 100%; + } + + .solic-nosolic-posi { + display: table-cell; + vertical-align: middle; + } + + .cb-slide-show { padding-left: 0; font-size: 5rem; text-align: center; -} - -ul.cb-slide-show li { - list-style: none; - display: inline; -} - -.cb-slide-show li span { - opacity: 0.3; - display: inline; - -webkit-backface-visibility: hidden; - animation: imageAnimation 3s linear infinite 0s; -} - -.cb-slide-show li:nth-child(1) span { - animation-delay: 0s; -} - -.cb-slide-show li:nth-child(2) span { - animation-delay: 0.25s; -} - -.cb-slide-show li:nth-child(3) span { - animation-delay: 0.5s; -} - -.cb-slide-show li:nth-child(4) span { - animation-delay: 0.75s; -} - -.cb-slide-show li:nth-child(5) span { - animation-delay: 1s; -} - -.cb-slide-show li:nth-child(6) span { - animation-delay: 1.25s; -} - -.cb-slide-show li:nth-child(7) span { - animation-delay: 1.5s; -} - -.cb-slide-show li:nth-child(8) span { - animation-delay: 1.75s; -} - -.cb-slide-show li:nth-child(9) span { - animation-delay: 2s; -} - -.cb-slide-show li:nth-child(10) span { - animation-delay: 2.25s; -} - -.cb-slide-show li:nth-child(11) span { - animation-delay: 2.5s; -} - -.cb-slide-show li:nth-child(12) span { - animation-delay: 2.75s; -} - -.cb-slide-show li:nth-child(13) span { - animation-delay: 3s; -} - -@keyframes imageAnimation { - 0% { - opacity: 0.5; - animation-timing-function: ease-in; + + li { + list-style: none; + display: inline; + + span { + opacity: 0.3; + animation: imageAnimation 3s linear infinite; + } } - 8% { - opacity: 1; - transform: scale(1.05); - animation-timing-function: ease-out; + } + + @for $i from 1 through 10 { + .cb-slide-show li:nth-child(#{$i}) span { + animation-delay: #{($i - 1) * 0.25}s; } - 17% { - opacity: 1; - transform: scale(1.05); + } + + @keyframes imageAnimation { + 0% { + opacity: 0.3; } - 25% { - opacity: 0.5; - transform: scale(1.05); + 50% { + opacity: 1; } 100% { - opacity: 0.5; - transform: scale(1.05); + opacity: 0.3; } -} - -/* No solicitation message styles */ -.solic-nosolic { - height: calc(100vh - 3.75rem); - display: table; - width: 100%; -} - -.solic-nosolic-posi { - display: table-cell; - vertical-align: middle; -} - -/* Table styles */ -.pDataTable { - padding: 0 1.25rem; -} - -body .p-datatable .p-datatable-tbody tr { - border-bottom: 1px solid black; -} - -/* Total count styles */ -#total-count { - font-family: "Open Sans", "Helvetica Neue", sans-serif; - font-size: 0.875rem; - text-decoration: none; - padding: 0.3em; -} - -@media (max-width: 45em) { - #total-count { - position: relative; - float: right; - right: 3em; - height: 3em; - top: 0.5em; - } -} - -@media (min-width: 45em) { - #total-count { - top: -1.9em; - position: relative; - float: right; - right: 3em; - } -} - -/* Adjust overflow in table headers */ -#content p-table table > thead > tr > th { - overflow: visible; -} - -/* Custom input group styles */ -.custom-container { - margin-bottom: 1.25rem !important; /* Space between search bar and table */ -} - -.custom-input-group { - display: flex !important; - align-items: center !important; - margin-right: 0.9375rem !important; - padding: 1.25rem !important; -} - -.custom-input { - padding: 0.625rem !important; - margin-right: 0.9375rem !important; - height: 2.5rem !important; - width: 100% !important; - max-width: 30rem; /* Optional: set a maximum width for the input */ - border: 1px solid #565c65 !important; - border-radius: 0.25rem !important; -} - -.custom-button { - height: 2.5rem !important; - padding: 0.375rem 0.75rem !important; -} - -/* Dropdown and table adjustments */ -:host ::ng-deep { - .p-dropdown { - width: 100%; /* Make dropdown width match column */ - min-width: 9.375rem; /* 150px converted to rem */ - } - - .p-dropdown-panel { - width: auto !important; /* Allow panel to size based on content */ - max-width: 18.75rem; /* 300px converted to rem */ - overflow: hidden; /* Prevent overflow */ + } + + /* Responsive Design */ + @media screen and (max-width: 768px) { + .search-button-group { + flex-direction: column; + width: 100%; + } + + .search-input { + max-width: none; /* Allow full width on smaller screens */ + } + + .search-button, + .export-link { + width: 100%; + text-align: center; + justify-content: center; + } + } + + @media screen and (max-width: 480px) { + .main-container { + padding: 1rem; } - - .p-dropdown-items-wrapper { - max-height: 12.5rem; /* 200px converted to rem */ + + h1 { + font-size: 2rem; } - - /* Ensure dropdown options don't wrap and show ellipsis if too long */ - .p-dropdown-item { - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; + + h2 { + font-size: 1.5rem; } - - /* Prevent table resizing */ - .p-datatable { - table-layout: fixed; - width: 100%; + + .search-container { + flex-direction: column; } - - /* Ensure column headers maintain their width */ - .p-datatable-thead > tr > th { - overflow: visible; /* Allow dropdown to overflow */ - position: relative; /* Required for dropdown positioning */ + + .search-button { + width: 100%; } -} - -/* Remove the default button border and outline */ -button { - border: none !important; /* Remove border */ - outline: none !important; /* Remove outline */ - box-shadow: none !important; /* Remove box-shadow if any */ -} - -/* Remove any border on table cells in this column */ -.p-datatable .p-datatable-tbody > tr > td.col_review_result { - border: none !important; /* Remove cell border for the specific column */ -} - -/* Specific override for the .table-button class if needed */ -.button.table-button { - border: none !important; /* Remove any border applied to buttons in this class */ - outline: none !important; - box-shadow: none !important; -} \ No newline at end of file + } \ No newline at end of file diff --git a/src/app/solicitation/solicitation-report/solicitation-report.component.ts b/src/app/solicitation/solicitation-report/solicitation-report.component.ts index 0ae1b793..271bf72f 100644 --- a/src/app/solicitation/solicitation-report/solicitation-report.component.ts +++ b/src/app/solicitation/solicitation-report/solicitation-report.component.ts @@ -30,7 +30,7 @@ interface TableState { styleUrls: ['./solicitation-report.component.scss'] }) export class SolicitationReportComponent extends BaseComponent implements OnInit { - + today: Date = new Date(); /* ATTRIBUTES */ diff --git a/src/app/solicitation/summary/results-detail/results-detail.component.html b/src/app/solicitation/summary/results-detail/results-detail.component.html index 0959bfcb..ed728740 100644 --- a/src/app/solicitation/summary/results-detail/results-detail.component.html +++ b/src/app/solicitation/summary/results-detail/results-detail.component.html @@ -1,201 +1,136 @@ -
- +
+
+
\ No newline at end of file diff --git a/src/app/solicitation/summary/results-detail/results-detail.component.scss b/src/app/solicitation/summary/results-detail/results-detail.component.scss index bb6a67e6..d146e9b5 100644 --- a/src/app/solicitation/summary/results-detail/results-detail.component.scss +++ b/src/app/solicitation/summary/results-detail/results-detail.component.scss @@ -1,64 +1,65 @@ -.tooltip-wrapper { - position: relative; - display: inline-block; - margin-left: 5px; +/* Status badge - used in status-badge--compliant and status-badge--non-compliant classes */ +.status-badge { + display: inline-flex; + align-items: center; + gap: 0.5rem; + font-weight: 500; + margin: 1rem 0; } -.tooltip-wrapper .tooltip-text { - visibility: hidden; - background-color: #1b1b1b; - color: #fff; - text-align: left; - padding: 8px; - border-radius: 4px; - position: absolute; - z-index: 1; - width: 300px; - top: 100%; - left: 50%; - transform: translateX(-50%); - margin-top: 5px; - font-weight: normal; - font-size: 14px; - line-height: 1.5; +.status-badge--compliant { + color: #00a91c; } -.tooltip-wrapper:hover .tooltip-text { - visibility: visible; +.status-badge--non-compliant { + color: #d83933; } -/* Add arrow */ -.tooltip-wrapper .tooltip-text::after { - content: ""; - position: absolute; - bottom: 100%; - left: 50%; - margin-left: -5px; - border-width: 5px; - border-style: solid; - border-color: transparent transparent #1b1b1b transparent; +.check-icon { + width: 1.25rem; + height: 1.25rem; + padding: 0.25rem; + border-radius: 50%; } -.tooltip-wrapper { - vertical-align: super; /* Positions tooltips as superscript */ - font-size: 0.8em; /* Adjust font size if needed */ + +.status-badge--compliant .check-icon { + background-color: #00a91c; +} + +.status-badge--non-compliant .check-icon { + background-color: #d83933; +} + +.check-icon path { + fill: white; } -#art { - background-color: #fa9441; - outline: 0.25rem solid #2491ff; - color: #1b1b1b; - float: left; - width: auto; - font-weight: bold; +/* Layout containers */ +.feedback-container { + max-width: 1200px; + margin: 0 auto; + padding: 0 2rem; } -#art:hover { - background-color: #c05600; - color: white; - font-weight: bold; +.main-content { + margin: 0; + padding: 2rem 0; } -table td { - padding: 0 20px; +/* Icon styles */ +.icon-link { + font-size: 16px; + padding-left: 5px; + vertical-align: middle; } +/* Responsive adjustments */ +@media (max-width: 768px) { + .feedback-container { + padding: 0 1rem; + } + + h1 { + font-size: 2rem; + } +} \ No newline at end of file diff --git a/src/app/solicitation/summary/results-detail/results-detail.component.ts b/src/app/solicitation/summary/results-detail/results-detail.component.ts index 887197be..d1f02c47 100644 --- a/src/app/solicitation/summary/results-detail/results-detail.component.ts +++ b/src/app/solicitation/summary/results-detail/results-detail.component.ts @@ -59,58 +59,102 @@ export class ResultsDetailComponent implements OnInit { * lifecycle */ ngOnInit() { - this.subscription = this.route.params.subscribe( - (params: any) => { + const navigation = this.router.getCurrentNavigation(); + if (navigation?.extras?.state?.['solicitation']) { + const data = navigation.extras.state['solicitation']; + + if (data.parseStatus && Array.isArray(data.parseStatus)) { + data.parseStatus.forEach(element => { + element.status = element.status === 'successfully parsed' ? 'Yes' : + element.status === 'processing error' ? 'No' : + element.status; + element.formattedDate = moment(element.postedDate).format('L'); + }); + } else { + console.log('Error processing parse status for solicitation ' + data.solNum); + data.parseStatus = [{ + formattedDate: '', + postedDate: null, + name: '', + status: '', + attachment_url: '' + }]; + } + + this.step1 = data.history?.filter(e => + e['action'].indexOf('reviewed solicitation action requested summary') > -1 + ).length > 0; + + this.step2 = data.history?.filter(e => + e['action'].indexOf('sent email to POC') > -1 + ).length > 0; + + this.step3 = data.history?.filter(e => + e['action'].indexOf('provided feedback on the solicitation prediction result') > -1 + ).length > 0; + + this.solicitation = data; + this.solicitationID = data.id; + + const totalDoc = Number(this.solicitation.numDocs); + if (!isNaN(totalDoc)) { + if (totalDoc !== this.solicitation.parseStatus.length) { + const lock = totalDoc - this.solicitation.parseStatus.length; + this.lockDocs = Array(lock).fill(0).map((_, i) => i + 1); + } + } + + } else { + this.subscription = this.route.params.subscribe(params => { this.solicitationID = params['id']; - // console.log(this.solicitationID); - this.solicitationService.getSolicitation(this.solicitationID).subscribe( - {next: data => { + this.solicitationService.getSolicitation(this.solicitationID).subscribe({ + next: data => { if (data.parseStatus && Array.isArray(data.parseStatus)) { data.parseStatus.forEach(element => { - if (element.status === 'successfully parsed') { - element.status = 'Yes'; - } else if (element.status === 'processing error') { - element.status = 'No'; - } + element.status = element.status === 'successfully parsed' ? 'Yes' : + element.status === 'processing error' ? 'No' : + element.status; element.formattedDate = moment(element.postedDate).format('L'); }); } else { - console.log ('Error processing parse status for solicitation ' + data.solNum); - data.parseStatus = [{formattedDate: '', postedDate: null, name: '', status: '', attachment_url: ''}]; + console.log('Error processing parse status for solicitation ' + data.solNum); + data.parseStatus = [{ + formattedDate: '', + postedDate: null, + name: '', + status: '', + attachment_url: '' + }]; } - - this.step1 = data.history.filter( function(e) { - return e['action'].indexOf('reviewed solicitation action requested summary') > -1; - }).length > 0; - this.step2 = data.history.filter( function(e) { - return e['action'].indexOf('sent email to POC') > -1; - }).length > 0; - this.step3 = data.history.filter( function(e) { - return e['action'].indexOf('provided feedback on the solicitation prediction result') > -1; - }).length > 0; - + + this.step1 = data.history?.filter(e => + e['action'].indexOf('reviewed solicitation action requested summary') > -1 + ).length > 0; + + this.step2 = data.history?.filter(e => + e['action'].indexOf('sent email to POC') > -1 + ).length > 0; + + this.step3 = data.history?.filter(e => + e['action'].indexOf('provided feedback on the solicitation prediction result') > -1 + ).length > 0; + this.solicitation = data; - + const totalDoc = Number(this.solicitation.numDocs); - if (!isNaN(totalDoc)) { - // doesn't have lock files - if (totalDoc === this.solicitation.parseStatus.length) { - } else { + if (totalDoc !== this.solicitation.parseStatus.length) { const lock = totalDoc - this.solicitation.parseStatus.length; - this.lockDocs = []; - for (let i = 1; i <= lock; i++) { - this.lockDocs.push(i); - } + this.lockDocs = Array(lock).fill(0).map((_, i) => i + 1); } } - }, - error: err => console.log(err)} - ); + error: err => console.log(err) + }); }); - } - + } + } + onNotApplicableClick(event) { this.solicitation.na_flag = event.target.checked; this.solicitationService.update(this.solicitation) @@ -119,4 +163,8 @@ export class ResultsDetailComponent implements OnInit { this.$gaService.event('not_applicable', 'make_srt_better', 'Not Applicable'); } + + onClickTabs(action: string, label: string): void { + this.$gaService.event(action, "solicitation_tab", label); + } }