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

[TM-1386] update reports statuses #534

Merged
merged 1,140 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
1140 commits
Select commit Hold shift + click to select a range
12a4497
[TM-1144] add validation for null extra info
egrojMonroy Jul 30, 2024
a7254cb
[TM-1144] round decimals
egrojMonroy Jul 30, 2024
6d0c455
[TM-1104] Fix Pitch model if organization is null
egrojMonroy Jul 30, 2024
c6e12fe
[TM-1146] Fix Pitch model if organization is null
egrojMonroy Jul 30, 2024
dac46eb
Merge branch 'fix/TM-1104-fix-pitch-model' of https://github.com/wri/…
egrojMonroy Jul 30, 2024
9271286
Merge pull request #376 from wri/fix/TM-1144-optional-values
egrojMonroy Jul 30, 2024
69b749e
[TM-1144] reorder functions to get valid schema data for polygons
cesarLima1 Jul 31, 2024
488cbd3
[TM-1144] update validation function
cesarLima1 Jul 31, 2024
2565e3b
[TM-1144] make lint fix
cesarLima1 Jul 31, 2024
c7cf7ff
Merge pull request #379 from wri/feat/TM-1144-move-function
cesarLima1 Jul 31, 2024
db0e89b
Merge pull request #377 from wri/fix/TM-1104-fix-pitch-model
egrojMonroy Jul 31, 2024
7d866c5
[TM-1123] remove decimals for estimated area
egrojMonroy Jul 31, 2024
735b44b
[TM-1123] remove unneesary values of round
egrojMonroy Jul 31, 2024
752624e
[TM-1136] feat: add logic to upload replacement polygons (#380)
LimberHope Jul 31, 2024
6b56763
Merge pull request #381 from wri/fix/TM-1123-remove-decimals
egrojMonroy Jul 31, 2024
a981b7a
[TM-1136] fix: reassigning site uuid (#382)
LimberHope Aug 1, 2024
0510992
[TM-1136,1130] save properties loaded (#383)
LimberHope Aug 1, 2024
62ab7bf
fix: issue searching site reports by site name
Scriptmatico Aug 2, 2024
87e90b4
[TM-1181] fix: add docker-compose to github action (#389)
pachonjcl Aug 5, 2024
a272227
[TM-1104] include project pitch uuid in form submission request (#384)
cesarLima1 Aug 5, 2024
b9ca115
[TM-1180] add default value (#388)
LimberHope Aug 5, 2024
b496e73
[TM-1042] add fields to site and project resources (#386)
LimberHope Aug 5, 2024
2c4d04e
[TM-1179] revert approved on update geom (#390)
egrojMonroy Aug 5, 2024
92e7e02
Fix/tm 1179 onsaveattributes to submitted status (#391)
egrojMonroy Aug 7, 2024
9947613
Merge remote-tracking branch 'refs/remotes/origin/release/laudable-lo…
roguenet Aug 7, 2024
01715b2
Merge pull request #387 from wri/TM-778
roguenet Aug 7, 2024
753abcb
[TM-1103] Remove v1 User model.
roguenet Aug 7, 2024
2629117
[TM-1103] Remove uses of the "role" value on User
roguenet Aug 8, 2024
9d970b2
[TM-1103] Remove the unused AdminsController.
roguenet Aug 8, 2024
615d4c7
Merge pull request #366 from wri/feat/TM-1106-scheduling-system
roguenet Aug 9, 2024
32e4dba
Merge pull request #394 from wri/release/laudable-loquat
roguenet Aug 9, 2024
77dabbb
[TM-1103] Revamp unit tests and syncing of roles/permissions.
roguenet Aug 9, 2024
5056206
Merge pull request #397 from wri/main
roguenet Aug 9, 2024
809e815
Merge remote-tracking branch 'refs/remotes/origin/staging' into feat/…
roguenet Aug 9, 2024
d70ed0e
[TM-1189] when creating a new polygon version automatically set as ac…
LimberHope Aug 9, 2024
1c7b073
[TM-1103] Remove two obsolete uses of assignSpatieRole
roguenet Aug 9, 2024
30bfb8d
[TM-1103] Remove the role field from User.
roguenet Aug 10, 2024
c4499c8
[TM-1103] Update API docs
roguenet Aug 10, 2024
50117c3
[TM-1103] Include id on the user resource.
roguenet Aug 10, 2024
cc3b809
[TM 1177] polygon filter (#396)
egrojMonroy Aug 12, 2024
8cfe31f
[TM-1103] Update two other tables that had the old User class name em…
roguenet Aug 12, 2024
a6ed573
[TM-1176] add version_name field to site_polygon table and retain ori…
LimberHope Aug 12, 2024
cab2638
Merge pull request #398 from wri/feat/TM-1103-user-system
roguenet Aug 12, 2024
8f036be
fix: search functinality exists but pointing to a wrong property
Scriptmatico Aug 12, 2024
7510585
[TM-1103] Add TF Landscapes permissions.
roguenet Aug 12, 2024
4b6ab66
[TM-1103] Fix the name of the Enterprises framework.
roguenet Aug 12, 2024
a5e9cac
Merge pull request #400 from wri/TM-1134-fix-search-by-email-function…
Scriptmatico Aug 12, 2024
ab039b4
[TM-1155] Add a combined workday count metric.
roguenet Aug 12, 2024
7a93901
[TM-1174] get sitePolygon Uuids for active records (#401)
cesarLima1 Aug 13, 2024
4de372a
[TM-1204] add organisation to meAction by fetching it from db (#404)
pachonjcl Aug 13, 2024
690330e
Merge pull request #402 from wri/feat/TM-1103-add-TF-landscapes
roguenet Aug 13, 2024
b95ba90
[TM-1024] Re-instate the original myPrimaryOrganisation attribute.
roguenet Aug 13, 2024
088abda
Merge pull request #403 from wri/feat/TM-1155-workdays-calculation
roguenet Aug 13, 2024
d82b6e8
[TM-1185] add python script to clip overlapping polygons (#406)
egrojMonroy Aug 14, 2024
d44f694
Merge pull request #407 from wri/fix/TM-1204-my-organisation
roguenet Aug 14, 2024
13b668f
[TM-1023] Format seedings in a more useful way.
roguenet Aug 14, 2024
877b1d3
[TM-1186] add controller to delete audit log (#408)
LimberHope Aug 14, 2024
52b1b70
Merge pull request #409 from wri/feat/TM-1203-seedings-export-format
roguenet Aug 15, 2024
9bc79eb
[TM-1182] create a new version when edit polygon (#405)
LimberHope Aug 16, 2024
4bbe340
[TM-1200] remove upload file restriction size at code level (#410)
pachonjcl Aug 16, 2024
6a6ab00
[TM-1220] update nothing report when approve (#412)
LimberHope Aug 16, 2024
a540617
Feat/[TM 1185] clip polygons (#411)
egrojMonroy Aug 16, 2024
7eeb274
[TM-1182] return correct uuid (#413)
egrojMonroy Aug 19, 2024
26787d5
[TM-1185] reduce quantity of points for buffering (#414)
egrojMonroy Aug 19, 2024
c4fcd1f
[TM-1163] Add some delete logging when an admin deletes an entity.
roguenet Aug 19, 2024
1dc88ff
[TM-1072] add logic to create backdated reports (#393)
LimberHope Aug 19, 2024
ec17842
[TM-1172] modification me resource for exporting files based on role …
pachonjcl Aug 20, 2024
0e2cfa1
[TM-1157] add local engagement description to resource (#418)
LimberHope Aug 20, 2024
53efecd
[TM-1185] run validation on fixing polygon overlaps (#417)
cesarLima1 Aug 20, 2024
50b4d6e
Merge pull request #416 from wri/feat/TM-1163-soft-delete-logging
roguenet Aug 20, 2024
c2d135b
[TM-1230] Delete all related records when removing a Polygon (#419)
cesarLima1 Aug 20, 2024
568c84c
[TM-1171] fix: problem with exporting report based on roles (#421)
pachonjcl Aug 20, 2024
f98c163
[TM-1230] send correct variable as uuid (#422)
cesarLima1 Aug 20, 2024
6fa3938
[TM-1251] add update to approval stage (#426)
LimberHope Aug 22, 2024
131aec0
[TM-1072] Update the logic for report creation following further disc…
roguenet Aug 22, 2024
cd6ffe2
Merge pull request #427 from wri/feat/TM-1072-updated-report-creation…
roguenet Aug 22, 2024
157bbe8
Merge pull request #424 from wri/release/magnanimous-mahogany
roguenet Aug 22, 2024
5aa3e9b
Merge pull request #428 from wri/main
roguenet Aug 22, 2024
1cf1c3f
[TM-1198] bulk delete (#425)
egrojMonroy Aug 23, 2024
41180a7
[TM-1262] The string being passed in here is now the slug, not the ac…
roguenet Aug 23, 2024
7f8ec8e
Merge pull request #429 from wri/fix/TM-1262-entity-framework-export
roguenet Aug 23, 2024
91bb115
Merge pull request #430 from wri/release/magnanimous-mahogany-hotfix-…
roguenet Aug 23, 2024
8dc6704
Merge pull request #431 from wri/main
roguenet Aug 23, 2024
708c65c
[TM-1210] buffer voronoi (#432)
egrojMonroy Aug 26, 2024
9e57137
Feat/tm 1210 buffer voronoi (#433)
egrojMonroy Aug 28, 2024
eb3adbd
[TM-1210] increase buffer in voronoi (#434)
egrojMonroy Aug 28, 2024
30ad78c
[TM-1227] active requests for new users (#435)
LimberHope Aug 28, 2024
acce5fc
[TM-1211] add Hectares under restoration to project and site resource…
cesarLima1 Aug 29, 2024
21b4532
[TM-1201] remove boundary_geojson field from exports (#437)
cesarLima1 Aug 30, 2024
91e1baf
[TM-592] change url reset-password -> login and add organisation to n…
LimberHope Aug 30, 2024
21e1790
[TM-1263] Add a 'hidden' field to entity associated tables and a back…
roguenet Sep 3, 2024
fe33a5f
[TM-1263] Use the hidden field to exclude associated data from aggreg…
roguenet Sep 3, 2024
b0206fc
[TM-1263] Skip reporting on the hidden fields in the backfill.
roguenet Sep 3, 2024
ba2eb7f
[TM-1267] fix problem with comment duplication in audit log (#442)
pachonjcl Sep 4, 2024
5b03639
Merge pull request #439 from wri/feat/TM-1263-ignore-hidden-data
roguenet Sep 4, 2024
7f2b000
[TM-1286] remove est area limit, and add in message (#441)
egrojMonroy Sep 4, 2024
eb9db79
feat: add organisation filter
Scriptmatico Sep 4, 2024
4dddced
Merge pull request #443 from wri/TM-1190-add-organisation-filter
Scriptmatico Sep 4, 2024
b20624b
[TM-1195] Fix export reports on csv with accent issue (#440)
pachonjcl Sep 4, 2024
7818391
[TM-1263] Don't return hidden resources from the get for entity contr…
roguenet Sep 5, 2024
7430c79
Merge pull request #445 from wri/feat/TM-1263-ignore-hidden-data
roguenet Sep 5, 2024
bc66f63
Merge pull request #444 from wri/release/nimble-neem
roguenet Sep 5, 2024
da14083
Merge pull request #446 from wri/main
roguenet Sep 5, 2024
8049d1e
fix: error searching report by site name
Scriptmatico Sep 5, 2024
a0e6c0d
Feat/tm 1197 upload polygons new and versions (#449)
egrojMonroy Sep 6, 2024
24c9350
[TM-1267] duplication issue in audit log (#448)
LimberHope Sep 6, 2024
d42e354
[TM-1195] accent issue (#451)
LimberHope Sep 9, 2024
75a8c6f
2024.09.09-nimble-neem-hotfix-2024-09-29
pachonjcl Sep 9, 2024
fa97e0c
[TM-1237] Image Gallery Enhancement (#453)
cesarLima1 Sep 10, 2024
3f7f24e
Feat/tm 1197 upload polygons new and versions (#456)
egrojMonroy Sep 10, 2024
47e398e
[TM-1264] Validate 'demographics' key to prevent undefined array acce…
LimberHope Sep 10, 2024
6034c91
Merge pull request #447 from wri/TM-778-error-searching-report
Scriptmatico Sep 11, 2024
23e0255
[TM-437] feat: calculate restored trees for ppc (#458)
LimberHope Sep 11, 2024
9ea0bba
[TM-1290] add grouping points by sites (#450)
egrojMonroy Sep 12, 2024
5846145
[TM-578] store user locale preference for mail translations (#392)
pachonjcl Sep 12, 2024
aebb5b7
[TM-1238] Image attribute editor modal (#459)
cesarLima1 Sep 12, 2024
3c07117
[TM-1284] enable admins to remind (#460)
LimberHope Sep 12, 2024
10e2c00
[TM-1284] enable admins to remind (#461)
LimberHope Sep 12, 2024
8ec9837
[TM-578] change path for updating user locale (#462)
pachonjcl Sep 12, 2024
fb34e71
Search refactor for TM-1253, TM-1254, TM-1255, TM-1256, TM-1257
Scriptmatico Sep 12, 2024
b84b8e7
update code format
Scriptmatico Sep 13, 2024
da8f8e2
[TM-1197] add download by framework and all polygons in geojson (#464)
egrojMonroy Sep 13, 2024
11e7aa5
fix: fix where in
Scriptmatico Sep 13, 2024
74dba84
Merge pull request #463 from wri/TM-Search-Refactor-v1
Scriptmatico Sep 13, 2024
8fe7dd2
Feat/tm 1283 site estimated area (#465)
egrojMonroy Sep 16, 2024
dc50f9e
[TM-1197] Add site id validator in upload (#468)
egrojMonroy Sep 17, 2024
20dabd1
[TM-1284] save reminder in audit status log (#469)
LimberHope Sep 18, 2024
844a75a
[TM-1229] feat: generate email notification to project managers (#467)
LimberHope Sep 19, 2024
84c712b
[TM-1284] change subject to reminder notification (#471)
LimberHope Sep 19, 2024
cffcefb
Merge pull request #470 from wri/release/outstanding-oak
roguenet Sep 20, 2024
9966a99
Merge pull request #473 from wri/main
roguenet Sep 20, 2024
ac65cd9
[TM-1323] add migration for landscape in project (#472)
egrojMonroy Sep 23, 2024
591f81e
[TM-1188] update audit log to submit entity draft (#474)
LimberHope Sep 23, 2024
7a277eb
[TM-1308] add metadata to image (#475)
egrojMonroy Sep 23, 2024
22d6500
Refactor search in ProjectReport, SiteReport and NurseryReport
Scriptmatico Sep 24, 2024
f62c6b3
[TM-1320] Upload mp4 video (#478)
cesarLima1 Sep 25, 2024
9e0d42c
Disable full text search using scout
Scriptmatico Sep 26, 2024
31ed941
[TM-1291] add validate polygon and correct message (#477)
egrojMonroy Sep 26, 2024
0abb5c3
Merge pull request #476 from wri/TM-1258
Scriptmatico Sep 26, 2024
49737d6
[TM-1299] Add New Fields to Project + Site Reports for HBF (#481)
pachonjcl Sep 27, 2024
8f9e216
[TM-1332] rollback if no site id (#480)
egrojMonroy Sep 27, 2024
d15b18a
[TM-1299] add new fields to resource (#482)
LimberHope Sep 27, 2024
b0448da
[TM-1300] update all endpoints to new filters (#479)
LimberHope Sep 30, 2024
c848522
[TM-1307] Image gallery enhancement - Add fields in image attributes …
cesarLima1 Sep 30, 2024
1cbebb1
[TM-1306] add name to file gallery definition (#484)
cesarLima1 Oct 1, 2024
f483987
[TM-1335] change from int to decimal type in total_hectares_restored_…
cesarLima1 Oct 2, 2024
3ebe3a8
Feat/tm 1333 add checkbox multiselect (#485)
egrojMonroy Oct 2, 2024
8989949
[TM-1335] change from int to decimal type in hectares_to_restore_goal…
cesarLima1 Oct 3, 2024
52d2d4e
[TM-1127] add migration to create table delayed jobs
egrojMonroy Oct 3, 2024
9dc885b
[TM-1127] create job and move function insert to service
egrojMonroy Oct 3, 2024
8dd48b7
[TM-1127] start saving and runing jobs
egrojMonroy Oct 3, 2024
4ea4b8d
[TM-1357] remove unnecessary json_encode (#490)
LimberHope Oct 3, 2024
4e16894
[TM-1357] quotation marks around files (#491)
LimberHope Oct 4, 2024
7cf83ad
[TM-1127] receive correctly the error message in catch
egrojMonroy Oct 4, 2024
95f560a
[TM-1127] create job for validation
cesarLima1 Oct 4, 2024
13bb024
[TM-1127] fix names for post endpoinst validation
egrojMonroy Oct 4, 2024
6aa8dae
[TM-1357] Quotation marks around fields within exports (#492)
LimberHope Oct 4, 2024
baa89a8
Merge pull request #488 from wri/release/peaceful-palm
roguenet Oct 4, 2024
ffe4bb7
Merge pull request #494 from wri/main
roguenet Oct 4, 2024
a4f7678
[TM-582] add location_id to translat (#493)
LimberHope Oct 7, 2024
a146aad
[TM-582 change field type] (#495)
LimberHope Oct 7, 2024
712b59c
[TM-1127] start up job for polygon validations
cesarLima1 Oct 7, 2024
0675716
[TM-1127] create job with uuids for validations
egrojMonroy Oct 7, 2024
eb47615
[TM-1142] add form submission message translation (#496)
pachonjcl Oct 7, 2024
7a3d527
[TM-582] funding programme location translated (#497)
LimberHope Oct 8, 2024
46c897b
Merge branch 'staging' into feat/TM-1127-add-worker
cesarLima1 Oct 8, 2024
3d25bdd
[TM-1013] add command to update due dates to ppc reports (#498)
LimberHope Oct 8, 2024
b8f2bf1
[TM-1327] add fix to project level (#499)
egrojMonroy Oct 8, 2024
fe19470
[TM-1127] add geometry types validation
cesarLima1 Oct 8, 2024
d8bafcc
[TM-1127] astart adding fix worker and add validation types correct
egrojMonroy Oct 8, 2024
eeab515
[TM-1127] move clipoverlapping
egrojMonroy Oct 8, 2024
1067b8f
[TM-1127] add fix Job
egrojMonroy Oct 8, 2024
4bc7c7e
[TM-1127] job_uuid
egrojMonroy Oct 8, 2024
d95f309
[TM-1127] use job for fixing overlaps in polygons
cesarLima1 Oct 8, 2024
ed9810c
[TM-1127] add namespace to FixPolygonOverlapJob
cesarLima1 Oct 8, 2024
dc666e0
[TM-1127] update imports in FixPolygonOverlapJob
cesarLima1 Oct 8, 2024
9694f96
[TM-1127] add middleware to keep user in fix polygon job
egrojMonroy Oct 8, 2024
183ee7c
[TM-1127] add job to geojson and KML
egrojMonroy Oct 8, 2024
5a93f2c
[TM-1127] fix name error message in geom type
egrojMonroy Oct 8, 2024
a2e7477
[TM-1127] add status codes to import geom to DB
egrojMonroy Oct 8, 2024
e79b01c
[TM-1127] add status codes
egrojMonroy Oct 9, 2024
0afba26
[TM-1127] lint fix
egrojMonroy Oct 9, 2024
c6bca38
[TM-1127] remove comments
egrojMonroy Oct 9, 2024
1550ccb
[TM-882] Go ahead and import unbalanced collections.
roguenet Oct 9, 2024
95e8b16
Merge remote-tracking branch 'origin/staging' into feat/TM-882-bulk-i…
roguenet Oct 9, 2024
3978e7e
[TM-882] Comment fix.
roguenet Oct 9, 2024
14b7bb8
[TM-882] parseErrors is an array, not a collection.
roguenet Oct 9, 2024
da8fe12
Merge pull request #501 from wri/feat/TM-882-bulk-import-workdays
roguenet Oct 9, 2024
a57b2b8
[TM-1341] Add filters for dashboard endpoint (#502)
cesarLima1 Oct 10, 2024
e191884
[TM-1341] start up endpoint to get frameworks dynamically (#503)
cesarLima1 Oct 11, 2024
d000913
[TM-1343] endpoint to get data for popup country (#506)
egrojMonroy Oct 15, 2024
ddace22
[TM-1343] add endpoint list projects (#507)
egrojMonroy Oct 15, 2024
9fa0bb8
[TM-1342] use approved statuses for dashboard controller (#508)
cesarLima1 Oct 16, 2024
d8874e7
[TM-1344] add hectares under restoration (#505)
LimberHope Oct 16, 2024
e0a385e
[TM-1347] add tables to indicators (#509)
LimberHope Oct 16, 2024
8342a47
[TM-1341] add filter for frameworks (#510)
cesarLima1 Oct 16, 2024
912f056
feat: implement HBF
Scriptmatico Oct 16, 2024
ef61acd
feat: fix issue with function
Scriptmatico Oct 16, 2024
a0a1151
[TM-1310] update logic to due_at (#504)
LimberHope Oct 17, 2024
d3acdaa
[TM-1310] update due at (#514)
LimberHope Oct 17, 2024
21c0923
[TM-1368] complement logic to sumTotalWorkDaysAmount function (#515)
LimberHope Oct 17, 2024
1b28d48
fix: remove comment
Scriptmatico Oct 17, 2024
e3b0d37
Merge pull request #512 from wri/TM-1322
Scriptmatico Oct 18, 2024
3bf4089
[TM-1301] add validator for dates (#513)
egrojMonroy Oct 21, 2024
5372872
Merge pull request #511 from wri/release/queenly-queenwood
roguenet Oct 21, 2024
fda633c
Merge pull request #517 from wri/main
roguenet Oct 21, 2024
58e78f1
[TM-1405] add controller to hectares under restoration (#516)
LimberHope Oct 22, 2024
68a0c63
[TM-1378] add programme field to active projects (#518)
LimberHope Oct 22, 2024
490fa78
[TM-1343] add timeout variable in jobs
egrojMonroy Oct 23, 2024
83fd499
[TM-1127] add status code for fix overlapping
egrojMonroy Oct 23, 2024
e183809
Merge remote-tracking branch 'origin/staging' into feat/TM-1127-add-w…
roguenet Oct 23, 2024
9f95d99
[TM-1127] change values for delayed jobs migration
egrojMonroy Oct 24, 2024
7412493
[TM-1127] change values migration and remove useless functions
egrojMonroy Oct 24, 2024
1c87742
[TM-1127] remove unnecesary functinos and add resource
egrojMonroy Oct 24, 2024
d832784
[TM-1407] include framework (#519)
cesarLima1 Oct 24, 2024
012cf32
[TM-1127] add redis to insertGeojsonToDB, and create job before runni…
egrojMonroy Oct 25, 2024
ae45e8e
[TM-1127] create job before worker
egrojMonroy Oct 25, 2024
d7b515d
[TM-1127] fix difference in sending
egrojMonroy Oct 25, 2024
24c9b95
[TM-1127] reorder upload functions to prevent useless creations of jobs
egrojMonroy Oct 25, 2024
f859abe
[TM-1127] ove statuses values to Model
egrojMonroy Oct 25, 2024
ed79d92
[TM-1127] move redis delete to finally
egrojMonroy Oct 25, 2024
42f99eb
[TM-1127] ensure that redis is deleted after fail or success
egrojMonroy Oct 25, 2024
1bedaa2
[TM-1127] create worker only if job has been created
egrojMonroy Oct 25, 2024
b25e3e3
[TM-1127] add definition to delayedjobresponse
egrojMonroy Oct 25, 2024
c166799
[TM-1127] remove status on init, set pending as default
egrojMonroy Oct 25, 2024
f0a072e
[TM-1127] remove try catch
egrojMonroy Oct 25, 2024
38c676f
Roll back documentation changes; this system is going to work more li…
roguenet Oct 28, 2024
e863b45
[TM-1479] changes columns to table indicators (#520)
LimberHope Oct 28, 2024
4d3b1eb
[TM-1366] insert landscape data, create seeder and migration (#521)
egrojMonroy Oct 28, 2024
fb1453c
[TM-1479] finalize scripts and clarify questions (#522)
LimberHope Oct 28, 2024
81e1c34
[TM-1409] add multipolygon validation (#523)
egrojMonroy Oct 28, 2024
801e609
[TM-1404] avoid using duplicated iso countries (#524)
cesarLima1 Oct 28, 2024
5223c6f
[TM-1409] add valid types (#525)
egrojMonroy Oct 28, 2024
cf181bc
[TM-1127] restore value to test
egrojMonroy Oct 29, 2024
edbe2e6
[TM-1127] return error in catch
egrojMonroy Oct 29, 2024
35e9424
Merge branch 'feat/TM-1127-add-worker' of https://github.com/wri/wri-…
egrojMonroy Oct 29, 2024
65e64c8
[TM-1127] lint fix
egrojMonroy Oct 29, 2024
0e89130
Merge branch 'staging' into feat/TM-1127-add-worker
egrojMonroy Oct 29, 2024
c4de6a8
[TM-1407] add organization in response for top trees planted controll…
cesarLima1 Oct 29, 2024
008d57b
[TM-1353] Add in logic for the generation of HBF and TerraFund Enterp…
pachonjcl Oct 29, 2024
258ce1f
[TM-1379] finalize scripts and clarify questions (#530)
LimberHope Oct 29, 2024
0e459f1
[TM-1127] store correct string message as json
egrojMonroy Oct 29, 2024
27923e4
Merge pull request #500 from wri/feat/TM-1127-add-worker
roguenet Oct 29, 2024
739d9e9
[TM-1386] update reports statuses
egrojMonroy Oct 31, 2024
d961c65
[TM-1386] update reports statuses
egrojMonroy Oct 31, 2024
ce647b5
[TM-1386] lint
egrojMonroy Oct 31, 2024
9bd1f20
[TM-1386] lint
egrojMonroy Oct 31, 2024
80c0e93
[TM-1386] make command to approve but july,30
egrojMonroy Nov 1, 2024
346b463
Merge branch 'feat/TM-1386-bulk-approved' of https://github.com/wri/w…
egrojMonroy Nov 1, 2024
8ecfd34
[TM-1386] remove useless files
egrojMonroy Nov 4, 2024
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
71 changes: 71 additions & 0 deletions app/Console/Commands/BulkApproveProjects.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?php

namespace App\Console\Commands;

use App\Models\V2\Projects\Project;
use App\Models\V2\Projects\ProjectReport;
use App\Models\V2\Sites\SiteReport;
use App\Models\V2\Tasks\Task;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\File;
use Symfony\Component\Console\Helper\ProgressBar;
use Symfony\Component\Console\Output\ConsoleOutput;

class BulkApproveProjects extends Command
{
protected $signature = 'bulk-approve-projects {file}';

protected $description = 'Bulk approve projects from a CSV file';

public function handle(): void
{
$filePath = $this->argument('file');

if (! File::exists($filePath)) {
$this->error("CSV file not found at {$filePath}");

return;
}

$data = array_map('str_getcsv', file($filePath));
$header = array_shift($data);
$output = new ConsoleOutput();
$progressBar = new ProgressBar($output, count($data));
$progressBar->setFormat('Processing: %current% [%bar%] %percent:3s%%');

$progressBar->start();


$excludeDueDate = '2024-07-30';
foreach ($data as $row) {
$uuid = $row[0];

$project = Project::where('uuid', $uuid)->first();

if ($project) {
ProjectReport::where('project_id', $project->id)
->whereIn('status', ['awaiting-approval', 'needs-more-information'])
->whereDate('due_at', '!=', $excludeDueDate)
->update(['status' => 'approved']);

$sites = $project->sites;
foreach ($sites as $site) {
SiteReport::where('site_id', $site->id)
->whereIn('status', ['awaiting-approval', 'needs-more-information'])
->whereDate('due_at', '!=', $excludeDueDate)
->update(['status' => 'approved']);
}

Task::where('project_id', $project->id)
->whereIn('status', ['awaiting-approval', 'needs-more-information'])
->whereDate('due_at', '!=', $excludeDueDate)
->update(['status' => 'approved']);
}

$progressBar->advance();
}

$progressBar->finish();
$output->writeln("\nUpdate complete!");
}
}
65 changes: 65 additions & 0 deletions database/seeders/UpdateProjectStatusSeeder.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?php

namespace Database\Seeders;

use App\Models\V2\Projects\Project;
use App\Models\V2\Projects\ProjectReport;
use App\Models\V2\Sites\SiteReport;
use App\Models\V2\Tasks\Task;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\File;
use Symfony\Component\Console\Helper\ProgressBar;
use Symfony\Component\Console\Output\ConsoleOutput;

class UpdateProjectStatusSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run()
{
$filePath = __DIR__ . '/../../resources/seeds/bulk_approve_projects.csv';

if (! File::exists($filePath)) {
$this->command->error("CSV file not found at {$filePath}");

return;
}

$data = array_map('str_getcsv', file($filePath));
$header = array_shift($data);
$output = new ConsoleOutput();
$progressBar = new ProgressBar($output, count($data));
$progressBar->setFormat('Processing: %current% [%bar%] %percent:3s%%');

$progressBar->start();

foreach ($data as $row) {
$uuid = $row[0];

$project = Project::where('uuid', $uuid)->first();

if ($project) {
ProjectReport::where('project_id', $project->id)
->whereIn('status', ['awaiting-approval', 'needs-more-information'])
->update(['status' => 'approved']);

$sites = $project->sites;
foreach ($sites as $site) {
SiteReport::where('site_id', $site->id)
->whereIn('status', ['awaiting-approval', 'needs-more-information'])
->update(['status' => 'approved']);
}

Task::where('project_id', $project->id)
->whereIn('status', ['awaiting-approval', 'needs-more-information'])
->update(['status' => 'approved']);
}

$progressBar->advance();
}

$progressBar->finish();
$output->writeln("\nUpdate complete!");
}
}
84 changes: 84 additions & 0 deletions resources/seeds/bulk_approve_projects.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
TM Project UUID,Organization Name,Project Name
44c352fb-0581-4b97-92d7-6cbe459e13d0,EcoFix - Kenya (EFK),EFK-ANA Agroforestry Project - EcoFix (K)
35f4ee57-1f01-4e69-91be-d927aa5c0c89,Acacia EPZ,"Landscape restoration through promotion of agroforestry, active reforestation, and by elimination of invasive Prosopis juliflora - Acacia EPZ"
d6240881-891e-41f0-a5b6-eb1410447edd,Nguni Nursery,Nguni Restoration Project
4a853e6a-dba4-442a-b528-09702250244f,Aerobic Agroforestry,Planting trees for climate and livelihoods - Aerobic Agroforestry
476273a3-d0b3-4f89-be10-9703f038d0c0,Private Afforestation Developers Organization (PADO),Restoration of Degraded Forest Lands in Ghana - PADO
e4a9f60c-e555-43ff-b428-5b13f6501d66,Green Pot Enterprises,Riparian Land and Water Catchment Areas - Green Pot Enterprises
39871658-bff0-49c2-aa20-ccac0b03a2c2,Shekina Enterprise,Strengthening Resilient agriculture practices and improving smallholders’ livelihood opportunities through Planting and growing cassava leaves trees in Rulindo district - Shekina
f449aef3-4453-42c9-b542-57acc7c2e5eb,Rwanda Environmental Conservation Organization (RECOR),"“Forest Landscape Restoration and Lake Rumira Buffer Zone Restoration in Bugesera District, Eastern Province.” - RECOR"
943bb150-f1b7-4ad2-bb9e-60a559df2ebd,Goshen Global Vision (GGV),Agriculture and forest landscape restoration - Goshen Global Vision
47f07709-b503-4eeb-98fa-aea62e979ca8,Centre ValBio / Institute for the Conservation of Tropical Environments (CVB/ICTE),Agroecology Project - Centre ValBio
cbe97cc6-8469-487a-af4a-056d52215742,Organization of People Empowerment (OPE),Agroforestry - OPE
f9dc4f5a-503b-45e5-baf0-0162f7bdb891,Blue Forest,"AGROFORESTRY AND MANGROVE RESTORATION PROJECT IN SOUTH COMOE, COTE D'IVOIRE - Blue Forest"
da7fab67-92c7-4703-b2e0-d20c9cadcdde,Khusel'indalo South Africa Trading as Conservation South Africa,Assisted Natural Regeneration in the Kruger to Canyons Biosphere
fdde47ac-770e-4b7b-861b-9e4520ba906c,Trees for the Future (TREES),BADILI: Building Agroforestry and Developing Independent Livelihoods in Iringa - Trees for the Future
389aad5b-6577-4cea-bf9f-446dcfd94966,Bulindi Chimpanzee and Community Project (BCCP),Bulindi Chimpanzee and Community Project
802bb88c-5eb5-4ce2-836f-19bc8e0ddfc4,Kikandwa Environmental Association (KEA),Climate Smart Innovative Agro-ecology Project - Kikandwa Environmental Association (KEA)
47118e50-d4d1-4ba0-8094-59cfa441dbb0,EcoCare Ghana,Community-led Restoration Project - Restoring for the Future - EcoCare Ghana
684fb6a6-db3c-403a-8bb5-1b90c4234ace,Association de Soutien aux Initiatives Communautaires (ASIC),Contribution à l'amélioration de la couverture végétale de la sécurité alimentaire et nutritionnelle des exploitations agricoles par la diffusion des technologies et des bonnes pratiques agroforestières - ASIC
62043c88-f03d-475e-ac9c-2f057536e2a8,SOS-Forêts,Création de 150 hectares de plantations forestières communautaires afin de lutter contre le changement climatique pour l’autonomisation des couches vulnérables (femmes et jeunes) dans le département de Kouibly - SOS-Forêts
d6481438-9603-4c68-b152-6586ed825b0a,Drylands Natural Resources Centre (DNRC),Drylands Agroforestry Tree Planting Project - DNRC
cf16b937-a02b-4691-b816-28669ec348f2,International Tree Foundation (ITF),"Ecosystem and livelihoods enhancement for People, Nature and Climate in Marsabit County - International Tree Foundation"
f4b92387-705a-40bf-a7bb-e84f942de1ec,Solidaridad - East and Central Africa,ENHANCING AGROFORESTRY IN TEA LANSCAPES OF UGANDA - Solidaridad
36504a4e-f7a3-4963-9ff2-9aa9982cf990,Birdlife International - Kenya,"Enhancing Community Capacity for Climate Resilience and Restoration in the Lake Kivu/Rusizi River Basin, Rwanda – Birdlife"
cf106374-3dd4-401d-80ba-25b70247381a,Wells for Zoë,Enyezini forest and soil restoration - Wells for Zoe
9019106b-6e2d-4deb-97a5-2889f976a931,Development Response - Kenya (DREK),FAFI TREE RESTORATION PROJECT - DREK
2e2130be-7da7-4898-a9da-98ebb908cc96,Fairtree.org,FairTree - Kenya - Samburu
3a860077-df4c-4e95-8fec-41520c551243,Fairtree.org,FairTree TZ Usambaras
0733b059-5538-4fd8-8c9a-7adb78aea248,Solidaridad - East and Central Africa,"Farmer Managed Natural Regeneration and Tree Planting in Mazabuka, Zambia - Solidaridad"
bad12444-7180-4b29-a14c-d2b4305b7f52,Support for Women in Agriculture and Environment (SWAGEN),Forest Resource Conservation - SWAGEN
8a112e82-e191-44ad-b306-2578c064104b,Sustainable Natural Resources Management Association (SUNARMA),Forest restoration & re greening Ethiopia - SUNARMA
01918b25-6544-4027-82aa-6703c7c04784,Youth Action for Relentless Development Organization Sierra Leone (YARDO-SL),FreetownTheTreeTown - YARDO-SL
a44be1df-b79a-4f1b-9689-b6a768b12b60,"Organisation pour le Développement Durable, le Renforcement et l'Autopromotion des Structures Communautaires (DeDRAS)",Initiative bande verte durable - DEDRAS
449adf55-f6f8-4f17-97d3-ab6f6bf6676d,"Education, Environnement et Développement Durable (EEDD)",Initiatives communautaires de restauration des paysages forestiers par l’agroforesterie en RCA - EEDD
ff8f0b17-adc1-4885-a21b-0dd2b699bfc1,Sahel Eco,Inverser la dégradation des terres et des forêts par la mise à l'échelle des pratiques de reverdissement dans les provinces de Gourma et Gnagna - Sahel Eco
814fc561-d635-423d-ab9d-30ce02a81172,Sahel Eco,Inverser la dégradation des terres et des forêts par le mise à l'échelle des pratique de reverdissement - Sahel Eco
1e207d56-d0ed-4b4f-b1d9-94aa8aafb71f,Plant with Purpose - DRC,"Kakumba, DRC – Restoring Land and Lives - Plant with Purpose"
abdb9d09-7c55-4e26-8961-1aa26e991bbc,Friends of the Earth - Ghana,KAMRI - FoE Ghana
f6ad3f9f-122b-4927-8c0c-de5576054f15,WeForest Zambia,Katanino Forest Landscape Restoration Project - WeForest
76374ef9-c5df-4d62-a28b-92b100b95581,Kijabe Forest Trust (KFT),KIJABE FOREST TRUST
8cbda7fc-aa17-444b-8425-7047fade708c,Justdiggit,Kisiki Hai Program - JustDiggit
53f9f5a6-9346-436c-87bb-b5cc86d978c0,Society for the Conservation of Nature of Liberia (SCNL),Lake Piso Community Agroforestry Project - SCNL
33274073-8a4e-4eca-8b97-0e8da3833105,Environmental Foundation for Africa - Sierra Leone (EFA-Sierra Leone),Land Restoration for Ecosystem services and Livelihoods in Sierra Leone - EFA-SL
bbd88e69-cd85-429e-bebf-6234bf82dbb3,Albertine Rift Conservation Society (ARCOS Network),Landscape restoration for improved environmental resilience and community livelihoods - ARCOS
12aefea5-2ec9-4181-93c3-2c739f7c8d64,Hen Mpoano (Our Coast),Mangrove Ecosystem Restoration in South Western Ghana - Hen Mpoano
33ee81da-5421-410e-a642-37fc3b0cb935,My Trees Trust,Mashonaland West Woodlad Restoration (Chundu/Deve) - My Trees Trust
aa0f8df7-b668-48f0-a8ce-bf5558f2a9d6,Mount Kenya Environmental Conservation,Mount Kenya Landscape Restoration and Community Livelihoods Improvement.
d8210ae4-2c85-4094-b0f3-0e0cda687aa9,Kijani Forestry,Multipurpose Agroforestry Plots with Smallholder Farmers - Kijani Forestry
3418f474-5d5d-422f-a12b-459040034223,Sustainable Run for Development Cameroon (SURUDEV),"Njising-Tabenken Community Forest Restoration Initiative through Sustainable agricultural practices, Re-afforestation and water Catchment Management - SURUDEV"
caf78b0a-d80a-482e-9c62-842302109a90,Plant with Purpose - Burundi,"Nyakazu, Burundi - Restoring Land and Lives - Plant with Purpose"
c3d2858f-aa3d-458e-8e88-5a7f376e6ef4,Les Perma-Jardins du Togo (PERJAT),Planter et faire pousser des arbres à travers la mise en place des réserves communautaires au Togo - PERJAT
243f93d2-0d4b-4dac-8b23-997e6528dc8e,Institute of Nature and Environmental Conservation (INEC-Ghana),Planting Trees – Reforestation - INEC Ghana
d5e0a4ff-8601-45d0-9020-8c104e5ea508,People and Nature Rwenzori Mountain (PANR),Planting Trees – Reforestation - PANR
5b02c3a0-0f64-4506-8cc5-719dfa8c1641,Association pour la Promotion des Arbres Fertilitaires de l'Agroforestérie et la Forestérie - Togo (APAF-Togo),Projet d’appui à l’agroforesterie et la foresterie villageoise dans la région maritime du Togo ( PAFVMATO) - APAF-TOGO
c4eade71-6f42-4e45-8649-ffa251f2caed,Association Mines sans Pauvreté (AMSP),Projet de conservation des forêts mangroviennes de la boucle des Rio Nuñez et Bongo dans les Préfectures de Boffa et Boké - AMSP
4124a403-45ca-4e48-be6f-6c15b3b48617,Association de Gestion des Ressources Naturelles et de la Faune de la Comoé-Léraba (AGEREF/CL),Projet de restauration des terres dégradées à la périphérie de la Forêt Classée et Réserve Partielle de Faune de la Comoé – Leraba - AGEREF-CL
6d4d7217-175b-4d0c-927d-7596381ddc55,Association Mines sans Pauvreté (AMSP),Projet de restauration et de conservation des écosystèmes du Ziama - AMSP
bcde8454-bdd2-4b62-95b9-b572e8c5c460,African Research Association Managing Development in Nigeria (ARADIN),Promoting Biodiversity Conservation and Sustainable Livelihoods in Obudu Plateau - ARADIN
a8940698-ff28-456c-b8cd-f7289e612913,Mouvement Alliance Paysanne du Togo (MAPTO),Promotion des stratégies de plantations des arbres dans la région des Savanes au Togo (ProSPA) - MAPTO
5b6a5e11-03ae-4adc-b4ef-9bf4239aa705,Nsamizi Training Institute of Social Development (NTISD),REFORESTATION - Nsamizi (NTISD)
652ba56f-2e75-4735-a0d1-aafebbd940c1,Istituto Oikos Onlus,Reforestation of mangrove forests in Metuge district - Istituto Oikos Onlus
ed1cadff-e20f-43a7-8627-aee10f48cc7a,Autopromotion Rurale pour un Développement Humain Durable (ADHD),Réhabilitation et restauration des reliques forestières et des savanes pour une résilience de la communauté de Bato au changement climatique - ADHD
2d3717a6-293d-4b1b-a01c-d31a68560fd1,Programme d'Aide pour le Développement Economique et Social (PADES),Renforcement de la participation des populations pour la restauration du couvert végétal et des sols dégradés du massif de Lama dans la préfecture de la Kozah au Togo - PADES
5b82defe-b433-4eb0-b95c-09cd23a0f17d,Bénin Ecotourism Concern (ECO-Bénin),Restauration de mangroves et des périphéries de la chaîne de l’Atacora au Bénin - Eco-Benin
128c2ac7-dd30-4093-a079-6e9111aa3351,Climate Change Africa Opportunities (CCAO),Restauration et protection des forets communautaires et de la biodiversité par la plantation et gestion rationnelle d'arbres hôtes des chenilles comestibles par les jeunes et femmes autochtones en territoire de Mwenga au Sud Kivu - CCAO
529e1bae-2187-473f-a2a3-17e577720aba,Herp-Ghana,Restoration of a priority montane forest ecosystem in Ghana - Herp-Ghana
719bc145-df07-412f-a93a-3cf360ea6ed9,Sustainable Agroforestry Initiative (SAFI),"Restoration of Black Volta Basin Landscape for Energy, Income and Environment - SAFI"
9100baf3-9ac4-4db5-85a7-bc12b236a370,Institute of Green Growth Solutions (IGGS),RESTORATION OF DEGRADED LAND THROUGH AGROFORESTRY AND REFORESTATION IN GHANA - IGGS
5b7983b3-e887-44da-8d66-0ee747379214,Institute for Law and Environmental Governance (ILEG),"Restoration of Got Abiero and Yala Swamp for Improved Biodiversity Conservation, Community Livelihoods and Local Climate Stabilization Through Tree Growing - ILEG"
e4fe2fa4-6869-4c1e-9347-ba9b135306f5,Kijabe Environment Volunteers (KENVO),Restoration of Kiambu and Lari Landscapes through Planting and Growing Trees - KENVO
6af68b37-d2bc-4020-aaab-77a42cc25fd4,"Leadership, Environment and Action for Development Foundation (LEAD)",Restoration of Semi Arid lands of Tanzania - LEAD Foundation
47673f46-0af9-4047-afc7-b4f4fefaa5e7,Environmental Conservation Trust of Uganda (ECOTRUST),Restoration of Wetlands and Associated Catchments Project in Eastern Uganda - ECOTRUST
24fc33cb-53ad-4383-82ca-f6e2ac3fd143,Nigerian Conservation Foundation (NCF),Restoration Project - NCF
292bbbda-ec32-40e2-a127-3670a052423d,Durrell Wildlife Conservation Trust,Restoring the globally important wetlands of Alaotra and Sofia - Durrell
b7f26543-0ddb-4d10-a215-abfc093b0ed0,International Institute of Tropical Agriculture (IITA),Restoring the Olokemeji Forest Reserve through community-based conservation approach - IITA
2f4b5b55-49e2-4cec-a40a-521c5c142c91,CERATH Development Organization (CDO),The Integrated Resilient Savannah Agroforestry Project - CERATH
d1f355a2-3e0f-4ffd-bb2f-eec104bf8442,Kijani Pamoja (the Kilimanjaro Project),The Kilimanjaro Project (Kijani Pamoja)
f6075e7c-1d31-4bee-ba64-154cd664f7a1,Schools and Colleges Permaculture - Zambia (SCOPE-Zambia),Transforming bare land in to Food forest - SCOPE Zambia
71706fe4-0e80-4552-8be2-d6f6a55e13d2,Tree Adoption Uganda (TAU),Tree planting - Tree Adoption Uganda
6ca7c7b3-9109-4f34-8dc5-a64f8c7d558f,Forest and Agroforestry Promoters (FAP),Tree planting and bee keeping to rehabilitate degraded watershed areas in and around the Bali-Gemba forest Reserve - FAP
f81c1422-025c-45b1-a2e1-d354177523ca,International Centre for Research in Agroforestry (ICRAF),Trees for Landscape Restoration in Rwanda – World Forestry (ICRAF)
16b297b3-30a3-4624-bcc9-4333919f66fc,Wildlife Action Group (WAG),wildlife action group
96c86eae-d4f9-45d8-9780-69c55a9e36e9,World Vision International - Ethiopia,World Vision Ethiopia One Tree Planted Project
6b2dc32e-4414-48e0-9472-ebb49a766c28,Southern Alliance for Indigenous Resources (SAFIRE),Zimbabwe Forest Restoration Project - SAFIRE
Loading