Skip to content

Conversation

@HasinduWelarathne
Copy link

Description

This PR migrates the legacy CSV Result Modal from AngularJS/CoffeeScript to Angular 17/TypeScript.

The migration includes:

  • Removal of CoffeeScript, SCSS, and .tpl.html modal files.
  • Addition of Angular 17 components, HTML templates, and SCSS.
  • Updates to doubtfire-angular.module.ts and doubtfire-angularjs.module.ts to correctly wire the new components.
  • Upload modal adjusts to CSV or ZIP
  • Preserves existing functionality (Success / Errors / Ignored tabs) with modern Angular patterns.
  • Improves the CSV Result modal to break the response into proper columns using CSV headers.

Type of change

  • Migration (AngularJS → Angular)
  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Login as a convener/admin.

CSV (Task Definitions)

  • Go to Units → Admin → Tasks.
  • Click Definitions CSV and upload COS10001-Tasks.csv (as specified in the task).
  • Confirm the result modal shows a table with the expected CSV columns.
  • Switch between Success / Errors / Ignored tabs and use paging to verify results render correctly.

ZIP (Task Sheets & Resources)

  • Click Resources as ZIP and upload a sample resources ZIP.
  • Confirm the result modal uses the original two-column layout (Message / Data).
  • Check the upload modal shows ZIP wording and the archive icon.

Screenshots

Before Migration

CSV Task Definition Import Results
Capture after csv uplaod sucess updated

ZIP Task Sheet and Resources Import Results
zip upload

After Migration

CSV Task Definition Import Results
import results

ZIP Task Sheet and Resources Import Results
zip results after migration

Testing Checklist:

  • Tested in latest Chrome
  • Tested in latest Safari
  • Tested in latest Firefox

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code in hard-to-understand areas
  • My changes generate no new warnings

Copy link

@chelaz1234 chelaz1234 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @HasinduWelarathne ,
I have successfully pulled and reviewed your code. Good documentation of manual test steps for CSV and ZIP paths, plus before/after screenshots that make the change easy to verify. Nice work on the migration, preserves the Success/Errors/Ignored flows, and adds CSV header-based columnising. Overall good job!

Copy link

@disururathnayake disururathnayake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @HasinduWelarathne , just went through your migration, here is my feedback:

  1. Successfully unlinked and removed the older instances of the component from doubtfire-angularjs.module.ts.
  2. Successfully imported the new component into the doubtfire-angular.module.ts.
  3. I was able to Pull your request and build your changes without any error.
  4. The component is working as expected . Great job on the migration.

Copy link

@Pasindufdo98 Pasindufdo98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested the CSV Result Modal by uploading task definitions and it worked smoothly. The uploads handled CSV and ZIP as expected. Great job on this migration.
screenshot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants