Notes
Notes
--------------------------------------------------
Total 3 roles for login user (Creator,Approval,Viewer).
Based on roles user will be able to access different pages.
Creator will have access to Create,Manage and view Page, while Approval have
access to Approver and view page and Viewer has access to view page only.
NOTE: Creator can create from specific debitaccount number but cannot be an
approver of the same debit account_number but can be approver of different
debit_account_number. Same goes for an Approver. Viewer can only view the account
statement of debit_account_number assigned to him.
So Creator can also be an approver but not for the same account he created but for
a different account
1) Login:
Login page contains Email and password. If the credentials match,
the respective user login otherwise after 3 wrong login attempts will lock the
account. Login page have an hyperlink for forgot password, which asks user for
email , set of secret questions, respective secret answer, create new
password and confirm new password. After resetting password, the old password
gets updated in the database and user is back to login page, with a toastify saying
Password updated successfully.
Make sure that localhost path is not changeable from url to any other routes,
if he tries, then he will be signed out and redirected to login page.
As soon as we login we got to a login page, based on the role, the sidebar(sandwich
bar that will close and open) will consist only that options
such as Creator role will have only Create and Manage options in sidebar with a
logout and home options at the bottom of the sidebar.
Approver will have only Approve option in sidebar with a logout and home options at
the bottom of the sidebar..
Viewer will have only Account Statement of Debit acc. in side bar with a logout and
home options at the bottom of the sidebar.
Based on the number of roles assigned to user with specific debit account no. those
role options will be available in the sidebar.
Other options will be disabled(not accessible by the user) or not visible.
Creator can Manage and View the account in Manage option of sidebar.
3)Manage:
If saved as draft, you can manage the data in manage section where you will
see BatchID(Auto Generated non-editable), Total no. of transactions, Total Amount,
Debit Account no.,Remarks(That was entered in Create page), Remarks(which we will
obtain from approval page),
Batch Status(i.e Saved as draft or Approved or Rejected or Pending). If the status
is Saved as Draft then only we can access the hyperlink(BatchID) to edit the saved
draft of the batch,
that is it will be redirected to Edit page with all the options and UI similar to
Create page but with an addition of BatchID(Non Editable) at the top fixed,
otherwise hyperlink is not accessable.
Edit page will also have an option to discard the entire data that means the whole
data entered will be deleted with BatchID from database, before deleting user will
also be asked to confirm his decision with a popup.
Once saved draft is submitted the status will change to pending until its approved
or rejected by approver in the page before accessing the hyperlink. All the status
done by the approver on specific account number for each batch will be reflected
i.e updated in the Batch Status including the remarks provided by the approver in
approve page.
4)Approve:
Now comes the scenario where the creator submits the data for approval either from
Manage section or Create section.
NOTE: Creator cannot approve the accounts or batch that he created but he can
approve or reject other accounts.
There is always a Creator and an Approver for each batch. So check all 3 scenarios
where
one user can only be creator or can only be approver or can be both but for
different batches.
Approver will only be able to view the approve part only for those Batches for
which he is assigned to, that is for the batches other than accounts that he
created and specifically assigned with a debit account_no.
Once we login with a role of approver, we can click on only approve section.Approve
section consists of
BatchID, TotalAmount(of that Batch), Created By, Created On, No. Of
Transactions,Debit Account No.
beside each detail 2 Buttons of Approve and Reject. When clicked on Approve or
Reject a pop up will appear
to confirm user password and remarks, which will be stored in remarks column and
status and remarks will also get update the same in Manage section
and buttons will dissapear and batch status will get updated for approved or
rejected respectively based on the button clicked.
which will be showin in approval history which contain BatchID, Total Amount, Total
Transactions, Status and Remarks.
Viewer will have a view section in which he will be able to view only that account
statement for which he is mapped with that is the debit account number that he is
assigned with.
View: In which he will be able to view all the related details necessary for an
account statement(Debit Account). From all above 3 given scenarios and can also
print the statement in respective file format.
A drill down to transaction level details to be available for view
Account statement to be able to download or view through selecting the account and
the date range
For this entire project we are using React for frontend UI and MaterialUI for
enhancements or any other libraries for beautification.
Springboot and Postgres for backend connectivity. Creation of APIs and testing
using Postman.
Project Structure:
------------------
UI folder
---------
src
|---->Components
|----->necessary components.
|---->Features
|----->related features
|---->Contents
|---->Constants
|----->API
|---->App.js
|---->AppRoutes.js
|---->App.css
API folder
----------
src
|----> repository
|----> controller
|----> service
|----> entity
|----> security
|----> utils
|----> App.java
Here’s a detailed description of the connections between each table based on the
database schema:
3. Users → Batches
Connection: One-to-Many (1:N)
Description: A single user (with the Creator role) can create multiple batches. The
user_id of the creator is referenced as a foreign key in the batches table.
Foreign Key: batches.creator_id references users.user_id.
4. Batches → Transactions
Connection: One-to-Many (1:N)
Description: Each batch can have multiple transactions associated with it. The
batch_id in the batches table is referenced as a foreign key in the transactions
table.
Foreign Key: transactions.batch_id references batches.batch_id.
5. Users → Approvals
Connection: One-to-Many (1:N)
Description: A user (with the Approver role) can approve multiple batches. The
user_id of the approver is referenced as a foreign key in the approvals table.
Foreign Key: approvals.approver_id references users.user_id.
6. Batches → Approvals
Connection: One-to-One (1:1)
Description: Each batch can have one approval or rejection by an approver. The
batch_id in the batches table is referenced as a foreign key in the approvals
table.
Foreign Key: approvals.batch_id references batches.batch_id.
These relationships ensure that data related to users, debit accounts, batches,
transactions, approvals, and account statements are well connected and normalized.