diff --git a/.github/workflows/deployment_azure-app-service.yml b/.github/workflows/deployment_azure-app-service.yml index ddab5d3..c012e78 100644 --- a/.github/workflows/deployment_azure-app-service.yml +++ b/.github/workflows/deployment_azure-app-service.yml @@ -5,22 +5,21 @@ name: Deploy Node.js express app to Azure Web App - compact-donuts on: push: + paths-ignore: + - 'docs/**' branches: - main - - 'Sprint-[0-9]' + - 'Sprint-[0-9]*' + - 'patch-[0-9]*' workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true -env: - WRS_INSTANCE: docs/ucwa - WRS_ARTIFACT: webHelpUCWA2-all.zip - WRS_DOCKER_VERSION: 232.10165.1 - jobs: deploy: + name: Deploy to Azure Web App runs-on: ubuntu-latest environment: name: 'Production' @@ -41,49 +40,15 @@ jobs: echo 'Install dependencies' yarn install --immutable - - name: Build jsdoc documentation - uses: andstor/jsdoc-action@v1 - with: - source_dir: . - recurse: true - output_dir: ./public/docs/jsdoc - - - name: Build Writerside docs using Docker - uses: JetBrains/writerside-github-action@v4 - with: - instance: ${{ env.WRS_INSTANCE }} - artifact: ${{ env.WRS_ARTIFACT }} - docker-version: ${{ env.WRS_DOCKER_VERSION }} - - - name: Upload Writerside documentation artifact - uses: actions/upload-artifact@v3 - with: - name: wrs_docs - path: | - artifacts/${{ env.WRS_ARTIFACT }} - artifacts/report.json - retention-days: 7 - - - name: Test Writerside documentation - uses: JetBrains/writerside-checker-action@v1 - with: - instance: ${{ env.WRS_INSTANCE }} - - - name: Unzip Writerside artifact - uses: montudor/action-zip@v1 - with: - args: unzip -qq artifacts/${{ env.WRS_ARTIFACT }} -d ./public/docs/code - - - name: Remove unused files and folders + - name: Remove docs folder from repo run: | - sudo rm -rf artifacts git rm -rf docs - name: 'Deploy to Azure Web App' uses: azure/webapps-deploy@v2 id: deploy-to-webapp with: - app-name: 'unboundmnl-area-2-backend' + app-name: 'api-svfmc' slot-name: 'Production' publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} - package: . \ No newline at end of file + package: . diff --git a/.github/workflows/docs-cf-pages-publish.yml b/.github/workflows/docs-cf-pages-publish.yml new file mode 100644 index 0000000..6e446bb --- /dev/null +++ b/.github/workflows/docs-cf-pages-publish.yml @@ -0,0 +1,99 @@ +name: Publish Writerside and JSDoc documentation to Cloudflare Pages + +on: + push: + paths: + - 'docs/**' + - 'built_docs/**' + branches: + - main + - 'Sprint-[0-9]*' + - 'patch-[0-9]*' + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + name: Build documentation + runs-on: ubuntu-latest + env: + WRS_INSTANCE: docs/ucwa + WRS_ARTIFACT: webHelpUCWA2-all.zip + WRS_DOCKER_VERSION: 232.10275 + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Build jsdoc documentation + uses: andstor/jsdoc-action@v1 + with: + source_dir: . + recurse: true + output_dir: ./built_docs/jsdoc + + - name: Build Writerside docs using Docker + uses: JetBrains/writerside-github-action@v4 + with: + instance: ${{ env.WRS_INSTANCE }} + artifact: ${{ env.WRS_ARTIFACT }} + docker-version: ${{ env.WRS_DOCKER_VERSION }} + + - name: Upload Writerside documentation artifact + uses: actions/upload-artifact@v3 + with: + name: wrs_docs + path: | + artifacts/${{ env.WRS_ARTIFACT }} + artifacts/report.json + retention-days: 7 + + - name: Test Writerside documentation + uses: JetBrains/writerside-checker-action@v1 + with: + instance: ${{ env.WRS_INSTANCE }} + + - name: Unzip Writerside artifact + uses: montudor/action-zip@v1 + with: + args: unzip -qq artifacts/${{ env.WRS_ARTIFACT }} -d ./built_docs/handbook + + - name: Archive documentation + uses: actions/upload-artifact@v3 + with: + name: docs + path: built_docs + retention-days: 7 + + deploy: + name: Publish to Cloudflare Pages + runs-on: ubuntu-latest + needs: build + env: + CLOUDFLARE_PAGES_PROJECT_NAME: 'docs-svfmc' + permissions: + contents: read + deployments: write + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Download documentation + uses: actions/download-artifact@v3 + with: + name: docs + path: built_docs + + - name: Publish to Cloudflare Pages + uses: cloudflare/pages-action@1 + id: deploy-to-cloudflare-pages + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + projectName: ${{ env.CLOUDFLARE_PAGES_PROJECT_NAME }} + directory: built_docs + gitHubToken: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/built_docs/_redirects b/built_docs/_redirects new file mode 100644 index 0000000..18b4766 --- /dev/null +++ b/built_docs/_redirects @@ -0,0 +1 @@ +/ /handbook \ No newline at end of file diff --git a/docs/images/admin-officer-edit.png b/docs/images/admin-officer-edit.png new file mode 100644 index 0000000..5c72060 Binary files /dev/null and b/docs/images/admin-officer-edit.png differ diff --git a/docs/images/admin-password-tab.png b/docs/images/admin-password-tab.png new file mode 100644 index 0000000..b13dc5a Binary files /dev/null and b/docs/images/admin-password-tab.png differ diff --git a/docs/images/initial-deductions-toggle.png b/docs/images/initial-deductions-toggle.png new file mode 100644 index 0000000..d04267a Binary files /dev/null and b/docs/images/initial-deductions-toggle.png differ diff --git a/docs/images/interest-rate.png b/docs/images/interest-rate.png new file mode 100644 index 0000000..9df4605 Binary files /dev/null and b/docs/images/interest-rate.png differ diff --git a/docs/images/interest-toggle.png b/docs/images/interest-toggle.png new file mode 100644 index 0000000..e56e6b5 Binary files /dev/null and b/docs/images/interest-toggle.png differ diff --git a/docs/images/loan-and-deposit-settings.png b/docs/images/loan-and-deposit-settings.png new file mode 100644 index 0000000..f354ad4 Binary files /dev/null and b/docs/images/loan-and-deposit-settings.png differ diff --git a/docs/images/member-profile-create-btn.png b/docs/images/member-profile-create-btn.png new file mode 100644 index 0000000..5ba0db9 Binary files /dev/null and b/docs/images/member-profile-create-btn.png differ diff --git a/docs/images/member-profile-create-form.png b/docs/images/member-profile-create-form.png new file mode 100644 index 0000000..660bc3b Binary files /dev/null and b/docs/images/member-profile-create-form.png differ diff --git a/docs/images/member-profile-delete-btn.png b/docs/images/member-profile-delete-btn.png new file mode 100644 index 0000000..3563928 Binary files /dev/null and b/docs/images/member-profile-delete-btn.png differ diff --git a/docs/images/member-profile-delete-confirm.png b/docs/images/member-profile-delete-confirm.png new file mode 100644 index 0000000..adb6cbc Binary files /dev/null and b/docs/images/member-profile-delete-confirm.png differ diff --git a/docs/images/member-profile-deposits.png b/docs/images/member-profile-deposits.png new file mode 100644 index 0000000..ff38f06 Binary files /dev/null and b/docs/images/member-profile-deposits.png differ diff --git a/docs/images/member-profile-edit-btn.png b/docs/images/member-profile-edit-btn.png new file mode 100644 index 0000000..5d742a5 Binary files /dev/null and b/docs/images/member-profile-edit-btn.png differ diff --git a/docs/images/member-profile-edit-form.png b/docs/images/member-profile-edit-form.png new file mode 100644 index 0000000..66e9263 Binary files /dev/null and b/docs/images/member-profile-edit-form.png differ diff --git a/docs/images/member-profile-edit-success.png b/docs/images/member-profile-edit-success.png new file mode 100644 index 0000000..5c486fc Binary files /dev/null and b/docs/images/member-profile-edit-success.png differ diff --git a/docs/images/member-profile-loans.png b/docs/images/member-profile-loans.png new file mode 100644 index 0000000..3c1e218 Binary files /dev/null and b/docs/images/member-profile-loans.png differ diff --git a/docs/images/member-profile-navigation.png b/docs/images/member-profile-navigation.png new file mode 100644 index 0000000..eadafe5 Binary files /dev/null and b/docs/images/member-profile-navigation.png differ diff --git a/docs/images/member-profile-submit-btn.png b/docs/images/member-profile-submit-btn.png new file mode 100644 index 0000000..c4e0fc0 Binary files /dev/null and b/docs/images/member-profile-submit-btn.png differ diff --git a/docs/images/member-profile-success.png b/docs/images/member-profile-success.png new file mode 100644 index 0000000..88d719c Binary files /dev/null and b/docs/images/member-profile-success.png differ diff --git a/docs/images/member-profile.png b/docs/images/member-profile.png new file mode 100644 index 0000000..2c06935 Binary files /dev/null and b/docs/images/member-profile.png differ diff --git a/docs/images/notification-same-edit.png b/docs/images/notification-same-edit.png new file mode 100644 index 0000000..57aea3e Binary files /dev/null and b/docs/images/notification-same-edit.png differ diff --git a/docs/images/notification-settings.png b/docs/images/notification-settings.png new file mode 100644 index 0000000..209d9e1 Binary files /dev/null and b/docs/images/notification-settings.png differ diff --git a/docs/images/officer-password-edit-btn.png b/docs/images/officer-password-edit-btn.png new file mode 100644 index 0000000..1c1a058 Binary files /dev/null and b/docs/images/officer-password-edit-btn.png differ diff --git a/docs/images/officer-password-edit.png b/docs/images/officer-password-edit.png new file mode 100644 index 0000000..e507c33 Binary files /dev/null and b/docs/images/officer-password-edit.png differ diff --git a/docs/images/officer-profile-create-btn.png b/docs/images/officer-profile-create-btn.png new file mode 100644 index 0000000..1aed514 Binary files /dev/null and b/docs/images/officer-profile-create-btn.png differ diff --git a/docs/images/officer-profile-delete-btn.png b/docs/images/officer-profile-delete-btn.png new file mode 100644 index 0000000..89f7487 Binary files /dev/null and b/docs/images/officer-profile-delete-btn.png differ diff --git a/docs/images/officer-profile-delete-confirm.png b/docs/images/officer-profile-delete-confirm.png new file mode 100644 index 0000000..424b548 Binary files /dev/null and b/docs/images/officer-profile-delete-confirm.png differ diff --git a/docs/images/officer-profile-form.png b/docs/images/officer-profile-form.png new file mode 100644 index 0000000..7b44cb8 Binary files /dev/null and b/docs/images/officer-profile-form.png differ diff --git a/docs/images/officer-profile-navigation.png b/docs/images/officer-profile-navigation.png new file mode 100644 index 0000000..e19be98 Binary files /dev/null and b/docs/images/officer-profile-navigation.png differ diff --git a/docs/images/officer-profile-success.png b/docs/images/officer-profile-success.png new file mode 100644 index 0000000..7baa23d Binary files /dev/null and b/docs/images/officer-profile-success.png differ diff --git a/docs/images/password-length.png b/docs/images/password-length.png new file mode 100644 index 0000000..b175be1 Binary files /dev/null and b/docs/images/password-length.png differ diff --git a/docs/images/password-requirements.png b/docs/images/password-requirements.png new file mode 100644 index 0000000..f37b0c4 Binary files /dev/null and b/docs/images/password-requirements.png differ diff --git a/docs/topics/Adding-Deposit-Ledger-Transaction.md b/docs/topics/Adding-Deposit-Ledger-Transaction.md index f1f7e5f..85ba280 100644 --- a/docs/topics/Adding-Deposit-Ledger-Transaction.md +++ b/docs/topics/Adding-Deposit-Ledger-Transaction.md @@ -1,3 +1,5 @@ # Adding Deposit Ledger Transaction -Start typing here... \ No newline at end of file +To add a deposit transaction, click the ___Add New Transaction___ button found at the bottom of the deposit ledger. + +From there, fill in the fields. Click on the ___Submit___ button when you are done, and it will immediately be reflected to the system. \ No newline at end of file diff --git a/docs/topics/Adding-Loan-Ledger-Transaction.md b/docs/topics/Adding-Loan-Ledger-Transaction.md index 3e92d15..e2dfbf0 100644 --- a/docs/topics/Adding-Loan-Ledger-Transaction.md +++ b/docs/topics/Adding-Loan-Ledger-Transaction.md @@ -1,3 +1,13 @@ # Adding Loan Ledger Transaction -Start typing here... \ No newline at end of file +To add a loan transaction, click the ___Add New Transaction___ button found at the bottom of the loan ledger. If the ___Add New Transaction___ button cannot be pressed, that could be due to the fact the loan has not been released. + +From there, you can pick whether you are encoding a: +- Payment + - To deduct from your outstanding balance. +- Dues + - To add from your outstanding balance. +- Balance Readjustment + - Purely for editing and readjusting the loanee's balance. + +Once you are done with the transaction, simply click the __submit__ button to submit it to the database, and it will be instantly reflected to the ledger. \ No newline at end of file diff --git a/docs/topics/Admin.md b/docs/topics/Admin.md index 6fd5475..bc6b802 100644 --- a/docs/topics/Admin.md +++ b/docs/topics/Admin.md @@ -1,5 +1,11 @@ # Admin +The Admin is the most powerful user of the application. They +oversee the officer accounts and the settings of the loans and deposits. +The admin has the liberty to create, delete, and change the passwords of the officer profiles. +The admin also has the same permissions as the officers in member creation and management alongside +the loan and deposit functionalities. + diff --git a/docs/topics/Changing-Password.md b/docs/topics/Changing-Password.md index 41fdb96..8c0dde9 100644 --- a/docs/topics/Changing-Password.md +++ b/docs/topics/Changing-Password.md @@ -1,5 +1,26 @@ # Changing Password +Changing a password is a fundamental feature for the security of the website especially considering that the website houses the personal information of the cooperative's members. + +Accordingly, the admin is able to change their own password as well as the passwords of the officers. + +The admin is able to change their own password in the dedicated tab. + +Changing password screenshot + +The passwords of the officers can be changed in the edit officer profile option in the officer profiles tab. + +Changing password screenshot + +To ensure a secure password, the initial password of a newly created officer profile alongside any new passwords for both the admin and any officer profile will have certain requirements, namely: A capital letter, a lowercase letter, a number, and a special character. + +Changing password screenshot + +It must also be at minimum 8 characters. + +Changing password screenshot + +Once the password has been changed, upon logging out, the new password will be in effect and will be used to log back in to the specific profile or the admin itself. diff --git a/docs/topics/Creating-New-Deposit.md b/docs/topics/Creating-New-Deposit.md index c24f3b7..9f62389 100644 --- a/docs/topics/Creating-New-Deposit.md +++ b/docs/topics/Creating-New-Deposit.md @@ -1,5 +1,27 @@ # Creating New Deposit +When creating a deposit application, you do not need to fill out all the fields. +The fields related to the member's information are required, but their information will be retrieved when you search for their profile. + + + +Search for a member by their name or username. + + +Click on the member's name to select them, or press +Enter or tab. +Member search result + + +Fill out the loan application form. + + +Click on the Submit button to submit the deposit application. + + + +Deposits do not need any approval, hence they are immediately reflected to the system once submitted. + diff --git a/docs/topics/Creating-a-Loan-Application.md b/docs/topics/Creating-a-Loan-Application.md index b5e0e49..a609a7a 100644 --- a/docs/topics/Creating-a-Loan-Application.md +++ b/docs/topics/Creating-a-Loan-Application.md @@ -4,6 +4,10 @@ When creating a loan application, you do not need to fill out all the fields. The fields related to the member's information are required, but their information will be retrieved when you search for their profile. +> You must [set up the Loan Application Form PDF](Server-Set-up-the-Loan-Application-Form-PDF.md) +> on the server before proceeding, if you haven't already. +{ style='warning' } + Search for a member by their name or username. @@ -42,6 +46,7 @@ You can find instructions on how to approve or reject a loan application at + @@ -57,3 +62,4 @@ You can find instructions on how to approve or reject a loan application at + diff --git a/docs/topics/Deposit-Dashboard.md b/docs/topics/Deposit-Dashboard.md index a1104a1..41d85c9 100644 --- a/docs/topics/Deposit-Dashboard.md +++ b/docs/topics/Deposit-Dashboard.md @@ -1,5 +1,25 @@ # Deposit Dashboard +Present in the __Deposit Dashboard__ page are all the loans present in the system. + +Each row contains information on a certain deposit. Information present are as follows: +- Deposit Category + - This can be categorized as: + - Share Capital + - Savings + - Time Deposit +- Deposit Holder; A button that can forward the user to the deposit holder's profile. +- Approval Date + +## Sorting, Filtering, and Searching + +Deposits are not sorted in any order, but it is possible to add you own sort. Adding your own sort can be done by clicking the header of the certain field you would like to toggle. An arrow would then appear, pointing up for ascending, and pointing down for descending. Clicking the header once again would remove the sorting of that specific header. Additionally, the search bar found on the top left of the deposits table can help filter specific fields you wish to search. + +## Accessing the Deposit Ledger + +To access the deposit ledger of a specific deposit, find the deposit to view, navigate to the right most part of the deposit's row and find the arrow. This will forward you to the deposit's ledger page. + + diff --git a/docs/topics/Deposit-Ledger.md b/docs/topics/Deposit-Ledger.md index ee5c812..c1a9bbc 100644 --- a/docs/topics/Deposit-Ledger.md +++ b/docs/topics/Deposit-Ledger.md @@ -1,3 +1,29 @@ # Deposit Ledger -Start typing here... \ No newline at end of file +The loan ledger can be accessed through: + +* The [Deposit Dashboard](Deposit-Dashboard.md) +* Respective [Member Profile](Member-Profiles.md) + +The full contents of a deposit can be found in this page as well. The contents are as follows: +- Running Amount +- Deposit ID +- Type of Deposit + - This can be categorized into: + - Share Capital + - Savings + - Time Deposit +- Date of Deposit + +Below the loan info is the actual loan ledger. Per row, the information are as follows: +- Date of Payment +- GV/OR Number +- Transaction Type + - This can be categorized into + - Deposit + - Withdrawal +- Amount +- Interest +- Balance +- Date of Entry +- Officer in Charge \ No newline at end of file diff --git a/docs/topics/Deposits.md b/docs/topics/Deposits.md index 43eb3b7..92f005e 100644 --- a/docs/topics/Deposits.md +++ b/docs/topics/Deposits.md @@ -1,5 +1,10 @@ # Deposits +Loans can be viewed in two different ways: +* Through the [Deposit Dashboard](Deposit-Dashboard.md), which contains all deposits in the system +present in the system +* Through a [member's profile](Member-Profiles.md), which contains all deposits of that specific member. + diff --git a/docs/topics/Loan-Approval-Rejection.md b/docs/topics/Loan-Approval-Rejection.md index 99d62f3..245fd26 100644 --- a/docs/topics/Loan-Approval-Rejection.md +++ b/docs/topics/Loan-Approval-Rejection.md @@ -32,6 +32,7 @@ Its status will now be changed to Approved (for release). + @@ -47,3 +48,4 @@ Its status will now be changed to Approved (for release). + diff --git a/docs/topics/Loan-Dashboard.md b/docs/topics/Loan-Dashboard.md index ce7cc94..3ab4af5 100644 --- a/docs/topics/Loan-Dashboard.md +++ b/docs/topics/Loan-Dashboard.md @@ -1,9 +1,6 @@ # Loan Dashboard -The first thing you see once you enter the website is the ___Loan Dashboard___. -This page houses all loans found in the database that are accepted. - -![Dashboard Page](dashboard-page.png) +The first thing you see once you enter the website is the ___Loan Dashboard___. This page houses all loans found in the database that are accepted. Each row contains information on a certain loan. Information present are: - Type of Loan @@ -15,7 +12,7 @@ Each row contains information on a certain loan. Information present are: ## Sorting, Filtering, and Searching -Additionally, loans are sorted firstly by ___status___, then by ___due date___. Adding your own sort is possible by clicking the header of the certain field you would like to toggle. An arrow would then appear, pointing up for ascending, and pointing down for descending. Clicking the header once again would remove the sorting of that specific header. Also, the search bar found on the top right of the loan table can help filter specific fields you wish to search. +Additionally, loans are sorted firstly by ___status___, then by ___due date___. Adding your own sort is possible by clicking the header of the certain field you would like to toggle. An arrow would then appear, pointing up for ascending, and pointing down for descending. Clicking the header once again would remove the sorting of that specific header. Also, the search bar found on the top left of the loans table can help filter specific fields you wish to search. ## Signifiers @@ -43,18 +40,19 @@ For ___due date___, this corresponds with the colors found in the settings tab ( The amount of days for these colors to pop us as well is depending on the settings the ___admin___ has decided to put. -## Accessing the Loan Ledger - -To access the loan ledger of a specific loan, find the loan to view, navigate to the right most part of the loan's row and find the arrow. This will forward you to the loan's ledger page. - - +> [Adding a payment transaction](Adding-Loan-Ledger-Transaction.md) will have the loan considered +> as **paid** for the current period. Within 5 to 15 minutes of the transaction, the loan's due date +> will be updated to the next period. +## Accessing the Loan Ledger +To access the loan ledger of a specific loan, find the loan to view, navigate to the rightmost part of the loan's row and find the arrow. This will forward you to the loan's ledger page. + diff --git a/docs/topics/Loan-Ledger.md b/docs/topics/Loan-Ledger.md index cf9dd5d..e59af18 100644 --- a/docs/topics/Loan-Ledger.md +++ b/docs/topics/Loan-Ledger.md @@ -1,3 +1,52 @@ # Loan Ledger -Start typing here... \ No newline at end of file +The loan ledger can be accessed through: + +* The [Loan Dashboard](Loan-Dashboard.md) +* Respective [Member Profile](Member-Profiles.md) + +The full contents of a loan can be found in this page as well. The contents are as follows: +- Outstanding balance of the loan + - This is remaining balance needed to be paid +- Original loan amount + - This is the original loan amount that was applied for +- Loanee +- Loan ID +- Loan Approval Date + - Date the loan was accepted +- Type of Loan + - Can be categorized into: + - Emergency + - Multipurpose + - Educational + - Petty Cash + - Commerical + - Livelihood +- Term of Loan +- Mode of Payment + - Can be categorized into: + - Daily + - Weekly + - Monthly +- Coborrower Name +- Status + - Can be categorized into: + - Pending + - Approved + - Approved (For Release) + - Rejected + - Completed + +Below the loan info is the actual loan ledger. Per row, the information are as follows: +- Date of Transaction +- GV/OR Number +- Amount Due +- Amount Paid +- Balance +- Interest Due +- Interest Paid +- Fines Due +- Fines Paid +- Date of Entry +- Officer in Charge + diff --git a/docs/topics/Loan-and-Deposit-Settings.md b/docs/topics/Loan-and-Deposit-Settings.md index 3e44ffc..13f9797 100644 --- a/docs/topics/Loan-and-Deposit-Settings.md +++ b/docs/topics/Loan-and-Deposit-Settings.md @@ -1,5 +1,29 @@ # Loan and Deposit Settings +Accessible only to the Admin, the Loan and Deposit Settings provide the automation for the interest in both the loans and deposits. Each and every type of loan and type of deposit can be configured in this page. + +Loan and Deposit Settings screenshot + +The interest rate of both loans and deposits as well as the initial deductions in loans can be toggled as a percentage of the loan or deposit amount or as a fixed value. + +Loan and Deposit Settings screenshot + +The initial deductions are also toggleable in the sense that only the ones checked off will be activated despite there being values in the other initial deduction fields. + +Loan and Deposit Settings screenshot + +In such cases that the initial deductions have both a percentage and fixed . The cumulative initial deduction would be the (original loan amount * percent deduction) + fixed deduction. For example, a loan worth 5000 pesos has a 5% Service Fee and a 100 pesos Capital Build Up Fee. The initial deduction would then be equal to (5000 * 0.05) + 100 which is equivalent to 350 pesos. + +Apart from which, the frequency of the interest is toggleable among days, weeks, and months. So interest can be gained daily, weekly, or monthly. + +Loan and Deposit Settings screenshot + +Changing the settings is very simple, simply change the interest rate and the frequency as needed. Toggle on or off the necessary intiial deductions and submit. Keep in mind that the loans made prior to the setting change will be unaffected and only loans that are made after the change will follow the new settings. + + + + + diff --git a/docs/topics/Loans.md b/docs/topics/Loans.md index 031e9cb..72d0998 100644 --- a/docs/topics/Loans.md +++ b/docs/topics/Loans.md @@ -1,10 +1,9 @@ # Loans Loans can be viewed in two different ways: -* Through the [Loan Dashboard](Loan-Dashboard.md), which contains all loans +* Through the [Loan Dashboard](Loan-Dashboard.md), which contains all loans in the system present in the system -* Through a [member's profile](Member-Profiles.md), which contains all loans -of that specific member. +* Through a [member's profile](Member-Profiles.md), which contains all loans of that specific member. diff --git a/docs/topics/Marking-Loan-as-Released.md b/docs/topics/Marking-Loan-as-Released.md index 272af6a..cdcd67a 100644 --- a/docs/topics/Marking-Loan-as-Released.md +++ b/docs/topics/Marking-Loan-as-Released.md @@ -1,3 +1,7 @@ # Marking Loan as Released -Start typing here... \ No newline at end of file +When loans are approved from the __Pending Loans__ page, they must be released in order to add transactions. Loans can be seen as released at the __Loan Dashboard__ with a status of ___Approved (For Release)___ + +To do that, simply navigate to the loan ledger of the loan you wish to ___Mark Loan as Released___. There you will find a ___Mark Loan as Released___ button to the left of the ___Edit Loan___ button. If the ___Mark Loan as Released___ is not present in the page, the loan has already been marked as released. + +Pressing the ___Mark Loan as Released___ button will then forward you to a prompt asking if you are sure you want to mark the loan as released. Simply click ___Yes___, and the loan will be released, ready for transactions to be added. \ No newline at end of file diff --git a/docs/topics/Member-Profiles.md b/docs/topics/Member-Profiles.md index 30db0e7..d22ddaa 100644 --- a/docs/topics/Member-Profiles.md +++ b/docs/topics/Member-Profiles.md @@ -1,5 +1,90 @@ # Member Profiles +To create loan applications and deposits, a cooperative member must first have a **Member Profile**. + + +## Creating a Member Profile + + +Navigate to the Member Profiles page via the Navigation Drawer on the left. +Member profile navigation drawer button + + +Click the Create Member Profile button on the top right. +Member profile create button + + +Input the necessary information and click the Create Member Profile button once the information is complete. +Member profile creation form +Member profile submission button + + +You should see the newly created member profile on the Member Profiles page! +Member profile creation success + + + + + +On the Member Profiles page, you can edit any member profile by clicking the Edit button (indicated by the pencil icon). +Member profile edit button + + +Edit the necessary fields, then click Edit Member Profile to save the changes. +Member profile edit form +Member profile edit success + + + + + +On the Member Profiles page, you can delete any member profile by clicking the Delete button (indicated by the trash icon). +Member profile delete button + + +Confirm your decision by clicking the Delete Member button. Note: Deletions cannot be undone. Make sure your decision is final. + + + +## Viewing a Member Profile + +By clicking on the **circular arrow icon** to the side of a particular profile, you can view each member's individual profiles. Each registered cooperative member's profile displays the following: + +### Member Information +- Full Name +- Birthday +- Birthplace +- Gender +- Civil Status +- TIN Number +- Address + - Street + - Barangay + - City + - Province + +![Loan approval and rejection buttons](member-profile.png) + +### Member Loans +The list of loans can be sorted based on the following categories: +- Type of Loan +- Original Loan Amount +- Outstanding Balance +- Status +- Due Date + +![Loan approval and rejection buttons](member-profile-loans.png) + +### Member Deposits +The list of deposits can be sorted based on the following categories: +- Deposit Category +- Approval Date + +![Loan approval and rejection buttons](member-profile-deposits.png) + +## Visiting Loan and Deposit Ledgers +From the _Member Profile_ page, you can immediately visit any of the respective loans or deposits by clicking the `blue` arrow icon under the _View Loan Ledger_ button. + diff --git a/docs/topics/Notification-Settings.md b/docs/topics/Notification-Settings.md index 65e167e..fb3b27f 100644 --- a/docs/topics/Notification-Settings.md +++ b/docs/topics/Notification-Settings.md @@ -1,5 +1,13 @@ # Notification Settings +The notification settings is the page where the admin can edit the highlights on the due dates for the loans. +There are 5 categories of notifications as seen below: + +Notification Settings screenshot + +Editing the notification settings is as simple as changing the numbers and submitting. However, do note that the higher severity notifications must be smaller than the notifications below them. No two notifications can share the same time window nor can a lower severity notification have a smaller number than a higher severity loan. + +Notification Settings screenshot diff --git a/docs/topics/Officer-Profiles.md b/docs/topics/Officer-Profiles.md index 69fca0b..94ea0b9 100644 --- a/docs/topics/Officer-Profiles.md +++ b/docs/topics/Officer-Profiles.md @@ -1,5 +1,48 @@ # Officer Profiles +Before an officer can approve, reject, or manage loans, they must first have an **Officer Profile**. + + + +Navigate to the Officer Profiles page via the Navigation Drawer on the left. +Officer profile navigation drawer button + + +Click the Create Officer Profile button on the top right. +Officer profile create button + + +Input the necessary information and click the Create Profile button once the information is complete. +Officer profile creation form + + +You should see the newly created officer profile on the Officer Profiles page! +Officer profile creation success + + + + + +On the Officer Profiles page, the admin can change the password of any officer's account by clicking the Edit Password button (indicated by the pencil icon). +Officer password edit button + + +Enter and re-enter the new password, then click Change Password to save the changes. +Officer password edit form + + + + + +On the Officer Profiles page, you can delete any officer profile by clicking the Delete button (indicated by the trash icon). +Officer profile delete button + + +Confirm your decision by clicking the Delete Officer button. Note: Deletions cannot be undone. Make sure your decision is final. +Officer profile delete confirmation + + + diff --git a/docs/topics/Profiles.md b/docs/topics/Profiles.md index 64ba20a..b78b32a 100644 --- a/docs/topics/Profiles.md +++ b/docs/topics/Profiles.md @@ -1,5 +1,22 @@ # Profiles +Member and officer profiles are the foundation of the system. +There are two types of profiles: member profiles and officer profiles. + +## Officer Profiles + +Officer profiles are created by the system administrator. They are used to +authenticate officers, and to track their activity. + +The primary difference between member and officer profiles is that officer +profiles have a `role` field. This field is used to determine what permissions +the officer has. + +## Member Profiles + +Member profiles are created by an officer. Members cannot log in. The sole +purpose of member profiles is to store information about members. + diff --git a/docs/topics/Server-Set-up-the-Loan-Application-Form-PDF.md b/docs/topics/Server-Set-up-the-Loan-Application-Form-PDF.md new file mode 100644 index 0000000..70a755a --- /dev/null +++ b/docs/topics/Server-Set-up-the-Loan-Application-Form-PDF.md @@ -0,0 +1,64 @@ +# Server: Set up the Loan Application Form PDF + +In order to be able to create loan applications, you must first set up the loan +application form PDF on the server. + +It is recommended to use the latest version of Adobe Acrobat Pro to set up the +form as a fillable PDF. + +The created PDF must be placed in the server's `private` directory with the +filename `%loan-app-form-filename%`. + +## Form Fields + +Make sure the form fields are named exactly as they are in the table below. +Otherwise, the loan application form will not work. +Place the form fields correctly in the PDF. + +The following are the fields that must be included in the loan application form: + +| Field Name | Type | Description | +|------------------------------------------|-----------|--------------------------------------------------| +| `Date` | Text | The date the loan application was created. | +| `New` | Checkbox | Check this if the loan application is new. | +| `Renewal` | Checkbox | Check this if the loan application is a renewal. | +| `Term of Loan` | Text | The term of the loan. | +| `Amount` | Text | The amount of the loan. | +| `Emergency` | Checkbox | Check this if the loan is an emergency loan. | +| `Multi-Purpose` | Checkbox | Check this if the loan is a multi-purpose loan. | +| `Educational` | Checkbox | Check this if the loan is an education loan. | +| `Petty Cash` | Checkbox | Check this if the loan is a petty cash loan. | +| `Commercial` | Checkbox | Check this if the loan is a commercial loan. | +| `Livelihood` | Checkbox | Check this if the loan is a livelihood loan. | +| `Surname` | Text | The member's surname. | +| `Given Name` | Text | The member's first name. | +| `Middle Name` | Text | The member's middle name. | +| `Date of Birth` | Text | The member's date of birth. | +| `Age` | Text | The member's age. | +| `Place of Birth` | Text | The member's place of birth. | +| `Male` | Checkbox | Check this if the member is a male. | +| `Female` | Checkbox | Check this if the member is a female. | +| `Civil Status` | Text | The member's civil status. | +| `TIN` | Text | The member's TIN. | +| `Contact No` | Text | The member's contact number. | +| `Residence Address` | Text | The member's residence address. | +| `Monthly Income` | Text | The member's monthly income. | +| `Source of Income` | Text | The member's source of income. | +| `Spouse Surname` | Text | The member's spouse's surname. | +| `Spouse Given Name` | Text | The member's spouse's first name. | +| `Spouse Middle Name` | Text | The member's spouse's middle name. | +| `Spouse Date of Birth` | Text | The member's spouse's date of birth. | +| `Spouse Place of Birth` | Text | The member's spouse's place of birth. | +| `Spouse Age` | Text | The member's spouse's age. | +| `Spouse Source of Income` | Text | The member's spouse's source of income. | +| `Spouse Contact No` | Text | The member's spouse's contact number. | +| `Coborrower Surname` | Text | The coborrower's surname. | +| `Coborrower Given Name` | Text | The coborrower's first name. | +| `Coborrower Middle Name` | Text | The coborrower's middle name. | +| `Coborrower Date of Birth` | Text | The coborrower's date of birth. | +| `Coborrower Place of Birth` | Text | The coborrower's place of birth. | +| `Coborrower Age` | Text | The coborrower's age. | +| `Coborrower Source of Income` | Text | The coborrower's source of income. | +| `Coborrower Contact No` | Text | The coborrower's contact number. | +| `Coborrower Signature Over Printed Name` | Signature | The coborrower's signature over printed name. | +| `Borrower Signature Over Printed Name` | Signature | The member's signature over printed name. | \ No newline at end of file diff --git a/docs/ucwa.tree b/docs/ucwa.tree index e8ac2aa..bf47bc5 100644 --- a/docs/ucwa.tree +++ b/docs/ucwa.tree @@ -12,7 +12,9 @@ - + + + diff --git a/docs/v.list b/docs/v.list index 202c235..eb4cd49 100644 --- a/docs/v.list +++ b/docs/v.list @@ -9,4 +9,5 @@ + diff --git a/src/schedules/agenda.js b/src/schedules/agenda.js index 7ec3035..fffdbd2 100644 --- a/src/schedules/agenda.js +++ b/src/schedules/agenda.js @@ -16,7 +16,6 @@ import { DEFAULT_MONGODB_URI } from '../db/default_uri.js' const agenda = new Agenda({ ensureIndex: true, processEvery: '10 minutes', - // processEvery: '5 seconds', db: { address: process.env.MONGODB_URI || DEFAULT_MONGODB_URI } // TODO: Use existing mongoose connection }) diff --git a/src/schedules/jobs/loan-due-dates.js b/src/schedules/jobs/loan-due-dates.js index b7c4f02..c28b139 100644 --- a/src/schedules/jobs/loan-due-dates.js +++ b/src/schedules/jobs/loan-due-dates.js @@ -38,6 +38,6 @@ const handler = async (job, done) => { done() } -const every = '0 0 * * *' // Every 12:00 AM +const every = '*/15 * * * *' // Every 12:00 AM export default { name, handler, every }