Paul Weidner
2281a560a4
Issue #3247339 : Do not cache flag field allowed values when provided for a specific entity
2021-12-01 11:44:03 -05:00
paul121
9937730c14
Query assets from multiple locations in a single query.
2021-10-27 16:27:19 -04:00
paul121
50d7f643c2
Use dependency injection in views argument plugins.
2021-10-27 16:27:19 -04:00
Michael Stenta
b2c9fc9792
Move farm_client_test module to modules directory and "Testing" package.
2021-10-27 15:53:29 -04:00
paul121
b417cf4a78
Add module for testing client modules.
2021-10-27 15:53:29 -04:00
paul121
59859f12b6
Grant the "view client_module" permission to managed roles with default permissions.
2021-10-27 15:53:29 -04:00
paul121
b827a46c9c
Grant the "administer client_module" permission to managed roles with config permissions.
2021-10-27 15:53:29 -04:00
paul121
d398543082
Use the contrib entity access and permission_provider handlers.
2021-10-27 15:53:29 -04:00
paul121
01164d5d08
Create a controller to serve the client_module index.js
2021-10-27 15:53:29 -04:00
paul121
d0ae47e162
Define a client_module config entity.
2021-10-27 15:53:29 -04:00
Michael Stenta
4a8fddd5af
Dynamically add the "Quick forms" index menu item only if quick forms exist.
2021-10-27 15:22:34 -04:00
Michael Stenta
adb53b1211
Translate 1.x quick form IDs to 2.x (placeholder).
...
This is just a placeholder. IDs can be added here as the 2.x
quick forms are built.
2021-10-27 15:22:34 -04:00
Michael Stenta
538d9cf24c
Migrate quick form IDs from the 1.x {farm_quick_entity} table into the "quick" field on assets and logs.
2021-10-27 15:22:34 -04:00
Michael Stenta
282e3f221d
Add a d7_farm_asset migration source plugin for all asset migrations.
2021-10-27 15:22:34 -04:00
Michael Stenta
07c6ff2193
Only check entity view access in QuickFormActionBase.
2021-10-27 15:22:34 -04:00
Michael Stenta
a36bf06b4a
Move QuickFormBase and QuickFormInterface to src/Plugin/QuickForm.
2021-10-27 15:22:34 -04:00
paul121
3bee8d4fb1
Provide a trait for loading prepopulated entity references.
2021-10-27 15:22:34 -04:00
paul121
560cd37168
Provide a base class for quick form action plugins.
2021-10-27 15:22:34 -04:00
paul121
ac1679841d
Provide a route for each quick form.
2021-10-27 15:22:34 -04:00
paul121
b3428fc737
Only implement ContainerFactoryPluginInterface in QuickFormBase.
2021-10-27 15:22:34 -04:00
paul121
ba3011a5e6
QuickForms are provided under the Plugin/QuickForms directory.
2021-10-27 15:22:33 -04:00
Michael Stenta
93dd920391
Track which quick form created assets/logs.
2021-10-27 15:22:33 -04:00
Michael Stenta
f165683c65
Add a field to assets and logs for tracking which quick form(s) created them.
2021-10-27 15:22:33 -04:00
Michael Stenta
926ae97372
Add automated tests of all quick form helper traits/methods.
2021-10-27 13:45:18 -04:00
Michael Stenta
cec091b720
Use the createQuantity() helper method in the createLog() helper method.
2021-10-27 13:45:18 -04:00
Michael Stenta
a52fd0b5ae
Provide traits with helper methods for creating quantities and terms.
2021-10-27 13:45:18 -04:00
Michael Stenta
78fa65945b
If not specified, set the log's status to "done".
2021-10-27 13:45:18 -04:00
Michael Stenta
c680e5c24b
Display a message with a link to the entity when an asset or log is created.
2021-10-27 13:45:18 -04:00
Michael Stenta
d5a4407301
Provide traits with helper methods for creating assets and logs.
2021-10-27 13:45:18 -04:00
Michael Stenta
f14a6efd07
Add automated tests for quick forms.
...
Test plugin discovery and access control.
2021-10-27 13:45:18 -04:00
Michael Stenta
c407ff70ac
Move farm.quick menu link under farm.base and style the toolbar icon.
2021-10-27 13:45:18 -04:00
Michael Stenta
2eba7516ec
Generate menu links for all quick forms and the index.
2021-10-27 13:45:18 -04:00
Michael Stenta
54c8ef4fce
Add help text to individual quick forms.
2021-10-27 13:45:18 -04:00
Michael Stenta
bf8731cc18
Add help text to quick form index.
2021-10-27 13:45:18 -04:00
Michael Stenta
2219a712cc
Allow quick forms to control access via permissions and/or an access() method.
2021-10-27 13:45:18 -04:00
Michael Stenta
c7ac62e239
Add a page controller at /quick that displays an index of quick forms.
2021-10-27 13:45:18 -04:00
Michael Stenta
2f6e556d01
Add a form wrapper class for rendering quick forms at /quick/{id}
2021-10-27 13:45:18 -04:00
Michael Stenta
f0778dd1b3
Provide a quick form plugin manager.
2021-10-27 13:45:18 -04:00
Michael Stenta
072c030379
Initial commit of the farmOS Quick Forms module.
2021-10-27 13:45:18 -04:00
paul121
b14e91f195
Fix Uncaught PHP Exception Twig\\Error\\RuntimeError: "The "filter" filter expects an array or "Traversable", got "NULL"."
...
Initialize the content variable so it exists in quantity.html.twig
when the quantity has no populated fields.
2021-10-21 09:59:02 -07:00
paul121
997cd81f12
Plan state change actions support any workflow with the target state.
2021-10-18 16:16:09 -04:00
paul121
268cac91dc
Asset state change actions support any workflow with the target state.
2021-10-18 16:16:09 -04:00
paul121
9d4a7a756f
Issue #3240953 by paul121: Duplicated logs reference the same quantity entity
2021-10-18 15:34:25 -04:00
Michael Stenta
d3b3bd862d
Use upstream \Drupal\log\Event\LogEvent instead of custom event.
2021-10-18 15:23:26 -04:00
Michael Stenta
22f7438447
Remove flags that don't apply from Views exposed filters.
2021-10-18 14:55:11 -04:00
Michael Stenta
a3c03fdcdf
Abstract the logic for getting the bundle from a "By Type" display's arguments.
2021-10-18 14:55:11 -04:00
Michael Stenta
97309754c1
Issue #3243383 : Allow flags to be limited to specific entity types and bundles
2021-10-18 14:55:11 -04:00
Michael Stenta
95bedca516
Fix comment in AssetMoveActionForm.
2021-10-18 10:55:29 -04:00
paul121
e79da002b5
Test that deleting an inventory adjustment updates the asset's inventory.
2021-10-18 10:54:28 -04:00
paul121
11344de38b
Use a LogEventSubscriber to invalidate asset cache on inventory changes.
2021-10-18 10:54:28 -04:00
paul121
b7984ec850
Add failing tests for asset inventory cache invalidation.
2021-10-18 10:47:24 -04:00
paul121
c3aa76dc90
Update farm_location LogEventSubscriber service name and description.
2021-10-18 10:12:44 -04:00
paul121
be8d5ef14b
Fix typo in LocationTest::testLocationAssets.
2021-10-18 10:12:44 -04:00
paul121
6ef8a213dc
Test that deleting a movement log updates the asset's location.
2021-10-18 10:12:44 -04:00
paul121
d77c535105
Refactor farm_location tests to test asset cache tag invalidation directly instead of via requests to JSONAPI.
2021-10-18 10:12:44 -04:00
paul121
00eb75ea71
Only invalidate cache of assets if the movement log timestamp is in the past.
2021-10-18 10:12:44 -04:00
paul121
5a8ee98294
Refactor the location log event subscriber to use an isActiveMovementLog helper method.
2021-10-18 10:12:44 -04:00
paul121
3c4a5cfeea
Add trait for testing entity cache invalidation.
2021-10-18 10:12:44 -04:00
Michael Stenta
44eb865048
Stub crop family reference terms.
...
If the crop family migration happens after plant type migration
then these references would not be populated. This shouldn't
happen, because plant type depends on crop family, but it may
be possible. Better to know that something happened than to
silently end up with empty references.
2021-10-14 09:42:13 -04:00
Michael Stenta
c7d2fce98e
Remove forum_container field processing from taxonomy term migration group.
...
We don't need this for anything.
2021-10-11 15:46:08 -04:00
Michael Stenta
7f2e56bd61
Issue #3242468 : Validation error migrating taxonomy terms that are parents of other terms
2021-10-11 15:45:56 -04:00
Michael Stenta
ccbb206d56
Remove request_time migrate process plugin - no longer used.
2021-10-11 14:44:54 -04:00
Michael Stenta
70e391c864
Do not archive areas without an area type during migration.
...
This was supposed to be included with the previous commit:
4d59cd69c7
2021-10-11 14:42:43 -04:00
paul121
d86c21cff2
Issue #3241690 by paul121: User 1 cannot use the refresh_token grant type
...
Load all roles for user 1 so they can be granted all possible scopes.
2021-10-08 19:29:03 -04:00
paul121
703f31d0e1
Issue #3241652 by paul121: Depend on drupal/subrequests
2021-10-08 17:46:51 -04:00
Michael Stenta
840307e36d
Remove unnecessary remember_roles from Views config.
2021-10-04 19:21:00 -04:00
paul121
e6b76a7446
Issue #3240330 by paul121: Computed bundle fields break page_type views
...
Default to the entity type's base table if the table mapping does not find a table for the bundle field.
2021-10-04 16:28:29 -04:00
Michael Stenta
6207d09d9d
Style the reports toolbar icon with a Gin SVG.
2021-10-04 12:24:08 -04:00
Michael Stenta
0defc4d966
Move the farm.report menu link to the farm.base parent via farm_ui_menu.
2021-10-04 12:24:08 -04:00
Michael Stenta
f2da5c96c8
Grant report index access to managed roles with config-level access.
2021-10-04 12:24:08 -04:00
Michael Stenta
b5360d91be
Add an index of reports at /report.
2021-10-04 12:24:08 -04:00
Michael Stenta
dccaa1f43a
Initial farm_report module.
2021-10-04 12:24:08 -04:00
Michael Stenta
cafd8bd760
Limit Views Entity Reference exposed filters by View or target_bundles.
2021-10-04 12:02:37 -04:00
paul121
254c303e33
Remove log.asset and log.location filters from the page_asset display.
2021-10-04 10:30:41 -04:00
paul121
99b1ca5637
Add default exposed filters for log.asset and log.location.
2021-10-04 10:30:41 -04:00
paul121
8127e751a8
Specify accessCheck(FALSE) in LoqQueryTest.
2021-10-01 10:01:35 -07:00
Michael Stenta
2ebeef595e
Require explicit use of accessCheck() on the result of farm.log_query service.
2021-10-01 12:44:07 -04:00
Michael Stenta
f462573b4e
Do not check access in log entity queries in asset.location and group.membership services.
2021-10-01 10:46:16 -04:00
paul121
b9f41d7d69
Explicitly enable access checking on content entity queries.
...
Not calling ::accessCheck() is deprecated in Drupal 9.2. See
https://www.drupal.org/node/3201242
2021-10-01 10:46:16 -04:00
Michael Stenta
e6f183512c
Do not allow ID Tag field to be created through the UI. #451
2021-10-01 07:07:57 -04:00
Michael Stenta
32f6457a06
Fix ID Tag type textfield fallback.
2021-10-01 06:20:32 -04:00
Michael Stenta
092b6936d4
Clarify that farm_update only reverts configuration entities - not simple config.
2021-09-27 09:50:22 -04:00
paul121
3a46ccb60b
Issue #3239191 by paul121: Change farm_update to ignore simple config
2021-09-27 09:50:10 -04:00
Symbioquine
efb8535150
Improve plan archive timestamp behavior #446
...
**Why?** Fix some weird behavior and make sure
inconsistent states cannot occur;
* Allow setting the archived timestamp at the same
time as moving a plan to the archived state.
* Ensure that the archived timestamp cannot be set
without also transitioning into the archived state.
* Ensure that the arhived timestamp cannot be set to
NULL without transitioning back to the active state.
2021-09-24 12:36:14 -04:00
Symbioquine
27142866d3
Improve asset archive timestamp behavior #446
...
**Why?** Fix some weird behavior and make sure
inconsistent states cannot occur;
* Allow setting the archived timestamp at the same
time as moving an asset to the archived state.
* Ensure that the archived timestamp cannot be set
without also transitioning into the archived state.
* Ensure that the arhived timestamp cannot be set to
NULL without transitioning back to the active state.
2021-09-24 12:36:14 -04:00
Michael Stenta
20ceb84193
Move ID Tag base field to farm_id_tag.
2021-09-24 12:23:01 -04:00
Michael Stenta
e9e523c095
Move flag base field, action, config, and logic to farm_flag.
2021-09-24 12:22:25 -04:00
Michael Stenta
0029cfbf01
Move Views stuff from farm_entity to new farm_entity_views sub-module.
2021-09-24 12:21:15 -04:00
Michael Stenta
9e26868112
Move base field definitions from farm_entity to new farm_entity_fields sub-module.
2021-09-24 12:21:15 -04:00
Michael Stenta
792c24edce
When a log is saved without owner(s), set the current user as the owner.
2021-09-24 11:50:32 -04:00
Michael Stenta
1502115bc7
Move log assignment action to farm_owner module.
2021-09-24 11:50:32 -04:00
Michael Stenta
0f84ff1575
Move Log Owner base field to dedicated farm_owner module.
2021-09-24 11:50:32 -04:00
paul121
6646a31d37
Log the result after reverting config. #447
2021-09-24 10:03:19 -04:00
Michael Stenta
e0e34d6e01
The farm_geo module depends on geofield for the geofield.geophp service.
2021-09-23 16:54:55 -04:00
Michael Stenta
db40dc13a6
Exclude system.performance config from automatic updates.
2021-09-23 09:55:41 -04:00
Michael Stenta
b08c9ab1b5
Exclude user.role.anonymous and user.role.authenticated config from automatic updates.
2021-09-23 09:55:41 -04:00
Michael Stenta
d51176aef1
Automated tests of farmOS Update module.
2021-09-23 09:55:41 -04:00
Michael Stenta
f575b0039f
Exclude farm_update.settings config from automatic updates, just to be safe.
2021-09-23 09:55:41 -04:00
Michael Stenta
f881bea2e3
Allow additional config exclusions to be defined in farm_update.settings.
2021-09-23 09:55:41 -04:00
Michael Stenta
e36ac7a33f
Exclude quantity.settings config from automatic updates.
2021-09-23 09:55:41 -04:00
Michael Stenta
938fb5926c
Exclude config that we override in hook_install().
2021-09-23 09:55:41 -04:00
Michael Stenta
a46c0923a0
Exclude core configuration items from automatic updates.
2021-09-23 09:55:41 -04:00
Michael Stenta
24d158341f
Add a hook_farm_update_exclude_config() to allow modules to exclude config from automatic updates.
2021-09-23 09:55:41 -04:00
Michael Stenta
95702e5be4
Log when reverting config fails.
2021-09-23 09:55:41 -04:00
Michael Stenta
8d034c5186
Revert overridden configuration on rebuild().
...
Inspired by ConfigUpdateUiCliService.
2021-09-23 09:55:41 -04:00
Michael Stenta
59dd58a962
Provide a farm_update:rebuild Drush command.
2021-09-23 09:55:41 -04:00
Michael Stenta
039eb0fbf5
Run FarmUpdate::rebuild() via hook_rebuild().
2021-09-23 09:55:41 -04:00
Michael Stenta
2dd6a268f8
Initial farm.update service with rebuild() method.
2021-09-23 09:55:41 -04:00
Michael Stenta
fbb589655d
Initial farm_update module.
...
Installed with base modules.
2021-09-23 09:55:41 -04:00
Michael Stenta
7092a0830f
Refactor dashboard block handling to always expect block plugin ID.
2021-09-22 15:17:17 -04:00
Eva Martinez
3ea20c1d63
#3236712 : Renamed block plugin variable and use the renamed dashboard pane key and simplify block access check.
2021-09-22 15:10:31 -04:00
Eva Martinez
ddefa1e2c9
#3236712 : Rename new dashboard pane key.
2021-09-22 15:10:31 -04:00
Eva Martinez
af786a9abc
#3236712 : Added functionality to render custom blocks in dashboard.
2021-09-22 15:10:31 -04:00
Eva Martinez
62562def8f
#3236712 : Added new plugin block key to dashboard pane.
2021-09-22 15:10:31 -04:00
Michael Stenta
219311568c
Create material quantities after general log quantities.
...
The thought here is that the "important" quantities should be
"first" on the log.
2021-09-22 14:45:20 -04:00
paul121
5fd89cf2f8
Migrate input log material term reference field to Material Quantities.
2021-09-22 14:45:20 -04:00
paul121
a847724a46
Save quantities as a pseudo field in the farm_migrate_log migration group.
...
This is necessary so that individual log types can use pseudo fields in
the "quantity" process if they override it themselves.
When a migration group defines shared_configuration processes that are
overwritten by a migration, the processes are still executed in the
order defined by the migration group. This prevents an individual
migration from using its own pseudo fields for a process that it
overrides.
2021-09-22 14:45:20 -04:00
s33a
b88877b617
Rename "Material" taxonomy to "Material types".
...
This also changes the `material` term reference field on
Input logs to `material_type`, and updates all migrations
accordingly.
2021-09-22 14:45:20 -04:00
Michael Stenta
ede1ed7605
Fix "entity.plan.collection does not exist" when plans module is not enabled.
2021-09-22 14:43:45 -04:00
Michael Stenta
320ec3d331
Add INSERT and UPDATE log events.
2021-09-21 17:34:54 -04:00
Michael Stenta
a54e1c0a62
Add help text to /assets, /logs, /quantities, and /plans.
2021-09-20 16:42:36 -04:00
Michael Stenta
b966281d77
Put farm_map_mapbox into "farmOS Maps" group.
2021-09-20 16:10:52 -04:00
Michael Stenta
293717e95b
Put modules into "farmOS (Defaults)" group: farm_land_types, farm_structure_types, farm_role_roles.
2021-09-20 16:10:19 -04:00
Michael Stenta
31ae3b0246
Do not show full data_stream entity summaries on sensor pages.
2021-09-20 15:10:37 -04:00
Michael Stenta
c9f316adbb
Display all data in CSV export.
2021-09-20 15:07:26 -04:00
Michael Stenta
bfb1e3cfbf
Add row summary count to data stream basic View footer.
2021-09-20 15:07:26 -04:00
Michael Stenta
78bc327fa7
Require cookie authentication for CSV display.
2021-09-20 15:07:26 -04:00
Michael Stenta
1e714a2453
Rename View display from rest_export to csv, and override footer for all displays, for consistency.
2021-09-20 15:07:26 -04:00
Michael Stenta
4570ccd975
Use full pager for data stream basic View and limit to 100 records per page.
2021-09-20 15:07:25 -04:00
Michael Stenta
5478293d2b
Translate labels in developer information.
2021-09-20 15:07:25 -04:00
Michael Stenta
4a236b1a86
Delete data_stream references from sensor assets during migration rollback.
2021-09-20 15:07:25 -04:00
Michael Stenta
4d1c14b14b
Render the data stream entity references and developer information in the bottom region of asset pages.
2021-09-20 15:07:24 -04:00
Michael Stenta
a85f95d6ab
Display data stream entity reference label above View.
2021-09-20 15:07:24 -04:00
Michael Stenta
5d29318e67
Move SensorListenerDataNames migrate d7 source plugin to farm_migrate module.
2021-09-20 15:07:24 -04:00
paul121
7802896254
Update data_stream_basic_data view to use the data_stream_basic base table.
2021-09-20 15:07:24 -04:00
paul121
fba766935d
Standardize naming of data stream views fields.
2021-09-20 15:07:24 -04:00
paul121
236c8bbd92
Allow data_stream_basic to be used as a views base table.
2021-09-20 15:07:24 -04:00
paul121
1428ef1db3
Render the data stream name as a link in the summary display.
2021-09-20 15:07:24 -04:00
paul121
670b47b95e
Allow data stream fields to be configured via field_ui.
2021-09-20 15:07:24 -04:00
paul121
33473fb8f8
Only render developer information in the full view mode.
2021-09-20 15:07:24 -04:00
paul121
71e27b6635
Add a summary view mode for data streams.
2021-09-20 15:07:24 -04:00
paul121
92c2f49231
Migrate listener sensor data in a post row save event.
2021-09-20 15:07:24 -04:00
Paul Weidner
0f1ddb5dbe
Migrate listener sensor data into data_stream_basic.
2021-09-20 15:07:24 -04:00
Paul Weidner
a4f28a950d
Migrate each listener sensor named value into a new data stream.
2021-09-20 15:07:24 -04:00
Paul Weidner
97bf5139c9
Move listener sensor asset to dedicated migration.
2021-09-20 15:07:24 -04:00
paul121
5ed294b630
Allow the sensor type to be specified in the d7_sensor_asset source plugin.
2021-09-20 15:07:24 -04:00
paul121
e528813330
Refactor listener data streams to be basic data streams with a separate API endpoint.
2021-09-20 15:07:24 -04:00
paul121
71c831223d
Bail if no data streams are specified.
2021-09-20 15:07:24 -04:00
paul121
b0f4855441
Allow filtering by multiple named values.
2021-09-20 15:07:24 -04:00
paul121
6a5abea6f8
Add storageGetMultiple method to support querying multiple basic data streams.
2021-09-20 15:07:24 -04:00
paul121
618a7961d6
Add return type to storageGet annotation.
2021-09-20 15:07:24 -04:00
paul121
74fc3933db
Fix storageGet args parameter.
2021-09-20 15:07:24 -04:00
paul121
219d11ccdb
Remove DataStreamSqlStorage trait.
2021-09-20 15:07:24 -04:00
paul121
93e8bd79bc
Use the data stream entity name in name/value pairs.
2021-09-20 15:07:24 -04:00
paul121
1a10fbf276
Render data stream entities in the default view mode.
2021-09-20 15:07:24 -04:00
paul121
9fa7c4a9e4
Remove (decimal) from Sensor value (decimal).
2021-09-20 15:07:24 -04:00
paul121
b93d048023
Add test for non-numeric data stream data.
2021-09-20 15:07:24 -04:00
paul121
ded2a3971d
Render developer information details element in basic data stream view.
2021-09-20 15:07:24 -04:00
paul121
33e7ee6903
Render the data stream public field as a yes-no boolean.
2021-09-20 15:07:24 -04:00
paul121
1f386ab989
Hide the data stream private key.
2021-09-20 15:07:24 -04:00
Michael Stenta
f9ecfbbf91
Popup name is required to show popup.
...
This fixes an issue introduced in commit fcf32771bd
which broke cluster popups. This still works to fix the issue
that the previous commit sought to fix (do not show popups
while drawing).
2021-09-20 15:07:24 -04:00
Michael Stenta
f00313db03
Move create_quantity migration plugin to quantity module.
2021-09-20 14:13:18 -04:00
Michael Stenta
312d611b64
Print the name of the migration group being imported/rolled back in farm_migrate Drush commands.
2021-09-20 12:11:07 -04:00
Michael Stenta
5f232b4319
Move all sub-modules into sub-directories called "modules" for consistency.
2021-09-17 16:11:38 -04:00
Michael Stenta
89996482be
Issue #3220623 : Split Sale/Purchase/Price bundles out to contrib
2021-09-17 15:59:27 -04:00
paul121
c48e380295
Allow quantity types to specify a default measure.
2021-09-17 15:59:27 -04:00
paul121
94ef94825c
Increase weight between quantity base fields.
2021-09-17 15:59:27 -04:00
Michael Stenta
3257fc6e7b
Remove config_rewrite module.
2021-09-16 19:08:58 -04:00
Michael Stenta
f73b9115fb
Refactor farm_ui_location config_rewrite settings into hook_install().
2021-09-16 19:08:58 -04:00
Michael Stenta
505dc83130
Refactor farm_entity config_rewrite settings into hook_install().
2021-09-16 19:08:58 -04:00
Michael Stenta
e2d822ac4a
Refactor farm_api config_rewrite settings into hook_install().
2021-09-16 19:08:58 -04:00
Michael Stenta
4e29f299cd
Put "Current inventory" field in right column of asset page.
2021-09-15 15:35:40 -04:00
paul121
ee96a153d9
Render inventory information after the quantity in the format (@adjustment @asset inventory).
2021-09-15 15:35:40 -04:00
paul121
b770db6552
Allow quantity fields to be rendered before and after the standard fields.
2021-09-15 15:35:40 -04:00
paul121
f534299d38
Add view of inventory adjustments in an inventory tab on asset pages.
2021-09-15 15:35:40 -04:00
Michael Stenta
19e2c845c1
Translate inventory adjustment widget validation errors.
2021-09-15 15:35:40 -04:00
paul121
7cb61108b9
Add custom validation for quantity inventory values.
2021-09-15 15:35:40 -04:00
paul121
e9caab4e4a
Hide the inventory asset field until an inventory adjustment is selected.
2021-09-15 15:35:40 -04:00
paul121
b236424bc0
Default the quantity inventory_adjustment to N/A.
2021-09-15 15:35:40 -04:00
Michael Stenta
a30acfb82e
Delete parent references to taxonomy terms during migration rollback.
2021-09-15 15:33:17 -04:00
Michael Stenta
ff547ed8a5
Delete companion references to plant type terms during migration rollback.
2021-09-15 14:59:54 -04:00
Michael Stenta
1652c4746f
Add a farm_migrate:rollback Drush command that rolls back all farmOS migrations.
2021-09-15 14:22:09 -04:00
Michael Stenta
a24c3ff221
Add a farm_migrate:import Drush command that executes all farmOS migrations.
2021-09-15 14:22:03 -04:00
Michael Stenta
c477e05896
Only delete quantity references for quantities that were created by migrations in the farm_migrate_quantity migration group.
...
This ensures that references to quantities created with the
create_quantity process plugin are maintained, so those
quantities can be deleted normally when the log is deleted.
2021-09-15 14:21:54 -04:00
Michael Stenta
f3ec44d43e
Issue #3189740 by m.stenta: Cannot rollback farm_migrate_asset_parent group migrations
2021-09-15 12:03:04 -04:00
Michael Stenta
14bb01e681
Rename farm_migrate_reference group to farm_migrate_asset_parent.
2021-09-15 12:03:04 -04:00
Michael Stenta
44a14b5422
Issue #3229503 : Rolling back log migration deletes quantities
2021-09-15 12:03:04 -04:00
Michael Stenta
53dc64258e
Temporarily allow access to private file referencing during migration.
2021-09-15 09:01:50 -04:00
Michael Stenta
09ed36b10b
Grant/revoke 'use text format default' permission to/from anonymous role during farm_migrate_taxonomy group migrations.
...
This is necessary because Drush runs migrations as anonymous
user, which does not have access to 'use text format default'
permission, so any terms that need that format fail validation.
2021-09-15 09:00:10 -04:00
Michael Stenta
359a1f8aea
Generalize migration event subscriber so that more events can be added.
2021-09-14 20:42:54 -04:00
Michael Stenta
b90f00e5ed
Ensure that no migrate entities end up with a uid of 0. Make user 1 the default.
2021-09-14 19:25:34 -04:00
Michael Stenta
03e6572f6a
Set the user ID of migrated area assets to 1.
2021-09-14 19:25:34 -04:00
Michael Stenta
fc51877a89
Enable entity validation for area, asset, log, plan, and taxonomy term migrations.
2021-09-14 19:25:34 -04:00
Symbioquine
3152895f15
Enable the map side panel with layer switcher by default #442
...
**Why?** Provide a place for more settings and information
to be included on farmOS maps without introducing more and more
border clutter.
2021-09-12 10:23:03 -07:00
paul121
71159d83c3
Issue #3232237 by paul121: Allow the map widget textarea to be hidden
...
Add display_raw_geometry setting to the map widget.
2021-09-10 07:17:47 -04:00
paul121
92f197a3fa
Log errors when creating key files.
2021-09-09 16:30:43 -04:00
paul121
26d717521c
Do not modify key file permissions.
2021-09-09 16:30:43 -04:00
paul121
73a4fdc529
Move farmOS-map composer dependency to composer.libraries.json.
2021-09-09 15:03:27 -04:00
Michael Stenta
6c7c238ab8
Copy localized_options into the dropbutton URL options.
...
This is necessary to maintain any query parameters that
were added to the action links.
2021-09-09 15:02:18 -04:00
Michael Stenta
ee21d1e38d
Override Gin local actions block to render links in a dropbutton.
2021-09-09 15:02:18 -04:00
Michael Stenta
118250db66
Add the entity_bundles cache tag so action links are recreated after new bundles are installed.
2021-09-09 14:27:31 -04:00
Michael Stenta
22ae662113
Merge FarmAssetAddLogAction and FarmAddLogPrepopulate into FarmActions and AddEntity classes in farm_ui_actions module.
2021-09-09 14:27:31 -04:00
Michael Stenta
59e25655ae
Generalize AddEntity LocalAction bundle parameter logic.
...
Derivatives can either define a bundle_parameter to look for
(eg: 'arg_0' in the case of Views), OR explicitly define the
bundle.
This will allow FarmAddLogPrepopulate to be merged into the
Menu/LocalAction/AddEntity class, and FarmAssetAddLogAction
to be merged into the Derivative\FarmActions class.
2021-09-09 14:27:31 -04:00
Michael Stenta
c327472dc4
Move UI modules into core directory.
2021-09-09 14:27:31 -04:00
Michael Stenta
2a52a82d4f
Fix hook_farm_api_meta_alter() documentation.
2021-09-09 14:27:31 -04:00
Michael Stenta
3d6161453f
Hide geometry field label in asset and log page top region.
2021-09-09 14:26:15 -04:00
Michael Stenta
7e67a71c06
Add some vertical padding to layout regions.
2021-09-09 14:26:15 -04:00
Michael Stenta
08c50d7fde
Fix TypeError: Argument 1 passed to Drupal\Core\Entity\EntityStorageBase::loadMultiple() must be of the type array or null, string given.
...
This error occurs if ?asset=X is used instead of ?asset[]=X.
We can take a more defensive approach by automatically
wrapping the input in an array if it isn't already one.
2021-09-06 11:00:51 -04:00
Michael Stenta
434b473e14
Move toolbar-toggle map resize event listener JS to farm_ui_theme.
2021-09-06 11:00:51 -04:00
Michael Stenta
e4c35aca19
Set $defaultTheme to stark in all WebDrivcerTestBase tests.
2021-09-06 11:00:51 -04:00
Michael Stenta
b49441efe4
Set $defaultTheme to stark for all descendants of FarmBrowserTestBase.
2021-09-06 10:46:20 -04:00
Symbioquine
c92fe90985
Refactor most of farm_map.js into factory method #436
...
**Why?** Allow JS in contrib modules to take advantage of
now decoupled map instantiation code to create canonically
extensible/styled maps where the life-cycle of those maps
is controlled by the contrib module JS code.
For example, a contrib module's controller can return;
```php
return [
'map-prototype' => [
'#type' => 'farm_map',
'#attributes' => [
'id' => 'example-tool-map-prototype',
'data-map-instantiator' => 'example-tool',
],
],
];
```
Then create map instances from custom JS like this;
```js
const mapPrototypeElement = document.getElementById('example-tool-map-prototype');
const mapElement = mapPrototypeElement.cloneNode();
mapElement.removeAttribute('id');
myParentContainer.appendChild(mapElement);
const mapInstance = Drupal.behaviors.farm_map.createMapInstance(mapElement, mapElement, 'example-tool-map-prototype', {});
```
2021-09-03 15:20:26 -04:00
Symbioquine
6ce9ec2480
Reduce coupling between map element id and other logic #436
...
**Why?** There were a bunch of places where farmOS implicitly depends
on the id of the map element to look up settings and access the map
element after the map is instantiated.
This change makes it so there is only one place in the JS that depends
on the map id to dereference the drupalSettings and assign them under
`instance.farmMapSettings` so behaviors can access them.
2021-09-03 15:20:26 -04:00
Symbioquine
9c94dab9db
Decouple FarmMap render element styling and JS instantiation #436
...
**Why?** It should be possible to leverage the farm_map
module's extension mechanism and default styling without
necessarily giving it full control over when the map
instance gets created.
Currently, the FarmMap render element uses the 'farm-map'
CSS class to inform the JS code in `farm_map.js` that it should
instantiate the map. This is problematic since that CSS class
is also used for styling and there's a bunch of code in the
FarmMap render element and in `farm_map.js` which should
be common to pretty much all farmOS maps.
To fix that, this change introduces a new [data attribute] which
is used instead of the CSS class to signal the JS code in `farm_map.js`
that it should actually instantiate the map.
[data attribute]: https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes
2021-09-03 15:20:26 -04:00
Michael Stenta
8f9123b975
Set popup behavior weight to -100.
...
...so that behaviors that use instance.popup.on()
(including asset_type_layers) don't need to worry
about setting their weight heavier.
2021-09-03 15:19:03 -04:00
Michael Stenta
fcf32771bd
Only show popups for features that have a name.
...
This fixes the annoying issue where a mostly-blank popup
appears while drawing shapes in Geofield widget.
2021-09-03 15:16:33 -04:00
Michael Stenta
37d10f738a
Add @see link to Issue #3230970 : Generalize KML importer to create any asset type
2021-09-01 23:21:37 -04:00
Michael Stenta
71db605a98
Merge geometries from multiple uploaded files together.
2021-09-01 22:47:08 -04:00
Michael Stenta
2b7408e87c
Support KMZ files in GeofieldWidget "Import geometry from uploaded files".
2021-09-01 22:47:08 -04:00
Michael Stenta
a01cc1a930
Change "Find using files field" to "Import geometry from uploaded files".
2021-09-01 22:47:08 -04:00
Michael Stenta
e2a1c112e4
Ensure field wrapper DOM ID is unique with Html::getUniqueId().
2021-09-01 22:47:08 -04:00
paul121
edc107d74a
Add warning messages.
2021-09-01 22:47:08 -04:00
paul121
c123e3d2b4
Disable the find using files field button until a file is uploaded.
2021-09-01 22:47:08 -04:00
paul121
299ff56ee0
Allow log and asset geometry to be populated from the file field.
2021-09-01 22:47:08 -04:00
paul121
ca13997d69
Add setting to farm_map_geofield field widget to support populating geometry from a form file field.
2021-09-01 22:47:08 -04:00
paul121
70ad63479d
Allow geojson and gpx file extensions.
2021-09-01 22:47:08 -04:00
Michael Stenta
261e957b1b
Do not reduce geometries after they have been combined with combineWkt().
...
Reducing changes a GeometryCollection of Polygons into a
MultiPolygon, which is not our intention in most cases.
If code needs a reduced geometry it can call the reduceWkt()
method intentionally.
2021-09-01 22:46:37 -04:00
Michael Stenta
41d3eac174
Move WktTrait to farm_geo module.
2021-09-01 22:46:37 -04:00
Michael Stenta
8c0d20d138
Remove unused $defaultFileScheme from KmlImporter.
2021-09-01 16:59:12 -04:00
Michael Stenta
950d666e56
Support KMZ files in KML importer.
2021-09-01 15:27:02 -04:00
Michael Stenta
ec24339bd3
Change KML content type to application/vnd.google-earth.kml+xml.
2021-09-01 15:27:02 -04:00
Michael Stenta
84e2e64f48
Add KML importer help text.
2021-09-01 15:27:02 -04:00
Michael Stenta
e293ca80bf
Hide KML importer output until submission.
2021-09-01 15:27:02 -04:00
Michael Stenta
45acc539a3
Add menu link for KML importer and depend on farm_import.
2021-09-01 15:27:02 -04:00
Michael Stenta
414b9e27ed
Change KML importer route to farm.import.kml.
2021-09-01 15:27:02 -04:00
Michael Stenta
5f81d46338
Add a /import page controller that displays all sub-menu items.
2021-09-01 15:27:02 -04:00
Michael Stenta
6487f394f0
Create a placeholder farm_import module.
...
This can be the future home of import-related support code.
CSV importers can be built here, or in sub-modules of this.
The KML importer can move here, and future importers for
GeoJSON and other formats may also be added.
2021-09-01 15:27:02 -04:00
Michael Stenta
3ea781aa42
Change KML importer form router path to import/kml.
2021-09-01 15:27:02 -04:00
Michael Stenta
64ba44c694
Move farm_kml_import module to farm_import_kml.
2021-09-01 15:27:02 -04:00
Michael Stenta
2303d9c14a
Expand ContentEntityGeometryNormalizer docblock.
2021-09-01 15:27:02 -04:00
Michael Stenta
08cb0edda8
The farm_kml_import module depends on farm_kml.
2021-09-01 15:27:02 -04:00
Michael Stenta
d37d801002
Rename ContentEntityNormalizer to ContentEntityGeometryNormalizer.
2021-09-01 15:27:02 -04:00
Michael Stenta
c0989179be
Move GeometryWrapper and ContentEntityNormalizer to farm_geo module.
2021-09-01 15:27:02 -04:00
Michael Stenta
38e8b9fcf3
Start a new farm_geo module for geospatial features that other modules can use.
2021-09-01 15:27:02 -04:00
Michael Stenta
633f3e2ac5
Add references to GeoPHP maintainer suggestions to create a Geometry wrapper object for storing non-geospatial properties.
2021-09-01 15:27:02 -04:00
Michael Stenta
8fff08df4e
Add entity type, bundle, and internal ID to KML.
2021-09-01 15:27:02 -04:00
Michael Stenta
0424fbbd84
Use UUIDs as the geometry ID property instead of Drupal internal ID.
2021-09-01 11:21:12 -04:00
paul121
8a1e640f32
Refactor KML to denormalize to a GeometryWrapper object.
2021-09-01 11:21:12 -04:00
paul121
297a227e92
Refactor the ContentEntityNormalizer to normalize from a GeometryWrapper object.
...
This allows the ContentEntityNormalizer to be supported by other
normalizers and encoders that support a format prefixed "geometry_".
2021-09-01 11:21:12 -04:00
paul121
ca548afd05
Provide a GeometryWrapper class.
2021-09-01 11:21:12 -04:00