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

Release 3.7.0 #3610

Merged
merged 3,343 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
3343 commits
Select commit Hold shift + click to select a range
860c89c
LF-4556 Allow switch to accept classes for positioning and make hidin…
Duncan-Brain Dec 4, 2024
752a9f8
LF-4556 Add option to disable location picker using layer mask
Duncan-Brain Dec 4, 2024
761c053
LF-4556 Add switch with disabling behaviour to TaskLocations, clear s…
Duncan-Brain Dec 4, 2024
0f74e5f
LF-4556 Disable hover styles when checkbox is disabled
Duncan-Brain Dec 4, 2024
57ef45a
LF-4542 Move validations for complete movement tasks to middleware
SayakaOno Dec 4, 2024
ae14dce
LF-4541 Add custom locations switch, remove option from TaskAllLocations
Duncan-Brain Dec 4, 2024
4afd64a
LF-4541 Add logic for choosing onContinue path on inventory
Duncan-Brain Dec 4, 2024
8d75998
LF-4541 Add custom task crops selection
Duncan-Brain Dec 4, 2024
83d148a
LF-4410: No reset on limit, show error
Tbrid Dec 4, 2024
01d2584
LF-4541 Continue on to task details if no animals exist on farm
Duncan-Brain Dec 4, 2024
1fcc9f8
LF-4548 Update completion onSave and saga to pass and correctly forma…
kathyavini Dec 4, 2024
78e0c77
LF-4548 Situate AnimalInventory within StepOne
kathyavini Dec 4, 2024
ecd1110
LF-4548 Adjust styling of View.TASK inventory for use in StepOne
kathyavini Dec 4, 2024
862834b
Merge branch 'LF-4545-adjust-read-only-task-view-for-movement-tasks' …
kathyavini Dec 4, 2024
b9fa26b
LF-4556 Add switch stories
Duncan-Brain Dec 4, 2024
fc62aaa
Merge pull request #3558 from LiteFarmOrg/LF-4538/Breed_sorting_does_…
Duncan-Brain Dec 4, 2024
aadd59b
LF-4541 Add animals existence to useInventory and refactor use of it
Duncan-Brain Dec 4, 2024
ee6c16a
Merge pull request #3554 from LiteFarmOrg/LF-4528/Hide_Created_in_Err…
kathyavini Dec 4, 2024
6704a4d
Merge pull request #3561 from LiteFarmOrg/LF-4556-update-location-sel…
kathyavini Dec 4, 2024
77d0d70
Merge branch 'integration' into LF-4527/Handle_animal_deletion_and_ab…
SayakaOno Dec 4, 2024
0bb3aa9
LF-4545 Merge integration and fix conflict in TaskLocations/styles.mo…
kathyavini Dec 4, 2024
a34f784
Fix broken tests by removing groups from eager expression
Duncan-Brain Dec 4, 2024
afa1ce0
LF-4548 Situate read-only inventory alongside View.TASK Inventory in …
kathyavini Dec 4, 2024
ec99adb
Merge pull request #3563 from LiteFarmOrg/remove-unused-animal-sectio…
antsgar Dec 4, 2024
2c6e921
remove additional actions from action menu
antsgar Dec 4, 2024
3ab5df8
LF-4548 Prohibit completing a movement task after removing all animals
kathyavini Dec 4, 2024
4d070b8
LF-4548 Fix styles
kathyavini Dec 4, 2024
31deaa2
LF-4482 support creating task from animal inventory
antsgar Dec 4, 2024
3af39a0
LF-4482 remove logs
antsgar Dec 4, 2024
8135dba
Merge pull request #3546 from LiteFarmOrg/LF-4527/Handle_animal_delet…
kathyavini Dec 4, 2024
598a158
LF-4548 Update selectedId state when preselectedIds update
kathyavini Dec 4, 2024
4f379e6
LF-4542 Update PATCH /complete/custsom_task
SayakaOno Dec 4, 2024
579a4a4
LF-4548 Only run the state setting useEffect on the View.TASK_SUMMARY…
kathyavini Dec 4, 2024
ace1538
LF-4542 Add constant CUSTOM_TASK
SayakaOno Dec 4, 2024
54a53ab
LF-4541 Add correct progress for custom task only
Duncan-Brain Dec 4, 2024
9f32791
Merge pull request #3552 from LiteFarmOrg/LF-4545-adjust-read-only-ta…
SayakaOno Dec 4, 2024
c7258ea
Merge pull request #3510 from LiteFarmOrg/LF-4380-comments-and-improv…
antsgar Dec 5, 2024
f7fa752
Merge pull request #3566 from LiteFarmOrg/LF-4556-update-location-sel…
antsgar Dec 5, 2024
0a3a008
LF-4548 Use watch variable in continueDisabled logic
kathyavini Dec 5, 2024
122a55e
LF-4548 Merge integration and fix conflict in styles file
kathyavini Dec 5, 2024
ed124d8
Merge branch 'integration' into LF-4548-adjust-task-complete-step-one…
kathyavini Dec 5, 2024
1bda5d6
LF-4553 Maintain same hasFarmAccess function but query task_type.farm…
kathyavini Dec 5, 2024
981a11b
format animal ids for custom tasks
antsgar Dec 5, 2024
6127ab2
Merge branch 'integration' into remove-unused-animal-sections
antsgar Dec 5, 2024
27de87d
refactor
antsgar Dec 5, 2024
9fbecc3
LF-4482 fix task type filtering logic
antsgar Dec 5, 2024
b473dbd
LF-4482 fix task type filtering logic
antsgar Dec 5, 2024
9a53e30
LF-4541 Update task animal inventory string
Duncan-Brain Dec 5, 2024
61de5f2
Invalidate animal tags when movement task is completed
SayakaOno Dec 5, 2024
361152a
LF-4548 Fix View.TASK_SUMMARY props
kathyavini Dec 5, 2024
6841449
LF-4548 Use persisted form values for returning from complete step
kathyavini Dec 5, 2024
166696d
LF-4548 Hide the no results block on the View.TASK_SUMMARY in task co…
kathyavini Dec 5, 2024
137f8f7
Merge pull request #3564 from LiteFarmOrg/LF-4482-create-task-from-an…
Duncan-Brain Dec 5, 2024
74d9682
Merge pull request #3568 from LiteFarmOrg/custom-tasks-with-animals-e2e
kathyavini Dec 5, 2024
e41be30
LF-4548 Merge integration and fix conflicts in TaskAnimalInventory an…
kathyavini Dec 5, 2024
06fb3bd
Merge branch 'integration' into Invalidate_animal_tags_on_movement_ta…
SayakaOno Dec 5, 2024
d60f304
Merge pull request #3571 from LiteFarmOrg/Invalidate_animal_tags_on_m…
antsgar Dec 5, 2024
1f671a5
Merge branch 'integration' into LF-4548-adjust-task-complete-step-one…
kathyavini Dec 5, 2024
a7c4c29
Merge pull request #3553 from LiteFarmOrg/LF-4548-adjust-task-complet…
SayakaOno Dec 5, 2024
a065368
LF-4553b Update mocks.taskFactory to receive a promisedFarm and pass …
kathyavini Dec 5, 2024
4e86b13
LF-4553b Update every call to mocks.taskFactory in task.test.js
kathyavini Dec 5, 2024
a0f371b
Merge branch 'integration' into remove-unused-animal-sections
antsgar Dec 5, 2024
42fe754
readd animals url
antsgar Dec 5, 2024
e18b86c
readd translations
antsgar Dec 5, 2024
232f2de
Merge pull request #3565 from LiteFarmOrg/LF-4542/Allow_custom_task_t…
kathyavini Dec 5, 2024
f1db435
Merge pull request #3539 from LiteFarmOrg/remove-unused-animal-sections
kathyavini Dec 5, 2024
f7e8d14
LF-4567 Show the before_complete step for custom tasks if they have a…
kathyavini Dec 5, 2024
be2fb86
LF-4567 Handle custom tasks not existing in task_type mappings
kathyavini Dec 5, 2024
8bec6c9
LF-4541 Add new animals exist hook
Duncan-Brain Dec 5, 2024
f42af14
Merge pull request #3569 from LiteFarmOrg/LF-4553b-better-middleware-…
Duncan-Brain Dec 6, 2024
053b186
Remove unnecessary animal properties in GET and POST task
SayakaOno Dec 5, 2024
133b235
LF-4415: Fix sorting and add to table column order
Tbrid Dec 6, 2024
97a2ca9
Merge pull request #3562 from LiteFarmOrg/LF-4541-add-animal-inventor…
SayakaOno Dec 6, 2024
b94e15c
LF-4558 Add useAnimalInventoryItemCount hook
SayakaOno Dec 6, 2024
a027458
LF-4558 Update getSupportedTaskTypesSet function
SayakaOno Dec 6, 2024
24e1b60
LF-4558 Update PureTaskTypeSelection to accept hasAnimals
SayakaOno Dec 6, 2024
144469e
LF-4558 Update TaskTypeSelection container to send hasAnimals to Pure…
SayakaOno Dec 6, 2024
09af097
LF-4558 Replace the hook to check animals
SayakaOno Dec 6, 2024
dcabcb0
LF-4558 Update useAnimalsExist to filter out removed animals
SayakaOno Dec 6, 2024
2079561
Revert "LF-4558 Add useAnimalInventoryItemCount hook"
SayakaOno Dec 6, 2024
1d5839e
LF-4558 Improve animalsExistOnFarm logic
SayakaOno Dec 6, 2024
f6cf50f
Merge pull request #3574 from LiteFarmOrg/LF-4558/Adjust_tasks_for_fa…
Duncan-Brain Dec 6, 2024
676a7f5
New Crowdin translations by GitHub Action
crowdin-bot Dec 6, 2024
490515f
New Crowdin translations by GitHub Action
crowdin-bot Dec 6, 2024
62a6e09
Remove Polish file
kathyavini Dec 6, 2024
5ed5235
Remove Polish files
kathyavini Dec 6, 2024
5620f94
LF-4567 Return null instead of fragment from ternary
kathyavini Dec 6, 2024
4c12ca4
Merge branch 'integration' into LF-4567-allow-custom-tasks-with-anima…
kathyavini Dec 6, 2024
971fe51
LF-4558 Give second argument to getSupportedTaskTypes
kathyavini Dec 6, 2024
4b0be02
Merge pull request #3575 from LiteFarmOrg/l10n_crowdin_translations_i…
antsgar Dec 6, 2024
1758146
Merge pull request #3580 from LiteFarmOrg/l10n_crowdin_translations_i…
antsgar Dec 6, 2024
6c79b38
Merge pull request #3573 from LiteFarmOrg/Cleanup_GET_tasks_request
antsgar Dec 6, 2024
581a59d
LF-4564 unnest tasks from animals
antsgar Dec 6, 2024
a0e2dc3
Merge pull request #3581 from LiteFarmOrg/LF-4558b-fix-calls-to-getSu…
antsgar Dec 6, 2024
5749aed
Merge pull request #3572 from LiteFarmOrg/LF-4567-allow-custom-tasks-…
Duncan-Brain Dec 6, 2024
4ecdb90
Parse id for check
Duncan-Brain Dec 6, 2024
b6e0ff0
Merge pull request #3583 from LiteFarmOrg/hide-deleted-in-error-fix-b
antsgar Dec 6, 2024
7d87bf7
Merge pull request #3582 from LiteFarmOrg/hide-deleted-in-error-fix
kathyavini Dec 6, 2024
6aa4203
Merge remote-tracking branch 'origin/integration' into LF-4410-Limit-…
Tbrid Dec 7, 2024
85efd0d
Add visibility option to action menu and story
Duncan-Brain Dec 9, 2024
daf2c40
Add visibility option to iconActions and remove isAdmin checks at hig…
Duncan-Brain Dec 9, 2024
486c6d9
LF-4551 Don't return animal and batch properties on task when they ar…
kathyavini Dec 9, 2024
e80776a
LF-4551 Direct custom tasks with animals to the right stage of the co…
kathyavini Dec 9, 2024
aa61d17
LF-4577 Remove due date validation for POST animal task request
SayakaOno Dec 9, 2024
9b702f8
LF-4577 Remove complete date validation for complete animal task request
SayakaOno Dec 9, 2024
a32b069
LF-4577 Remove due date validation for PATCH task due date request
SayakaOno Dec 9, 2024
2be9296
LF-4577 Remove isOnOrAfterBirthAndBroughtInDates function
SayakaOno Dec 9, 2024
cf34557
LF-4577 Remove date validation for PATCH animal/batch request
SayakaOno Dec 9, 2024
3883551
LF-4551 This doesn't do anything; persistedFormData never receives these
kathyavini Dec 10, 2024
1fc125d
LF-4410: Use trigger and hookformMaxValidation
Tbrid Dec 10, 2024
39587a9
Merge remote-tracking branch 'origin/integration' into LF-4415/Animal…
Tbrid Dec 10, 2024
38c3533
Merge pull request #3584 from LiteFarmOrg/show-action-menu-for-worker
Duncan-Brain Dec 10, 2024
bcb2ea1
LF-4569 Fix formatting function run in StepOne useEffect
kathyavini Dec 10, 2024
8b92138
Revert "LF-4551 Don't return animal and batch properties on task when…
kathyavini Dec 10, 2024
9a80a77
LF-4569 Move early return to useEffect
kathyavini Dec 10, 2024
2f97ef7
LF-4569 Revert remaining changes to task utils
kathyavini Dec 10, 2024
fd96d58
LF-4568 fix sex filter
antsgar Dec 10, 2024
0dc2135
Merge pull request #3585 from LiteFarmOrg/LF-4569-it-is-not-possible-…
antsgar Dec 10, 2024
7eb3df1
LF-4551 Add optional chaining to component to cover initial null data
kathyavini Dec 10, 2024
7521a29
LF-4551 Restore setFormData in Saga but set persisted paths before ca…
kathyavini Dec 10, 2024
29c8f2c
LF-4551 Fix placement of custom task conditional
kathyavini Dec 10, 2024
a854969
Merge branch 'integration' into LF-4551-app-crashes-if-trying-to-comp…
kathyavini Dec 10, 2024
cb42123
LF-4587 Add type guard so formatting function is not run on persisted…
kathyavini Dec 10, 2024
627ad1c
LF-4592 Reset purposes from purpose_ids when need_changes is false
kathyavini Dec 10, 2024
751207e
LF-4587 Clean up code no longer necessary because of type guard
kathyavini Dec 10, 2024
ae86d6f
LF-4573 Update copy on removal modal
kathyavini Dec 10, 2024
db0c87b
LF-4551 Add delay between persisted path setting and setFormData
kathyavini Dec 10, 2024
9196483
Merge pull request #3586 from LiteFarmOrg/LF-4577/Remove_animal_task_…
SayakaOno Dec 10, 2024
07830d5
LF-4579 Add model methods to get animals/batches with newer completed…
SayakaOno Dec 10, 2024
5580371
LF-4579 Update updateTaskWithCompletedData
SayakaOno Dec 10, 2024
7bb23ca
LF-4579 Add test for movement task historical records
SayakaOno Dec 10, 2024
c59a21d
LF-4579 Improve test
SayakaOno Dec 10, 2024
6d4e1b0
LF-4579 Remove unnecessary select in model methods
SayakaOno Dec 10, 2024
73f4ce5
LF-4595 Return early from getInventoryId()
kathyavini Dec 10, 2024
a4063f8
Merge pull request #3592 from LiteFarmOrg/LF-4595-the-app-crashes-whe…
SayakaOno Dec 11, 2024
e7b082d
LF-4575 fix custom tasks not attached to crop plans
antsgar Dec 11, 2024
bc31ce4
Merge pull request #3588 from LiteFarmOrg/LF-4568-Unable-to-Filter-An…
kathyavini Dec 11, 2024
c599bd5
Merge pull request #3593 from LiteFarmOrg/LF-4575-Created-Custom-Task…
kathyavini Dec 11, 2024
88bbbf2
LF-4574 Conditionally filter removed animals when building animal inv…
kathyavini Dec 11, 2024
c534613
LF-4574 Show removed animals in TaskReadOnly view for abandoned and c…
kathyavini Dec 11, 2024
f9bdf82
Merge pull request #3589 from LiteFarmOrg/LF-4579/Recording_a_movemen…
antsgar Dec 11, 2024
6fe2cf5
Merge pull request #3590 from LiteFarmOrg/LF-4587-animal-movement-pur…
antsgar Dec 11, 2024
a846226
LF-4615 Add z index to details container
kathyavini Dec 11, 2024
d3179fa
LF-4575 fix date range filter
antsgar Dec 11, 2024
1ef7042
LF-4574 Cleaner way to write ternary
kathyavini Dec 11, 2024
0e5067c
Merge pull request #3587 from LiteFarmOrg/LF-4551-app-crashes-if-tryi…
antsgar Dec 11, 2024
1066841
LF-4574 Add same change to batches
kathyavini Dec 11, 2024
8aec504
LF-4583 Move the formatTranslationKey function to utility vs controller
Duncan-Brain Dec 11, 2024
40e857a
LF-4583 Add tests for duplicate custom types and breeds
Duncan-Brain Dec 11, 2024
58bc3b6
LF-4410 Move trigger to checkbox's onChange
SayakaOno Dec 11, 2024
e1b7e8d
LF-4583 Refactor duplicates checks
Duncan-Brain Dec 11, 2024
9dffdc5
LF-4583 Remove unused model services
Duncan-Brain Dec 11, 2024
63f0c4e
LF-4410 Use default error message for validation
SayakaOno Dec 11, 2024
1751f6a
LF-4410 Revert routes file with comment
SayakaOno Dec 11, 2024
1499184
LF-4410 Remove comment
SayakaOno Dec 11, 2024
94ace17
LF-4410 Revert translation files
SayakaOno Dec 11, 2024
da4a9f4
LF-4596 Add max limit for batch count in General detail
SayakaOno Dec 11, 2024
44bb5f4
LF-4410 Replace batch count limit with constant
SayakaOno Dec 11, 2024
357119c
LF-4574 Add a basic removed styling to Table V2; create Story
kathyavini Dec 11, 2024
0fffa85
LF-4574 Add removed property to animal inventory items and assign cor…
kathyavini Dec 11, 2024
615e9c2
LF-5474 Compensate for italic glyphs overflowing container (and being…
kathyavini Dec 11, 2024
cd96deb
LF-4583 Make new hook form validation
Duncan-Brain Dec 11, 2024
92c7a71
LF-4583 Add new react select hookFormValidation to Breed and type select
Duncan-Brain Dec 11, 2024
571ed79
Merge pull request #3591 from LiteFarmOrg/LF-4573-the-message-these-a…
antsgar Dec 11, 2024
22012e0
LF-4583 Update react hook form util to be case insensitive
Duncan-Brain Dec 11, 2024
1303352
LF-4583 Update comment to reference mirror frontend function
Duncan-Brain Dec 11, 2024
5b0ddf5
Revert routes and translation files
SayakaOno Dec 11, 2024
6addfbb
Revert de/crop_nutrients.json
SayakaOno Dec 11, 2024
1762508
Merge pull request #3595 from LiteFarmOrg/LF-4615-no-actions-are-trig…
antsgar Dec 11, 2024
c72c3bf
LF-4574 Remove box shadow on purple badge
kathyavini Dec 11, 2024
c4c8d7f
LF-4574 Add margin to fix how text lines up in following cell
kathyavini Dec 11, 2024
7593e6f
LF-4574 Fix batch count badge by wrapping text <p>
kathyavini Dec 11, 2024
6ccb4f9
LF-4606 Hide image uploader in readonly view
kathyavini Dec 11, 2024
9fdb5d4
LF-4570 Call useMediaWithAuthentication for farm preview image
SayakaOno Dec 11, 2024
6d40baa
Merge pull request #3598 from LiteFarmOrg/LF-4606-click-to-upload-lin…
antsgar Dec 11, 2024
34c751f
LF-4589 Pass photoUrl to inventory items and use it
kathyavini Dec 11, 2024
93b0b12
LF-4593 fix animals filter
antsgar Dec 11, 2024
d9bba9a
LF-4612 Move onclick handler up one in hierarchy
Duncan-Brain Dec 11, 2024
cdc4523
LF-4570 Adjust change/remove buttons in ImagePicker
SayakaOno Dec 11, 2024
38fa8c2
LF-4610 fix location styling
antsgar Dec 12, 2024
fd7da22
Merge pull request #3602 from LiteFarmOrg/LF-4612-accidental-click-ou…
antsgar Dec 12, 2024
5b2b735
Merge pull request #3542 from LiteFarmOrg/LF-4410-Limit-1000-Animal-C…
antsgar Dec 12, 2024
18f98f3
Merge pull request #3601 from LiteFarmOrg/LF-4570/Farm_image_preview_…
kathyavini Dec 12, 2024
338c6f8
LF-4583 Add translation
Duncan-Brain Dec 12, 2024
7814c6f
LF-4583 Choose a different duplicate string comparison function for F…
Duncan-Brain Dec 12, 2024
ab39d52
LF-4583 Use new string comparitor on BE
Duncan-Brain Dec 12, 2024
ebc63f3
Merge branch 'integration' into LF-4583-users-are-currently-able-to-c…
Duncan-Brain Dec 12, 2024
fdb9244
LF-4583 Updated code comments
Duncan-Brain Dec 12, 2024
afcd474
LF-4583 Move spreading to intended place
Duncan-Brain Dec 12, 2024
a54e27a
LF-4577 Move padding for italic text to text elements
kathyavini Dec 12, 2024
dbbdff3
LF-4589 Lazy-load inventory animal photos
kathyavini Dec 12, 2024
90464a7
Merge pull request #3603 from LiteFarmOrg/LF-4610-When-creating-a-bat…
kathyavini Dec 12, 2024
951f1e4
Merge LF-4574 Updates
kathyavini Dec 12, 2024
efbdccf
LF-4589 Factor out shared styles from iconBorder (animal) and photoUrl
kathyavini Dec 12, 2024
13000d3
Merge pull request #3599 from LiteFarmOrg/LF-4593-No-results-are-disp…
SayakaOno Dec 12, 2024
b04f1fd
Merge pull request #3596 from LiteFarmOrg/LF-4580-Task-date-filter-do…
SayakaOno Dec 12, 2024
2f7bd63
Revert unrelated changes
SayakaOno Dec 12, 2024
a0e7467
LF-4415 Update sorting logic
SayakaOno Dec 12, 2024
2bbf28f
LF-4415 Add animalDescendingComparator and update getComparator to ac…
SayakaOno Dec 12, 2024
0e65830
LF-4415 Add DescendingComparator type
SayakaOno Dec 12, 2024
e530dbf
LF-4415 Update comparators
SayakaOno Dec 12, 2024
ef3b5ce
LF-4415 Update TableV2 to take comparator
SayakaOno Dec 12, 2024
f9292d9
LF-4415 Fix animalDescendingComparator logic
SayakaOno Dec 12, 2024
02c387d
LF-4415 Add test for animal sorting
SayakaOno Dec 12, 2024
f3b035b
LF-4415 Improve test
SayakaOno Dec 12, 2024
53e126f
LF-4415 Cleanup
SayakaOno Dec 12, 2024
84283bb
Merge pull request #3594 from LiteFarmOrg/LF-4574-animals-removed-fro…
antsgar Dec 12, 2024
b467f9a
Merge pull request #3600 from LiteFarmOrg/LF-4589-nice-to-have-animal…
antsgar Dec 12, 2024
a5c0301
Merge pull request #3541 from LiteFarmOrg/LF-4415/Animals-nor-sorted-…
antsgar Dec 12, 2024
d842e9c
LF-4583 Remove clear button
Duncan-Brain Dec 12, 2024
4747d24
LF-4609 Reduce touch delay for tooltip going away
Duncan-Brain Dec 12, 2024
5c0eb33
LF-4611 Add no animal locations modal
Duncan-Brain Dec 12, 2024
7b33b83
Fix console error using Joyce's solution
Duncan-Brain Dec 12, 2024
ada2e6c
LF-4583 Update jsdoc
Duncan-Brain Dec 12, 2024
30f4740
Merge pull request #3606 from LiteFarmOrg/console-error-DOMnesting-se…
antsgar Dec 12, 2024
059a994
LF-4612b Increase checkbox width
kathyavini Dec 12, 2024
24cda4b
LF-4611 Fix cancel
Duncan-Brain Dec 12, 2024
ffbae8c
LF-4611 Update string
Duncan-Brain Dec 12, 2024
f6f01c1
LF-4611 Add more animal locations
Duncan-Brain Dec 12, 2024
bc8594d
update webpage links and version number
antsgar Dec 12, 2024
292f564
Merge pull request #3604 from LiteFarmOrg/LF-4609-informative-pop-up-…
antsgar Dec 12, 2024
f32b869
update release notes link
antsgar Dec 12, 2024
286940e
Merge pull request #3607 from LiteFarmOrg/LF-4612b-accidental-click-o…
antsgar Dec 12, 2024
e810c4f
LF-4611 Update translation key
SayakaOno Dec 12, 2024
6f4e786
Merge pull request #3609 from LiteFarmOrg/LF-4611/Translation_key_update
Duncan-Brain Dec 12, 2024
1a60bdb
Merge pull request #3605 from LiteFarmOrg/LF-4611-nice-to-have-it-may…
antsgar Dec 12, 2024
717db12
LF-4583 Hide creatable option if duplicate
Duncan-Brain Dec 12, 2024
9602e65
LF-4583 Remove hook form validation unused
Duncan-Brain Dec 12, 2024
a7a0a06
LF-4583 remove translation
Duncan-Brain Dec 12, 2024
d77e344
fix beta badge
antsgar Dec 12, 2024
23581ce
LF-4612c Fix margin on icons without checkbox
kathyavini Dec 12, 2024
3330531
Change add animals title
Duncan-Brain Dec 12, 2024
066315d
Keep title
Duncan-Brain Dec 12, 2024
e27e81d
Merge pull request #3597 from LiteFarmOrg/LF-4583-users-are-currently…
antsgar Dec 12, 2024
f144efb
New Crowdin translations by GitHub Action
crowdin-bot Dec 12, 2024
7fd72a2
New Crowdin translations by GitHub Action
crowdin-bot Dec 12, 2024
757fd75
Remove Polish translations
kathyavini Dec 12, 2024
4746e24
Remove Polish file
kathyavini Dec 12, 2024
fe27fb8
Fix capitalization on English string
kathyavini Dec 12, 2024
03d184e
LF-4612 Add className prop to IconText Cell
SayakaOno Dec 12, 2024
ca79eb5
LF-4612 Add className to animal identification cell
SayakaOno Dec 12, 2024
402fe8d
LF-4612 Remove animal identification cell className from TableVw
SayakaOno Dec 12, 2024
68d4e41
LF-4612 Improve condition
SayakaOno Dec 12, 2024
53b2ffe
Merge pull request #3617 from LiteFarmOrg/LF-4612c_2/Adjust_margin_wi…
kathyavini Dec 12, 2024
b0bbf20
Merge pull request #3616 from LiteFarmOrg/l10n_crowdin_translations_i…
kathyavini Dec 12, 2024
3657cd9
Merge pull request #3615 from LiteFarmOrg/l10n_crowdin_translations_i…
kathyavini Dec 12, 2024
9cb0855
Merge pull request #3612 from LiteFarmOrg/LF-4612c-Fix-margin-on-icon
SayakaOno Dec 12, 2024
173500b
Merge pull request #3613 from LiteFarmOrg/fix-beta-badge-keep-title
kathyavini Dec 12, 2024
bf166c8
Merge pull request #3611 from LiteFarmOrg/fix-beta-badge
kathyavini Dec 12, 2024
f046846
Merge pull request #3608 from LiteFarmOrg/update-links-and-version-nu…
kathyavini Dec 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 3 additions & 2 deletions .github/workflows/automated_tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Automated Tests"
name: API Unit Tests

on:
pull_request:
Expand All @@ -7,7 +7,8 @@ on:
- "patch/**"

jobs:
automated_tests:
api_unit_tests:
name: API Unit Tests
runs-on: ubuntu-20.04
container: node:18.16.1
services:
Expand Down
118 changes: 59 additions & 59 deletions .github/workflows/cypress_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,52 @@ name: Run cypress happy path test

on:
workflow_dispatch:
# pull_request:
# branches:
# - integration
pull_request:
types: [enqueued]
branches:
- integration
merge_group:

jobs:
build:
runs-on: ubuntu-20.04
cypress-tests:
name: Cypress E2E Tests
runs-on: ubuntu-latest
timeout-minutes: 30
services:
postgres:
image: postgres
env:
POSTGRES_DB: "pg-litefarm"
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
# POSTGRES_HOST: localhost
# POSTGRES_HOST: postgres
options: >-
--health-cmd pg_isready
--health-interval 5s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
volumes:
- ./initdb.d:/docker-entrypoint-initdb.d
- postgres-data:/var/lib/postgresql/data
strategy:
matrix:
node-version: [18.16.1]
env:
JWT_INVITE_SECRET: ${{secrets.JWT_INVITE_SECRET}}
JWT_RESET_SECRET: ${{secrets.JWT_RESET_SECRET}}
JWT_SCHEDULER_SECRET: ${{secrets.JWT_SCHEDULER_SECRET}}
JWT_SECRET: ${{secrets.JWT_SECRET}}
TEST_USER: ${{secrets.TEST_USER}}
TEST_USER_ID: ${{secrets.TEST_USER_ID}}
DEV_DATABASE_HOST: localhost
DEV_DATABASE: pg-litefarm
DEV_DATABASE_USER: postgres
DEV_DATABASE_PASSWORD: postgres
JWT_SECRET: This_will_(really)_work
JWT_INVITE_SECRET: Any_arbitrary_string_will_do
JWT_RESET_SECRET: Production_is_secured_with_a_long_random_string
JWT_FARM_SECRET: Here_we_can_use_friendly_explanations
JWT_SCHEDULER_SECRET: Another_token_was_needed_for_the_scheduler
GOOGLE_API_KEY: ${{secrets.VITE_GOOGLE_MAPS_API_KEY}}
VITE_GOOGLE_MAPS_API_KEY: ${{secrets.VITE_GOOGLE_MAPS_API_KEY}}
VITE_WEATHER_API_KEY: ${{secrets.VITE_WEATHER_API_KEY}}
NODE_ENV: development

strategy:
matrix:
node-version: [16.15.0]

steps:
- uses: ikalnytskyi/action-setup-postgres@v3
with:
username: ${{env.DEV_DATABASE_USER}}
password: ${{env.DEV_DATABASE_PASSWORD}}
database: ${{env.DEV_DATABASE}}
port: 5432

- uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
Expand All @@ -53,53 +63,43 @@ jobs:
npm run start &
env:
PORT: 5000
DEV_DATABASE_HOST: localhost
DEV_DATABASE: pg-litefarm
DEV_DATABASE_USER: postgres
DEV_DATABASE_PASSWORD: postgres
NODE_ENV: development

- name: Install pnpm
uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v2
with:
version: latest

- name: Run and test app
- name: Run Webapp
working-directory: packages/webapp
run: |
pnpm install --config.auto-install-peers=true --no-frozen-lockfile --force
pnpm dev &
env:
VITE_WEATHER_API_KEY: ${{secrets.VITE_WEATHER_API_KEY}}
VITE_ENV: development
VITE_GOOGLE_OAUTH_CLIENT_ID: ${{secrets.VITE_GOOGLE_OAUTH_CLIENT_ID}}
VITE_DO_BUCKET_NAME: litefarm
NODE_ENV: development
VITE_API_URL: http://localhost:5000
CYPRESS_RECORD_KEY: "2630f414-4914-48b0-907d-aa3a9cc6a30b"
uses: cypress-io/[email protected]
CYPRESS_COVERAGE: true
- name: Run E2E test (English)
env:
CYPRESS_RECORD_KEY: ${{secrets.CYPRESS_RECORD_KEY}}
CYPRESS_USER: 0
uses: cypress-io/github-action@v6
with:
working-directory: packages/webapp
install-command: pnpm install --config.auto-install-peers=true --no-frozen-lockfile --force
install: true
start: pnpm dev
wait-on: "http://localhost:3000"
wait-on-timeout: 120
working-directory: packages/end-to-end
headed: true
browser: chrome
record: true
parallel: true
parallel: false
group: "UI - Chrome"
spec: cypress/e2e/happyPath.spec.js
ci-build-id: ${{ github.run_id }}

- name: set code coverage badge
run: npx -p check-code-coverage update-badge --from '${GITHUB_WORKSPACE}/packages/webapp/coverage/coverage-summary.json'
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Archive code coverage results
- name: Archive backend logs
uses: actions/upload-artifact@v3
continue-on-error: true
with:
name: code-coverage-report
working-directory: packages/webapp
path: coverage/coverage-summary.json

- name: Set code coverage commit status
continue-on-error: true
working-directory: packages/webapp
run: npx set-gh-status
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
GH_SHA: ${{ github.event.after }}
name: logs
path: packages/api/logs
8 changes: 4 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Deploy'
name: "Deploy"
on:
workflow_dispatch:

Expand Down Expand Up @@ -26,8 +26,8 @@ jobs:
with:
script_stop: true
host: ${{ secrets.BETA_SSH_HOST }}
username: ${{ secrets.BETA_SSH_USER }}
passphrase: ${{ secrets.BETA_SSH_PASS }}
key: ${{ secrets.BETA_SSH_KEY }}
username: ${{ secrets.BETA_SSH_USER_NEW }}
passphrase: ${{ secrets.BETA_SSH_PASS_NEW }}
key: ${{ secrets.BETA_SSH_KEY_NEW }}
command_timeout: 20m
script: ${{ steps.script.outputs.content }}
3 changes: 2 additions & 1 deletion .github/workflows/webapp_unit_tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Webapp Unit Tests"
name: Webapp Unit Tests

on:
pull_request:
Expand All @@ -7,6 +7,7 @@ on:

jobs:
webapp_unit_tests:
name: Webapp Unit Tests
runs-on: ubuntu-latest
defaults:
run:
Expand Down
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ packages/api/.env.local
packages/api/tickets
packages/api/.env
packages/webapp/.env
packages/webapp/cypress/videos
packages/webapp/cypress/screenshots
packages/end-to-end/cypress/videos
packages/end-to-end/cypress/screenshots
packages/end-to-end/coverage
packages/webapp/.nyc_output
packages/webapp/.nyc_output/out.json
packages/webapp/cypress.env.json
Expand Down
2 changes: 2 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
node .husky/commit-msg.js $1
59 changes: 59 additions & 0 deletions .husky/commit-msg.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import fs from "node:fs";
import { fileURLToPath } from "node:url";
import { execSync } from "node:child_process";

const ticketNumberRegex = /LF-\d+/;
const commitMessageFilePath = process.argv[2];

const git = {
getCurrentBranchName: () =>
execSync("git rev-parse --abbrev-ref HEAD").toString().trim(),
readCommitMsg: () => fs.readFileSync(commitMessageFilePath, "utf8"),
writeCommitMsg: (msg) => fs.writeFileSync(commitMessageFilePath, msg),
};

function processCommitMsg() {
try {
const branchName = git.getCurrentBranchName();
const match = branchName.match(ticketNumberRegex);

// Branch name doesn't contain ticket number
if (!match) {
console.warn(
"JIRA ticket number not found in branch name. Proceeding without modification."
);
return;
}

const commitMessage = git.readCommitMsg();

const filteredCommitMessage = commitMessage
.split("\n")
.filter((line) => !line.trim().startsWith("#"))
.join("\n")
.trim();

if (filteredCommitMessage === "") return;

// Check if commit already contains ticket number
if (filteredCommitMessage.match(ticketNumberRegex)) {
console.log(
"Commit message already contains a JIRA ticket number. Proceeding without modification."
);
return;
}

// Modify commit message
git.writeCommitMsg(match[0] + " " + filteredCommitMessage);
} catch (error) {
console.error("Error processing commit message:", error);
}
}

// Call the hook only when this file is executed directly by node.
// This is needed to ensure proper execution of tests.
if (process.argv[1] === fileURLToPath(import.meta.url)) {
processCommitMsg();
}

export { git, processCommitMsg };
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
| Test | Coverage |
| ----------- | ------------------------------------------------------------------------------- |
| E2E FE Test | ![check-code-coverage](https://img.shields.io/badge/code--coverage-51.2%25-red) |

# LiteFarm

LiteFarm is the world’s first community-led, not-for-profit, digital platform joining farmers and scientists together for participatory assessment of social, environmental and economic outputs of farming systems. LiteFarm is the first application of its kind specifically tailored to the needs of diversified farmers with built-in pathways to provide expert decision support and help them earn additional income through payment for ecological services (PES) schemes and in-app certifications (such as organic). These approaches serve the multiple purposes of incentivizing adoption of sustainable land use practices through the provision of evidence-based decision support, and significantly increasing the amount of data being collected by diversified farming operations around the globe. It was developed with farmers at the center of the design process and built from the ground up with accessibility and approachability in mind. We are proud of our mission:
Expand Down Expand Up @@ -50,7 +46,7 @@ Run `docker compose up` in the root directory to configure and start all develop

For more information, see [services (local development dependencies)](#services-local-development-dependencies) below.

Once the database container is running and the `.env` files have been configured [as described below](#adding-environment-files), in a terminal navigate to the `packages/api` folder. Execute `npm run migrate:dev:db` to run the [migrations](https://knexjs.org/#Migrations) that set up the PostgreSQL database used by the app.
Once the database container is running and the `.env` files have been configured [as described above](#adding-environment-files), in a terminal navigate to the `packages/api` folder. Execute `npm run migrate:dev:db` to run the [migrations](https://knexjs.org/#Migrations) that set up the PostgreSQL database used by the app.

### Database - Native installation

Expand Down Expand Up @@ -310,7 +306,7 @@ Notes:

You can use Storybook to visualize and test out the UI components used throughout the app.

- To view Storybook on your local environment, run `pnmp storybook` on the `packages/webapp` directory and navigate to http://localhost:6006
- To view Storybook on your local environment, run `pnpm storybook` on the `packages/webapp` directory and navigate to http://localhost:6006
- To view the deployed version of Storybook, which is updated automatically with the latest changes on the integration branch, go to https://65316fc4f177c73a9181a843-yobioprfjv.chromatic.com

## How to Contribute
Expand Down
4 changes: 2 additions & 2 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
'*.{md,yml}': 'prettier --write'
export default {
"*.{md,yml,json,js}": "prettier --write",
};
40 changes: 20 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading