Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sprint: Asset Management #6289

Closed
wants to merge 42 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
3d9d9d6
feat: add odk_central_integration tables
jniles Jan 17, 2022
71e4633
chore: move to odk-central lib
jniles Jan 18, 2022
39206f7
chore: update deps for odk central API
jniles Jan 18, 2022
168fb52
refactor(Assets as lots)
lomamech Jan 18, 2022
f91f7e5
Add table lot_asset
lomamech Jan 18, 2022
de7d4d0
test(Inventory)
lomamech Jan 18, 2022
c42af01
feat: add odk settings page
jniles Jan 18, 2022
207e45e
Merge remote-tracking branch 'upstream/sprint-prosani' into sprint-pr…
jniles Jan 18, 2022
fb230c9
Merge pull request #6292 from jniles/sprint-prosani-create-stock-inve…
jniles Jan 18, 2022
e765382
chore(ci): use supported nodejs in semaphore
jniles Jan 19, 2022
1dc3db0
feat: show ODK Central status on page
jniles Jan 19, 2022
feb485d
fix: test user link
jniles Jan 19, 2022
ba18cf4
Display lot barcode feature
mbayopanda Jan 19, 2022
cb05740
Search by system barcode
mbayopanda Jan 19, 2022
8574d4d
Review recommendations
mbayopanda Jan 19, 2022
1a845fe
Adds option to refresh system barcodes
mbayopanda Jan 19, 2022
f6be00b
fix warning about not tracked by expiration
mbayopanda Jan 19, 2022
e5febb7
Merge pull request #6293 from mbayopanda/display-lot-barcode
mbayopanda Jan 19, 2022
ea60ba9
fix barcode route on the client
mbayopanda Jan 19, 2022
f2f4c5d
Merge pull request #6299 from mbayopanda/fix-route-on-client
mbayopanda Jan 19, 2022
33e7c52
wip: odk-central adds sync-depots
jniles Jan 19, 2022
5a06ac9
fix: use cjs version of odk api
jniles Jan 19, 2022
cb025e1
Fixed Excel export issues for the Lots registry
jmcameron Jan 19, 2022
78bba38
sync user and app user with odk central
mbayopanda Jan 20, 2022
897c071
Add the project name
mbayopanda Jan 20, 2022
9dbc6dd
chore: finalize lot/transfer CSV files
jniles Jan 19, 2022
d290e3a
feat(odk): add pv-reception form + logic
jniles Jan 20, 2022
52f33e4
wip: importing ODK submissions
jniles Jan 20, 2022
bdf1caa
Add constraint behavior on swipe
mbayopanda Jan 20, 2022
c73eb50
fix: update pv-reception to list all target depots
jniles Jan 20, 2022
fe8cc89
chore: add recompute code for lot barcodes
jniles Jan 20, 2022
484e121
Resolve conflit with main branch
lomamech Jan 20, 2022
e47734d
Feature: Manage Asset integration
lomamech Jan 20, 2022
202b434
Resolve conflict with main branch
lomamech Jan 20, 2022
02e3409
Clean and sanitaze code
lomamech Jan 20, 2022
e2bb4eb
Complete Data for test
lomamech Jan 20, 2022
c09c660
Update report entry stock: add Asset Integration
lomamech Jan 20, 2022
4290b72
Test: Update data form stock/data
lomamech Jan 20, 2022
47ae68b
Fixed more Stock excel exports
jmcameron Jan 20, 2022
b21b936
Merge remote-tracking branch 'upstream/master' into sprint-prosani
jniles Jan 21, 2022
e03c67b
fix typos and allow auto-send for odk
mbayopanda Jan 21, 2022
7ca4246
fix: add append to body
jniles Jan 21, 2022
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
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,8 @@
"globals" : {
"Chart" : true,
"angular" : true
},
"parserOptions": {
"ecmaVersion": 2020
}
}
8 changes: 4 additions & 4 deletions .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ blocks:
- nvm install $NODEJS_VERSION
- checkout
- 'echo "Testing node:$NODEJS_VERSION on mysql:$MYSQL_VERSION"'
- yarn
- yarn --ignore-engines
- 'yarn build:db'
- yarn build
- 'yarn test:server-unit'
Expand All @@ -66,9 +66,9 @@ blocks:
- '8'
- env_var: NODEJS_VERSION
values:
- '12'
- '14'
- '16'
- 'node'

- name: Install Testing Matrix
dependencies: ["Update Dependencies"]
Expand Down Expand Up @@ -109,7 +109,7 @@ blocks:
- nvm install $NODEJS_VERSION
- checkout
- 'echo "[Installation] Testing node:$NODEJS_VERSION on mysql:$MYSQL_VERSION"'
- yarn
- yarn --ignore-engines
- yarn build
- bash ./sh/install-tests.sh
matrix:
Expand All @@ -118,6 +118,6 @@ blocks:
- '8'
- env_var: NODEJS_VERSION
values:
- '12'
- '14'
- '16'
- 'node'
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ RUN apt-get update && apt-get install -y \

# ENV NODE_ENV=production
ENV YARN_VERSION 1.22.17
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD 1
#ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD 1
RUN yarn policies set-version $YARN_VERSION
ENV CHROME_BIN /usr/bin/chromium
#ENV CHROME_BIN /usr/bin/chromium
#ENV PUPPETEER_EXECUTABLE_PATH /usr/bin/chromium

# define working directory inside the container
WORKDIR /usr/src/app
Expand All @@ -32,6 +33,9 @@ COPY .env bin/
# change directory to the bin diretory
WORKDIR /usr/src/app/bin/

# make sure the node user is the owner of all the underlying files.
RUN chown -R node:node *

# ensure this container runs as the user "node"
USER node

Expand Down
Binary file added client/src/assets/pv-reception.xlsx
Binary file not shown.
3 changes: 3 additions & 0 deletions client/src/i18n/en/form.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"CANCEL_EDIT": "Cancel Edit",
"CASHBOX_MANAGEMENT": "Cashbox Management",
"CLEAR": "Clear",
"SYNC" : "Sync",
"CLEAR_GRID_CONFIGURATION": "Clear Grid Configuration",
"CLOSE": "Close",
"COLLAPSE_RECORDS" : "Collapse Records",
Expand Down Expand Up @@ -910,6 +911,7 @@
"CASHBOX": "Enter the cashbox",
"CHOICE_FILTER": "Choice Filter",
"CODE": "Enter code",
"CONDITION": "Condition",
"COUNTRY": "Enter country",
"CREDITOR": "Enter creditor",
"CURRENCY": "Select currency",
Expand All @@ -919,6 +921,7 @@
"DEFAULT_PURCHASE_ORDER_INTERVAL": "The default purchase order interval for calculating Maximum stock",
"DESCRIPTION": "Enter description",
"DOCUMENT_NAME": "Enter document name",
"ORIGIN": "Origin",
"PATIENT_GROUP": "Enter patient group",
"EMAIL": "Enter email",
"LOT":"Enter Batch Number",
Expand Down
1 change: 1 addition & 0 deletions client/src/i18n/en/inventory.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"EDIT_METADATA": "Edit inventory",
"EDIT_TYPE": "Edit inventory type",
"EDIT_UNIT": "Edit inventory unit form",
"IS_IT_ASSET": "Is it an asset",
"ELEMENT": "Element",
"PRICE_LIST_REPORT": "Inventory Prices Report",
"PRICES": "Inventory Prices",
Expand Down
24 changes: 24 additions & 0 deletions client/src/i18n/en/odk.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"ODK" : {
"LOAD_FOSA_DATA" : "Load data of FOSA",
"TOTAL_FOUND" : "Total records found",
"NO_RECORD_FOUND" : "No record found",
"IMPORTED_SUCCESSFULLY" : "Records successfully imported",
"ODK_CENTRAL_URL" : "ODK Central Server URL",
"ODK_ADMIN_USER" : "ODK Central Admin Email",
"ODK_ADMIN_PASSWORD" : "ODK Central Admin Password",
"SYNC_SETTINGS" : "Synchronization Settings",
"SYNC_ENTERPRISE" : "Synchronize enterprise settings",
"SYNC_USERS" : "Synchronize users",
"SYNC_FORMS" : "Synchronize forms",
"SYNC_SUBMISSIONS" : "Synchronize submissions",
"CONFIG_SETTINGS" : "ODK Central Configuration",
"PROJECT_DETAILS" : "Project Details",
"PROJECT_ID" : "Project ID",
"PROJECT_FORMS" : "Number of Forms",
"PROJECT_NAME" : "Project Name",
"QRCODE" : "ODK QR Code",
"SHOW_QRCODE" : "Show QR Code",
"TOTAL_APP_USERS" : "Number of App Users"
}
}
1 change: 1 addition & 0 deletions client/src/i18n/en/report.json
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@
"EXIT_REPORT": "Stock Exit Report",
"EXIT_REPORT_DESCRIPTION": "This report shows stock exits which had occurred in different depots",
"INCLUDE_AGGREGATE_CONSUMPTION": "Include aggregate consumption",
"INCLUDE_ASSET_INTEGRATION_ENTRY": "Include entries from assets integrations",
"INCLUDE_INFORMATION": "Information to include",
"INCLUDE_PATIENT_EXIT": "Include stock exit to patient",
"INCLUDE_SERVICE_EXIT": "Include stock exit to service",
Expand Down
37 changes: 35 additions & 2 deletions client/src/i18n/en/stock.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
{
"STOCK" : {
"ALERT" : "Alert",
"ASSET" : {
"ABT_INVENTORY_NO" : "Abt Inventory No",
"CONDITION" : "Condition",
"CONDITION_TYPE" : {
"DAMAGED" : "Damaged",
"GOOD" : "Good",
"LOST" : "lost"
},
"ORIGIN" : "Origin",
"PURCHASE_ORDER" : "Purchase Order",
"VENDOR" : "Vendor"
},
"USE_OF_STOCK_WAC" : "Use of the value in stock of the product (Weighted Average Cost)",
"WAC_NOTIFICATION" : "The current value of the product in stock is",
"DO_NOT_EXIST_BEFORE_ACCOUNTING_SETUP":"Does not exist because the movement of stock was made before the implementation of stock accounting",
Expand Down Expand Up @@ -38,6 +50,7 @@
"PRODUCTS_IN_OVERSTOCK" : "Products in overstock"
},
"DAYS_OF_STOCK_OUT" : "# Days of Stock Out",
"DAYS_UNTIL_STOCK_OUT" : "Days until stock out",
"DECREASE" : "Decrease",
"DECREASE_HELP" : "Adjust stock by decreasing the quantity of lots of products in stock",
"DEPOT" : "Depot",
Expand All @@ -51,6 +64,7 @@
"DUPLICATE_LOT_ORDER": "A lot with this label has already been added",
"EMPTY" : "You do not have any stock in your depot",
"ENTRY" : "Stock Entry",
"ENTRY_ASSET_INTEGRATION" : "Asset",
"ENTRY_DATE" : "Entry Date",
"ENTRY_DATE_TOOLTIP" : "Date of earliest entry",
"ENTRY_DOCUMENT" : "Entry Document",
Expand All @@ -68,6 +82,10 @@
"AND_MORE" : "... and {{left}} more",
"TRACK_CONSUMPTION":"Track consumption",
"TRACK_EXPIRATION":"Track expiration",
"SCAN_BARCODE_LOT": "Scan barcode for lot",
"SCAN_BARCODE_INVENTORY": "Scan barcode for inventory",
"SCAN_SYSTEM_BARCODE": "Scan the system barcode",
"REFRESH_SYSTEM_BARCODES": "Refresh system barcodes",
"ERRORS" : {
"NO_ROWS" : "Must have at least one row in the grid.",
"MISSING_LOT_NAME" : "Missing Lot Identifier",
Expand Down Expand Up @@ -132,7 +150,7 @@
"UPLOAD_SUCCESS" : "Stock imported successfully",
"UPLOAD_DATE_REQUIRED" : "Define the importation date please"
},
"CMM" : "CMM",
"CMM" : "AMC",
"CURRENT_QUANTITY" : "Current Quantity",
"INPUT" : "Input",
"INTEGRATION" : "Integration",
Expand All @@ -148,6 +166,8 @@
"LOT_NOT_FOUND" : "That lot was not found!",
"MAXIMUM" : "Maximum Stock",
"MINIMUM" : "Minimum Stock",
"MAX_STOCK_DATE" : "Last date stock is usable",
"MIN_STOCK_DATE" : "First date to use stock",
"MONTH" : "Stock Months",
"MONTHLY_CONSUM" : "Average Monthly Consumption",
"MONTH_OF_STOCK" : "Stock Months - Months until Stock Out",
Expand Down Expand Up @@ -179,6 +199,7 @@
"DIRECTION": " Movement direction",
"LOSS_DISTRIBUTION" : "Stock Loss",
"MIN_MONTHS_SECURITY_STOCK" : "Min Months Security Stock",
"MONTHS_REMAINING": "Months Remaining",
"MOTIF" : "Motive",
"MOVEMENT" : "Movement",
"MOVEMENTS" : "Movements",
Expand Down Expand Up @@ -209,6 +230,7 @@
"RECEIPT" : {
"ADJUSTMENT" : "Adjustment",
"AGGREGATE_CONSUMPTION" : "Stock exit - Aggregate consumption",
"ENTRY_ASSET_INTEGRATION" : "Stock Entry - Asset Integration",
"ENTRY_DEPOT" : "Stock Entry from another depot",
"ENTRY_DONATION" : "Stock Entry - Donation",
"ENTRY_PURCHASE" : "Stock Entry - Purchase",
Expand All @@ -221,10 +243,12 @@
"EXIT_LOSS" : "Stock exit to loss"
},
"RECEIVER" : "Receiver",
"RECEPTION_ASSET_INTEGRATION" : "Asset Entry by Integration",
"RECEPTION_TRANSFER" : "Transfer",
"RECEPTION_DESCRIPTION" : "Stock Reception",
"RECEPTION_INTEGRATION" : "Stock Entry by Integration",
"RECEPTION_DONATION" : "Stock Entry from a donation",
"REFILL_QUANTITY" : "Refill Quantity",
"REQUIRES_PO" : "Requires a purchase order",
"RESPONSIBLE" : "Stock Manager",
"RISK_OF_EXPIRATION" : "Risk of expiration",
Expand Down Expand Up @@ -262,9 +286,14 @@
"TOGGLE_EXPIRED_STOCK" : "Show expired lots?",
"TOGGLE_EXPIRED_STOCK_HELP_TEXT" : "This will add a filter on lots that are expired.",
"TOGGLE_EXPIRY_RISKS" : "Show the lots with expiry risks?",
"TOGGLE_EXPIRY_RISKS_HELP_TEXT" : "This will display the lots at risk, whose average monthly consumption will not allow total consumption before the expiration date."
"TOGGLE_EXPIRY_RISKS_HELP_TEXT" : "This will display the lots at risk, whose average monthly consumption will not allow total consumption before the expiration date.",
"WAC" : "Weighted Avgerage Cost"
},
"SETTINGS" : {
"CONSUMPTION_AND_REORDER_SETTINGS" : "Stock Consumption and Reorder Settings",
"ACCOUNTING_INTEGRATION_SETTINGS" : "Stock Accounting Integration",
"ODK_INTEGRATION_SETTINGS" : "ODK Integration Settings",
"OTHER_SETTINGS" : "Other Settings",
"DEFAULT_MIN_MONTHS_SECURITY_STOCK": "Default minimum number of months of security stock for depots",
"DEFAULT_MIN_MONTHS_SECURITY_STOCK_HELP_TEXT": "The stock supply should provide at least this many months of stock for the depot involved.",
"DEFAULT_PURCHASE_ORDER_INTERVAL" : "Default Purchase order interval (In Month)",
Expand All @@ -291,6 +320,7 @@
"STOCK_FLUX" : {
"ALL_DESTINATION" : "All Destinations",
"AGGREGATE_CONSUMPTION" : "Aggregate consumption",
"FROM_ASSET_INTEGRATION" : "Asset Integration",
"FROM_PURCHASE" : "From Purchase Order",
"FROM_OTHER_DEPOT" : "From Depot",
"FROM_ADJUSTMENT" : "Adjustment (Positive)",
Expand Down Expand Up @@ -322,6 +352,9 @@
"FIND_DUPLICATE_LOTS" : "Find duplicate lots",
"MERGE_DUPLICATE_LOTS" : "Merge duplicate lots",
"SHOW_LOT_SCHEDULE": "Show lot consumption schedule",
"BARCODE": "Barcode",
"SHOW_BARCODE": "Show barcode",
"BARCODE_FOR_LOT": "Barcode for the lot",
"SUCCESSFULLY_EDITED":"Lot updated with success",
"ASSIGNMENT_HISTORIC":"Assignment History",
"ASSIGNMENT_CURRENT":"Current",
Expand Down
1 change: 1 addition & 0 deletions client/src/i18n/en/tree.json
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@
"STOCK_REPORT" : "Stock Inventories",
"STOCK_REQUISITION":"Requisition",
"STOCK_SETTINGS": "Stock Settings",
"ODK_SETTINGS" : "ODK Settings",
"STOCK" : "Stock",
"STOCK_VALUE" : "Stock Value Report",
"SUBSIDY" : "Subsidy Management",
Expand Down
3 changes: 3 additions & 0 deletions client/src/i18n/fr/form.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"BACK": "Précédent",
"BREAKDOWNS_PERCENTAGES": "Ventilation en pourcentage",
"CANCEL": "Annuler",
"SYNC" : "Synchroniser",
"CANCEL_EDIT": "Annuler Modifier",
"CASHBOX_MANAGEMENT": "Gestion des Caisses",
"CLEAR": "Effacer",
Expand Down Expand Up @@ -912,6 +913,7 @@
"CHOICE_FILTER": "Filtre",
"CODE": "Entrer le code",
"COUNTRY": "Entrer le nom du pays",
"CONDITION": "Condition",
"CREDITOR": "Entrer un Créditeur",
"CURRENCY": "Sélectionner la monnaie",
"DEBTOR": "Entrer un Débiteur",
Expand All @@ -928,6 +930,7 @@
"MAX_CREDIT": "Entrer le crédit maximale",
"NAME": "Entrer le nom",
"NOTES": "Commentaire",
"ORIGIN": "Origine",
"PASSWORD": "Entrer le mot de passe",
"PATIENT_ID": "Entrer identifiant patient",
"PATIENT_NAME": "Entrer nom patient",
Expand Down
1 change: 1 addition & 0 deletions client/src/i18n/fr/inventory.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"EDIT_METADATA": "Modifier l'Inventaire",
"EDIT_TYPE": "Modifier Types d'inventaires",
"EDIT_UNIT": "Modifier Forme d'inventaires",
"IS_IT_ASSET": "Est ce un actif",
"ELEMENT": "Élément",
"PRICE_LIST_REPORT": "Rapport des prix des articles et services",
"PRICES": "Tarification",
Expand Down
24 changes: 24 additions & 0 deletions client/src/i18n/fr/odk.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"ODK" : {
"LOAD_FOSA_DATA" : "Chargement des données des FOSA",
"TOTAL_FOUND" : "Total des enregistrements trouvés",
"NO_RECORD_FOUND" : "Aucun enregistrement trouvé",
"IMPORTED_SUCCESSFULLY" : "Données importées avec succès",
"ODK_CENTRAL_URL" : "URL du serveur ODK Central",
"ODK_ADMIN_USER" : "Adressse mail de l'administrateur",
"ODK_ADMIN_PASSWORD" : "Mot de passe de l'administrateur",
"SYNC_ENTERPRISE" : "Synchroniser les paramètres d'entreprise",
"SYNC_USERS" : "Synchroniser les utilisateurs",
"SYNC_FORMS" : "Synchroniser les formulaires",
"SYNC_SUBMISSIONS" : "Synchroniser les soumissions des formulaires",
"SYNC_SETTINGS" : "Synchroniser les paramètres",
"CONFIG_SETTINGS" : "ODK Central Configuration",
"PROJECT_DETAILS" : "Détails du projet",
"PROJECT_ID" : "ID Projet",
"PROJECT_FORMS" : "Nombre de formulaire",
"PROJECT_NAME" : "Nom du projet",
"QRCODE" : "ODK QR Code",
"SHOW_QRCODE" : "Afficher QR Code",
"TOTAL_APP_USERS" : "Nombre des utilisateurs mobiles"
}
}
1 change: 1 addition & 0 deletions client/src/i18n/fr/report.json
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@
"STOCK_ON_HAND" : "Stock disponible",
"EXIT_REPORT" : "Rapport des sorties de stocks",
"EXIT_REPORT_DESCRIPTION" : "Ce rapport affiche les sorties de stock qui ont eu lieu dans different dépôts",
"INCLUDE_ASSET_INTEGRATION_ENTRY": "Inclure les intégrations des actifs",
"INCLUDE_AGGREGATE_CONSUMPTION": "Inclure les consommations agrégées",
"INCLUDE_INFORMATION" : "Information à inclure",
"INCLUDE_PATIENT_EXIT" : "Inclure les distributions vers les patients",
Expand Down
Loading