This is not started yet @Gimhan_minion. Yes your help will be great since @Gravewalker is busy with building the UI. I will have a call with you within today. Thanks for asking
Yeah sure @YohanAvishke. Thank you for the update
We need another two APIs to get a single sub-category
and a category
by ID.
@YohanAvishke could you please guide @piumal1999 to create those two APIs?
Meanwhile, @anjisvj, you can use a mock API to get the details of a subcategory. Contact @YohanAvishke / @Gravewalker if you have no idea about the payload.
Sure I’ll contact them.
@piumal1999 Can you please give a deadline for creating these 2 API’s. I’ve already add the new task in the sheet. You can directly add the possible date in the sheet itself. Thank you!
Yeah. I added a date to the sheet. I’ll complete the task send a pull request soon
Ps:
Thank you @piumal1999 for the quick update!
Sorry guys, I missed this conversation.
However, the payloads should be similar to the payloads @Gravewalker has added in the updating-academix-page. The only difference is a single category and sub-category should be returned instead of an Array.
I have reviewed @piumal1999’s PR and have requested these changes.
Thank you @piumal1999 for finish creating these API’s so quickly. I’ve updated the time-line too.
PR for the admin APIs
Goals
- To add admin APIs to create, update & delete Languages, Categories, SubCategories, Items.
- To change entities in order to have more meaningful relationships and to make able to save utf-8 characters
Approach
- Create packages for admin APIs and refactor existing admin APIs to those packages
- Change entities and test to have more efficient relationships and to be able to support utf-8
- Add API layer, service layer and repositories to handle the new APIs
Thanks @YohanAvishke Please schedule a code review and let us know.
Following are the code review details
2020-06-15T14:30:00Z → 2020-06-15T15:30:00Z
Code review notes
Description
A code review was held to do a demonstration and to review the code of admin APIs developed for Academix.
Attendees
@jaye
@Gravewalker
@anjisvj
@piumal1999
Notes
- Return the created object as the response in the create APIs
- Refactor all the admin APIs including data retrieval APIs to use the Entity classes itself instead of the DTOs and Projections.
The possibility of this change has to be tested before implementation. Therefore this will be implemented in a separate PR.- This change will effectively remove all the DTOs and Projection classes.
- This will remove lot of validation code from the service layer.
- After this change, we can update an entity’s data and it’s translations using a single API.
Next steps
- Bring the PR to a mergeable state
- Start working on the second note I have mentioned above
Updated PR
Currently we have a separate table for languages in the academix database. But we only use two secondary languages. So it’s better to use Enums for the languages. (We can delete the table in this moment because we don’t have any translations yet) What do you think? @akshika47 @techTeam
Hi @piumal1999,
I had a discussion with @akshika47 on this.
The known alternative languages for the scope are only Sinhala and Tamil. And there’s no such a requirement to add a new languages suddenly through the dashboard.
I guess it’s better to go with an Enum.
Nice. I’m working on this.
Shall i use “SI” and “TM” as Enums for languages(Sinhala and tamil)? Any other suggestions? @techTeam
Hi @piumal1999 it will be more meaningful to use the full locale codes SI_LK
and TA_LK
Yeah. Thanks @YohanAvishke
Please review and merge.
https://github.com/sef-global/sef-core/pull/94