Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
396c606
Farmer details: hide the association block when it has no entry
padovan Sep 1, 2026
c1df55e
docs: point project links at the agstack GitHub organisation
padovan Sep 1, 2026
27205a7
api: take the client base path from the environment
padovan Sep 1, 2026
0a5f202
i18n: add French (FR) as a supported language
padovan Sep 1, 2026
f9a3f4c
Farmer import: surface INVALID_GEODATA and add Geo Data / GeoID columns
padovan Sep 1, 2026
457fbc4
single-choice: accept a bound value input
padovan Sep 1, 2026
6bcf441
Plots: capture a centre point by clicking the map
padovan Sep 1, 2026
6886d2d
api: regenerate the client against the updated backend
padovan Sep 1, 2026
47595da
i18n: offer FR in the remaining language pickers
padovan Sep 1, 2026
e8ac836
rxjs: import Subject and BehaviorSubject from the package root
padovan Sep 1, 2026
b6b18f1
Farmers: only system and regional admins can add a farmer
padovan Sep 1, 2026
33a60e6
Orders: export order geo data and order history
padovan Sep 1, 2026
b1d0744
Stock: require a proof document on non-purchase orders
padovan Sep 1, 2026
17a1108
Config: read settings from a runtime env.js instead of a build-time file
padovan Sep 1, 2026
b4de459
Translation scripts: include French in the CSV round trip
padovan Sep 1, 2026
2a6a819
Add .vscode launch and task configuration
padovan Sep 1, 2026
9b7b0c4
Landing page copy keys added to every locale bundle
padovan Sep 1, 2026
af49740
auth: leave a commented-out login rewrite in place
padovan Sep 1, 2026
aadd21e
Local dev proxy points at cocoageotrack.cm
padovan Sep 1, 2026
6354e78
README: stray line break splits the word decoupled
padovan Sep 1, 2026
dfb5254
package.json: pin older mapbox-gl and change the build script
padovan Sep 1, 2026
eb5223e
Remove package-lock.json and add it to .gitignore
padovan Sep 1, 2026
c65eca6
Delete the .ci deployment files
padovan Sep 1, 2026
d3a9212
Add access.log
padovan Sep 1, 2026
664b392
docker-build.sh: normalize line endings to LF
padovan Sep 1, 2026
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
2 changes: 0 additions & 2 deletions .ci/.env

This file was deleted.

16 changes: 0 additions & 16 deletions .ci/docker-compose.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# Env files
/src/environments/environment.dev.ts
/src/assets/env.js

# compiled output
/dist
Expand Down Expand Up @@ -42,6 +43,7 @@ speed-measure-plugin*.json
npm-debug.log
yarn-error.log
testem.log
package-lock.json
/typings

# System Files
Expand Down
28 changes: 28 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Debug Angular",
"url": "http://localhost:4200",
"webRoot": "${workspaceFolder}",
"sourceMapPathOverrides": {
"webpack:/*": "${webRoot}/*",
"/./*": "${webRoot}/*",
"/src/*": "${webRoot}/src/*",
"/*": "*",
"/./~/*": "${webRoot}/node_modules/*"
},
"preLaunchTask": "npm: start"
},
{
"type": "node",
"request": "launch",
"name": "Debug Tests",
"program": "${workspaceFolder}/node_modules/jasmine/bin/jasmine.js",
"args": ["--config=spec/support/jasmine.json"],
"console": "integratedTerminal"
}
]
}
20 changes: 20 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "start",
"label": "npm: start",
"isBackground": true,
"problemMatcher": {
"owner": "typescript",
"pattern": "$tsc",
"background": {
"activeOnStart": true,
"beginsPattern": ".*",
"endsPattern": "Compiled successfully."
}
}
}
]
}
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@ digitalization of supply chains, connects every actor along the supply chain, as

Project is composed of 3 parts:

* [Angular frontend](https://github.com/INATrace/fe/tree/main)
* [Java backend](https://github.com/INATrace/backend/tree/main)
* [Coffee network](https://github.com/INATrace/coffee-network/tree/main)
* [Angular frontend](https://github.com/agstack/inatrace-frontend/tree/main)
* [Java backend](https://github.com/agstack/inatrace-backend/tree/main)
* [Coffee network](https://github.com/agstack/inatrace-coffee-network/tree/main)

# INATrace 2
This new major release includes new functionalities, refactorings, optimizations and bugfixes. The most important additions and changes are:
* Added support for generic value chains. Different value chains with it's specific settings can now be configured in the system.
* Multi-tenant system support.
* Reorganized the content in the Product section. This section now includes only the content that is related to a product.
* Introduced a new section "Company". This section includes all the content that is related with the company's work process within the value chain.
* The configuration of farmers and collectors is decoupled from the product, and it's part of the Company section.
* The configuration of farmers and collectors is dec
* oupled from the product, and it's part of the Company section.
* Added support for importing farmers from a provided Excel file.
* The company customers are now decoupled from the Stakeholders in the product section and are configured as part of the Company section.
* The configuration of facilities and processing actions is now part of the company's profile.
Expand Down Expand Up @@ -57,6 +58,12 @@ This new major release includes new functionalities, refactorings, optimizations

4. Generate API client from Java backend by running `npm run generate-api`

Also generate `src/assets/env.js`, which is gitignored because it carries per-environment
secrets — copy `src/assets/env.template.js` to it and fill in the values, or run
`envsubst < src/assets/env.template.js > src/assets/env.js` with the variables exported.
The app loads this file before the bundle and reads `window['env']` immediately, so it will
fail to start if the file is missing. `./deploy.sh frontend` generates it automatically.

5. Add development environment as `environment.dev.ts` by copying `environment.ts` and adding default values for configuration keys besides window environment (e.g. `environmentName: window['env']['environmentName'] || 'DEV'`)
1. `environmentName`: `'DEV'`
2. `appBaseUrl`: `'http://localhost:4200'`
Expand Down
2 changes: 2 additions & 0 deletions access.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
95.214.55.132 - - [11/Feb/2025:02:52:14 +0100] "GET / HTTP/1.1" 200 3522 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36 Edg/90.0.818.46"
95.214.55.132 - - [11/Feb/2025:05:43:06 +0100] "GET / HTTP/1.1" 200 3522 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36 Edg/90.0.818.46"
4 changes: 4 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"allowedCommonJsDependencies": [
"lodash","file-saver", "chart.js", "rxjs",
"batch-processor"
],
"assets": [
"src/assets",
{
Expand Down
8 changes: 8 additions & 0 deletions copy-translation-from-csv.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ const enLocaleFile = './src/assets/locale/en.json';
const deLocaleFile = './src/assets/locale/de.json';
const esLocaleFile = './src/assets/locale/es.json';
const rwLocaleFile = './src/assets/locale/rw.json';
const frLocaleFile = './src/assets/locale/fr.json';

var enJSON = JSON.parse(fs.readFileSync(enLocaleFile));
var deJSON = JSON.parse(fs.readFileSync(deLocaleFile));
var esJSON = JSON.parse(fs.readFileSync(esLocaleFile));
var rwJSON = JSON.parse(fs.readFileSync(rwLocaleFile));
var frJSON = JSON.parse(fs.readFileSync(frLocaleFile));

const readTranslations = readline.createInterface({
input: fs.createReadStream(csvFile),
Expand All @@ -27,16 +29,19 @@ readTranslations.on('line', (line) => {
de = splitLine[2];
es = splitLine[3];
rw = splitLine[4];
fr = splitLine[5];

let enData = enJSON.translations;
let rwData = rwJSON.translations;
let deData = deJSON.translations;
let esData = esJSON.translations;
let frData = frJSON.translations;

if (en) enData[id] = en;
if (de) deData[id] = de;
if (es) esData[id] = es;
if (rw) rwData[id] = rw;
if (fr) frData[id] = fr;

let outputJSONen = JSON.stringify(enJSON, null, 2);
fs.writeFileSync(enLocaleFile, outputJSONen);
Expand All @@ -50,4 +55,7 @@ readTranslations.on('line', (line) => {
let outputJSONrw = JSON.stringify(rwJSON, null, 2);
fs.writeFileSync(rwLocaleFile, outputJSONrw);

let outputJSONfr = JSON.stringify(frJSON, null, 2);
fs.writeFileSync(frLocaleFile, outputJSONfr);

});
7 changes: 5 additions & 2 deletions copy-translation-to-csv.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ const readline = require('readline');
const enLocaleFile = './src/assets/locale/en.json';
const deLocaleFile = './src/assets/locale/de.json';
const rwLocaleFile = './src/assets/locale/rw.json';
const frLocaleFile = './src/assets/locale/fr.json';
var enJSON = JSON.parse(fs.readFileSync(enLocaleFile));
var deJSON = JSON.parse(fs.readFileSync(deLocaleFile));
var rwJSON = JSON.parse(fs.readFileSync(rwLocaleFile));
var frJSON = JSON.parse(fs.readFileSync(frLocaleFile));
const csvFile = './src/assets/locale/translations-Table.txt'; //copy from google sheets to semicolon separated file and remove header

const readTranslations = readline.createInterface({
Expand Down Expand Up @@ -53,12 +55,13 @@ let changed = {};



csvString = "ID;English;German;Kinyarwanda" + "\n";
csvString = "ID;English;German;Kinyarwanda;french" + "\n";
for (let key of keys) {
csvString += key + ";"
csvString += enJSON.translations[key] + ";"
csvString += deJSON.translations[key] + ";"
csvString += rwJSON.translations[key] + "\n"
csvString += rwJSON.translations[key] + ";"
csvString += frJSON.translations[key] + "\n"
}

var today = new Date();
Expand Down
Empty file modified docker-build.sh
100755 → 100644
Empty file.
5 changes: 4 additions & 1 deletion generate-api.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import { environment} from "./src/environments/environment";

var fs = require('fs');
var converter = require('api-spec-converter');
var child_process = require('child_process');
var fetch = require("node-fetch");

var swagger_docs_host = 'http://localhost:8080/v3/api-docs'
var swagger_docs_host = environment.basePath+ '/v3/api-docs';
const https = require('https');

function afterBuild(code) {
if (code === 0) {
Expand Down
Loading