Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions src/main/features/event-management/controller/evaluateSuppliers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,26 @@ export const EVALUATE_SUPPLIERS = async (req: express.Request, res: express.Resp
const ScoresAndFeedbackURL =`tenders/projects/${projectId}/events/${eventId}/scores`
const ScoresAndFeedbackURLdata = await TenderApi.Instance(SESSION_ID).get(ScoresAndFeedbackURL)
const supplierInterestURL = `tenders/projects/${projectId}/events/${eventId}/responses`
const supplierdata = await TenderApi.Instance(SESSION_ID).get(supplierInterestURL)
const supplierdata= await TenderApi.Instance(SESSION_ID).get(supplierInterestURL)
var submittedCount = 0
for (let i = 0; i < supplierdata.data.responders.length; i++) {
if(supplierdata.data.responders[i].responseState == 'Submitted')
{
submittedCount++
}
}
let supData = [];
let supplierName = [];

let showallDownload = false;
for (let i = 0; i < ScoresAndFeedbackURLdata.data.length; i++) {

for(let j=0;j<supplierdata.data.responders.length;j++)
{
if(supplierdata.data.responders[j].supplier.id==ScoresAndFeedbackURLdata.data[i].organisationId)
if(supplierdata.data.responders[j].supplier.id==ScoresAndFeedbackURLdata.data[i].organisationId )
{
supData[i]=supplierdata.data.responders[j];
break;
}
}
}
//supplierdata.data.responders.filter((a:any)=>{a.supplier.id==ScoresAndFeedbackURLdata.data[i].organisationId});
//let commentData=supplierdata.data.responders[i].supplier.filter((a:any)=>{a.organisationId==supplierdata.data.responders[i].supplier.id});
Expand All @@ -115,7 +121,7 @@ export const EVALUATE_SUPPLIERS = async (req: express.Request, res: express.Resp
completion = "Yes"
}


let dataPrepared = {

"id": supData[i].supplier.id,
Expand All @@ -126,24 +132,26 @@ export const EVALUATE_SUPPLIERS = async (req: express.Request, res: express.Resp
"responseDate": supData[i].responseDate,
"completionStatus":completion,
}

if (supplierdata.data.responders[i].responseState == 'Submitted') {
showallDownload = true;
}
supplierName.push(dataPrepared)
}

}

const supplierSummary = supplierdata.data;
var count =0;
let ConfirmFlag = false;
//count of completionstatus="yes" == count of responders
for (let k = 0; k < supplierName.length; k++) {
if(supplierName[k].completionStatus == "Yes")
if(supplierName[k].completionStatus == "Yes" && supplierName[k].responseState == "Submitted" )
{
count++;
}
}
if(count == supplierName.length)
if(count == submittedCount)
{
ConfirmFlag = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
{
"text": "Your Project",
"href": "/dashboard"
"href": "/event/management?id="+eventId
},
{
"text": "Evaluate Suppliers",
Expand Down
10 changes: 5 additions & 5 deletions src/main/features/event-management/views/evaluateSuppliers.njk
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
{{ CCSBreadcrumbs({
items:[
{
"text": "Dashboard",
"text": "Your Dashboard",
"href": "/dashboard"
},
{
"text": "Your Project",
"href": "#"
"href": "/event/management?id="+eventId
},
{
"text": "Evaluate Suppliers",
Expand Down Expand Up @@ -70,7 +70,7 @@
</tr>
</thead>
{% for supplier in supplierName %}
{#{% if supplier.responseState =='Submitted' %} #}
{% if supplier.responseState =='Submitted' %}
<tbody class="govuk-table__body">

<tr class="govuk-table__row">
Expand All @@ -81,15 +81,15 @@
{#</p>#}

</th>
<td class="govuk-table__cell">{{ supplier.responseDate }}</td>
<td class="govuk-table__cell">{{ supplier.responseDate |dateddmmyyyy }}</td>
<td class="govuk-table__cell">
<a class="govuk-link" href="/evaluate-download?supplierid={{supplier.id}}">{{ data.Downloadresponse[0].text }}</a>
</td>
<td class="govuk-table__cell"> <a href="/enter-evaluation?supplierid={{supplier.id}}&suppliername={{supplier.name}}" class="govuk-link govuk-link--no-visited-state"> Add or edit </a></td>
<td class="govuk-table__cell"> {{supplier.completionStatus}} </td>
</tr>
</tbody>
{#{% endif %} #}
{% endif %}
{% endfor %}
</table>
</div>
Expand Down
8 changes: 4 additions & 4 deletions src/main/features/event-management/views/eventManagement.njk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{{ CCSBreadcrumbs({
items:[
{
"text": "Dashboard",
"text": "Your Dashboard",
"href": "/dashboard"
},
{
Expand Down Expand Up @@ -224,7 +224,7 @@
{{supplier.name}}
</p>
</th>
<td class="govuk-table__cell">{{ supplier.responseDate }}</td>
<td class="govuk-table__cell">{{ supplier.responseDate |dateddmmyyyy }}</td>
</tr>
{% endif %}
{% endfor %}
Expand Down Expand Up @@ -270,7 +270,7 @@
</th>
{# {% if status.toUpperCase() ==='TO-BE-EVALUATED'%}#}
<td class="govuk-text-align govuk-!-text-align-left">
{{ supplier.responseDate|date('DD/MM/YYYY') }}
{{ supplier.responseDate |dateddmmyyyy }}
</td>
{#{%endif%}#}
{% if status.toUpperCase() !=='EVALUATED'%}
Expand Down Expand Up @@ -341,7 +341,7 @@
</p>

</th>
<td class="govuk-table__cell">{{ supplier.responseDate }}</td>
<td class="govuk-table__cell">{{ supplier.responseDate |dateddmmyyyy }}</td>
<td class="govuk-text-align">
<a class="govuk-link" href="/eventmanagement?supplierid={{supplier.supplierId}}">{{ data.Downloadresponse[0].text }}</a>
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{{ CCSBreadcrumbs({
items:[
{
"text": "Dashboard",
"text": "Your Dashboard",
"href": "/dashboard"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{{ CCSBreadcrumbs({
items:[
{
"text": "Dashboard",
"text": "Your Dashboard",
"href": "/dashboard"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,18 @@
"subsection4_title3": "How many suppliers will respond to your published project",
"subsection4_title3_descriiption": "You can find out how many suppliers are interested in responding to your project in the section below.",
"subsection4_title3_task1":"Total number of suppliers who received your published project",
"subsection4_title3_task2":"Number of suppliers who have responded",
"subsection4_title3_task3":"Number of suppliers who do not want to submit an answer",
"subsection4_title3_task2":"Number of suppliers who intend to respond",
"subsection4_title3_task3":"Number of suppliers who do not want to respond",
"subsection4_title3_task4":"Number of suppliers who have not responded",



"subsection4_title3_eval": "Suppliers who responded to your published project",
"subsection4_title3_eval_descriiption": "Find out how many suppliers are interested in responding to your project in the section below.",
"subsection4_title3_eval_task1":"Total number of suppliers who received your published project",
"subsection4_title3_eval_task2":"Number of suppliers who want to respond",
"subsection4_title3_eval_task2":"Number of suppliers who intend to respond",
"subsection4_title3_eval_task3":"Number of suppliers who do not want to respond",
"subsection4_title3_eval_task4":"Remaining supplier with no response",
"subsection4_title3_eval_task4":"Number of suppliers who have not responded",


"subsection4_title4": "Supplier responses",
Expand Down