3
0
Fork 0
mirror of https://github.com/farmOS/farmOS.git synced 2024-02-23 11:37:38 +01:00
Commit graph

1333 commits

Author SHA1 Message Date
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
paul121 376c607be8 Add KML import form. 2021-09-01 11:21:08 -04:00
paul121 dc32805c96 Add WKTGeometryNormalizer. 2021-09-01 11:10:15 -04:00
paul121 4ac98cf3b2 Add KML decoder. 2021-09-01 11:10:15 -04:00
paul121 3250f30da1 Init farm_kml_import module. 2021-09-01 11:10:15 -04:00
paul121 aeaafe06a9 Add KML as known request format. 2021-09-01 11:10:15 -04:00
paul121 d55c84da28 Provide normalizer and encoder to serialize content entities to KML. 2021-09-01 11:10:15 -04:00
paul121 4611c2e43f Add Export KML action for log and asset entities. 2021-09-01 11:10:15 -04:00
paul121 83312641b5 Provide an EntityKML action. 2021-09-01 11:10:15 -04:00
paul121 7641151afb Init farm_kml module. 2021-09-01 11:10:15 -04:00
Michael Stenta 48bd4f9f81 Prefix farm_map.settings router item path with a slash for consistency. 2021-09-01 11:10:15 -04:00
Michael Stenta 8f98db20b6 Use asset names helper function to generate log names when using the group/move actions. 2021-08-30 17:55:58 -04:00
Michael Stenta 835209e5a2 Add a helper function for generating truncated lists of asset names. 2021-08-30 17:55:58 -04:00
Michael Stenta c8089ee561 Do not limit log assign action user list to managed roles. 2021-08-30 14:35:00 -04:00
Michael Stenta 7fad319709 Add enforced dependency on farm_entity to asset_flag_action config. 2021-08-30 13:45:32 -04:00
Michael Stenta d01189a99c Use #date_part_order of year, month, day. 2021-08-30 13:45:32 -04:00
Michael Stenta c741692eed Use a date range of -15:+15 in asset group and move actions to match Log module. 2021-08-30 13:45:32 -04:00
Michael Stenta 4aa8fbdac2 Move logic to prepopulate the log asset field to the farm_log module. 2021-08-30 13:45:32 -04:00
Paul Weidner c1bbba0f81 Check view and create access instead of update access for the Asset Clone action. 2021-08-30 13:45:32 -04:00
Paul Weidner 72e3397d3d Use default date_year_range values. 2021-08-30 13:45:32 -04:00
Paul Weidner 142ecb1ed6 Only require view access to assets referenced by logs. 2021-08-30 13:45:32 -04:00
Paul Weidner 30b83735ba Limit to log types the user has access to create. 2021-08-30 13:45:32 -04:00
Paul Weidner 8420246b0a Do not require a location asset so the location can be reset. 2021-08-30 13:45:32 -04:00
Michael Stenta deb768d99f Check flag field edit access in EntityFlag action. 2021-08-30 13:45:32 -04:00
paul121 e8db19a9d9 Create asset_add_log action. 2021-08-30 13:45:32 -04:00
paul121 545a0b4bbd Prepopulate the log asset field when creating new logs. 2021-08-30 12:28:51 -04:00
paul121 8dd7ecc88b Only display active users that have a managed role in log assign form. 2021-08-30 12:28:51 -04:00
paul121 6d69b44df3 Create log_assign_action. 2021-08-30 12:28:51 -04:00
paul121 d01f511850 Create asset_move_action. 2021-08-30 12:28:51 -04:00
paul121 f7ce438a40 DeleteMultipleRouteProvider is deprecated. 2021-08-30 12:28:51 -04:00
paul121 5e4f66c896 Enable the flag action for asset log and plan entities. 2021-08-30 12:28:51 -04:00
paul121 b6f288f3cb Provide an entity flag action. 2021-08-30 12:28:51 -04:00
paul121 cd10d8c00f Add asset clone action. 2021-08-30 12:28:51 -04:00
Michael Stenta b2f5349892 Add actions for archiving/activating assets and plans. 2021-08-30 12:28:51 -04:00
Michael Stenta 36fb583416 Do not show modules box if none are present. 2021-08-23 11:02:10 -04:00
Michael Stenta ff1a2a2b8e Move modules description text to help text. 2021-08-23 11:02:10 -04:00
Michael Stenta be546a2fc5 Change "Contrib modules" to "Community modules". 2021-08-23 10:41:50 -04:00
Michael Stenta 1e2995f585 Add docblock for FarmSettingsModulesForm::moduleOptions().
This class no longer extends from FarmModulesForm, which
originally provided this documentation.
2021-08-23 10:39:14 -04:00
paul121 c68ae68ae9 Test installing a contrib module with uninstalled core dependency. 2021-08-23 10:05:54 -04:00
paul121 f7f1d07bae Increase timeout for installing modules. 2021-08-23 10:05:54 -04:00
paul121 ca54455497 Add tests for the farm settings modules form. 2021-08-23 10:05:54 -04:00
paul121 b19f3c6342 Specify the submit button name.
This makes it easier to identify in tests.
2021-08-23 10:05:54 -04:00
Paul Weidner 23ebe88395 Add message if there are no contrib modules. 2021-08-23 10:05:54 -04:00
paul121 220c816fb9 Disable the submit button until an uninstalled module is checked. 2021-08-23 10:05:54 -04:00
paul121 d68ab9b61e Change form title to read "Install modules". 2021-08-23 10:05:54 -04:00
paul121 bacafa9c0c Allow contrib modules to be installed in the FarmSettingsModulesForm. 2021-08-23 10:05:54 -04:00
paul121 9d986a53ba Refactor to use ModuleExtensionList instead of ModuleHandler. 2021-08-23 10:05:54 -04:00
paul121 3e37c5ad45 Refactor FarmSettingsModulesForm to not extend FarmModulesForm. 2021-08-23 10:05:54 -04:00
Symbioquine 825d37a729 Add weights to ensure map popup is behavior loaded before use #425
**Why?** In 1.x and 2.x prior to this change we were depending on
the insertion order in JS objects to make sure `instance.popup` got
populated before it is used. This change makes the order of the
behavior attachement deterministic - even with farmOS-map 2.x where
the behaviors get attached asynchronously.
2021-08-23 09:59:36 -04:00
Symbioquine b33feb6293 Upgrade to farmOS-map 2.x #425
**Why?** farmOS-map 2.x provides a slightly cleaner
API and more modular/extensible behavior loading.
2021-08-23 09:59:36 -04:00
paul121 a98e24046f Move location API tests to a separate functional test.
The API requests are incompatible with the javascript test driver.
2021-08-23 09:18:57 -04:00
paul121 a592f6d6a5 Create a LocationFunctionalTestTrait that provides test setup logic. 2021-08-23 09:18:57 -04:00
paul121 40656df9b1 Correct namespace. 2021-08-23 09:18:57 -04:00
paul121 3f799c5adb Fix method for finding fields with variable visibility.
Look for the fieldset wrapper instead of the actual field. This is
sufficient for testing visibility.
2021-08-23 09:18:57 -04:00
paul121 039012c124 WebDriver does not return status codes. 2021-08-23 09:18:57 -04:00
Michael Stenta 9e9734c3f5 Include link to new assets and plans in confirmation message. 2021-08-03 09:11:51 -04:00
paul121 af0b086180 Use the getManagedRoles function to simplify loading of managed roles. 2021-07-30 15:30:40 -04:00
paul121 25d38173f8 Add getManagedRoles function to the managed role permissions manager
service.
2021-07-30 15:30:40 -04:00
paul121 b60d85db5e Invalidate asset cache when movement logs are deleted. 2021-07-30 15:30:40 -04:00
Michael Stenta 313951c798 Move views.view.farm_asset_reference to optional config. 2021-07-30 12:40:41 -04:00
Michael Stenta b8b3d8c5d0 Add a dependency on drupal:taxonomy to farm_entity module. 2021-07-27 09:34:43 -04:00
Michael Stenta 6c1af891be Move default_quantity_type third-party setting and logic to farm_log_quantity. 2021-07-22 17:40:16 -04:00
Michael Stenta f77ba74e2a Move LogEventSubscriber for cleaning up log quantities to the farm_log_quantity module. 2021-07-22 17:40:16 -04:00
Michael Stenta 3b68509613 The farm_inventory_test module no longer needs to provide bundle plugin classes or a mock quantity field. 2021-07-22 17:40:16 -04:00
Michael Stenta cdfe4dc5a4 Move log quantity base field definition to farm_log_quantity module.
The farm_inventory module had an implicit dependency on this
field, so by moving this out to its own module we can depend
on it explicitly without adding a dependency on farm_entity
as a whole.
2021-07-22 17:40:16 -04:00
Michael Stenta 4259890f2c Use CSS to show managed role permissions. 2021-07-22 17:39:52 -04:00
paul121 a006494486 Set the farm_client redirect to https://farmOS.app. 2021-07-22 17:38:37 -04:00
paul121 60735b1a43 Set a redirect when creating the farm client. 2021-07-22 17:38:37 -04:00
Michael Stenta 9ae8dbed32 Issue #3224684: Allow managed roles access to entity revisions tab 2021-07-22 10:01:44 -04:00
paul121 2beac45df9 Add the Content-Disposition header to the list of allowed CORS headers.
This header is used to specify filenames when uploading files via API.
2021-07-13 16:43:17 -04:00
Michael Stenta 8d66a98483 Remove @todo regarding plan and data_stream and alphabetize perms.
It's OK if managed roles have permissions that are not defined.
There's nothing more "todo" here.
2021-06-24 14:45:15 -04:00
paul121 835c8602c1 Use the contrib entity access and permission_provider handlers for the tag_type config entity. 2021-06-24 12:38:45 -04:00
paul121 95d020ea18 Use the contrib entity access and permission_provider handlers for the flag config entity. 2021-06-24 12:38:45 -04:00
paul121 cab9d25734 Add entity type view permissions for all managed farm roles. 2021-06-24 12:38:45 -04:00
paul121 06e922937a Use the contrib entity access and permission_provider handlers for farm entity bundle entity types. 2021-06-24 12:38:45 -04:00
paul121 808d73b62c Remove unused asset and plan page include files. #433 2021-06-23 07:47:56 -04:00
Michael Stenta f0bcc36491 Fix parent ID assignment in unit taxonomy term migrations.
Terms with parents were being assigned as their own parents (circular).
Updated it to be identical to the logic used in other term migrations.
2021-06-21 19:12:15 -04:00
Michael Stenta 1d2320355b Issue #3219701: Log migration of quantity reference Error: Unsupported operand types in SubProcess->transform() 2021-06-19 08:36:20 -04:00
Michael Stenta 380796b4c8 Move FarmBrowserTestBase to a farm_test module. 2021-06-17 09:42:43 -04:00
paul121 027adf68a2 Do not render asset urls as absolute urls. 2021-06-09 11:33:35 -04:00
paul121 0a94bbb6d9 Render the feature name as a link in popups if a url is provided. 2021-06-09 11:33:34 -04:00
paul121 1cb8e99928 Include a url property to view assets in the geojson export view. 2021-06-09 11:33:34 -04:00
Michael Stenta b3be5b0755 If the new revision log message matches the original, then set a blank message. 2021-06-09 11:01:32 -04:00
Michael Stenta 4f31aa9ed1 Always set the revision user ID. 2021-06-09 10:10:12 -04:00
paul121 abb2dc72c7 Add schema for hideable_boolean field formatter.
Schema was missing which caused config inspector errors when creating
map_popup display config for assets. We didn't catch this before because
our default display mode is not saved in config.
2021-06-08 22:38:09 -04:00
paul121 0809f644d4 Add padding between id-tag field items. 2021-06-07 12:27:34 -04:00
paul121 68a06cbf01 Render the tag_type label. 2021-06-07 12:27:34 -04:00
paul121 bda93d4373 Add "id-tag__{property}" class to each div. 2021-06-07 12:27:34 -04:00
paul121 3bc1871e39 Render each ID tag property on a separate line. 2021-06-07 12:27:34 -04:00
Michael Stenta 4d631d7f38 Declare asset and log module dependencies in farm_location module. 2021-06-05 21:34:09 -04:00
Michael Stenta 3237a750c1 Move location hierarchy editor code to farm_ui_location. 2021-06-05 21:34:09 -04:00
pcambra 771c753518 First stub of the asset location hierarchy editor feature. 2021-06-05 21:34:09 -04:00
Michael Stenta 51562201ee Move farm_dashboard to farm_ui_dashboard. 2021-06-05 21:34:09 -04:00
Michael Stenta 4d59cd69c7 Do not archive areas without an area type during migration. 2021-06-05 14:53:17 -04:00
Michael Stenta 5c6856fe0c Add "Migrated from farmOS 1.x on [date]" revision log messages to migrated records. 2021-06-05 14:53:17 -04:00
pcambra 0f87c085ea Issue #3216766: Revisions are not supported on JSON API 2021-06-04 22:45:01 -04:00
Michael Stenta 85e7815090 Enforce the integrity of entity references to data_stream and quantity entities. 2021-06-04 22:04:38 -04:00
Michael Stenta 238fb66b85 Ensure an empty array is not used in SQL WHERE IN (). 2021-06-04 21:28:18 -04:00
Michael Stenta 187bd7abcb Move all Views hooks to *.views.inc and *.views_execution.inc include files. 2021-06-04 21:17:41 -04:00
Michael Stenta 2ac1a0d41e Provide a Views argument handler for filtering assets by location. 2021-06-04 21:15:25 -04:00
Michael Stenta fda3f325ac Add an isLocation() method to the asset.location service. 2021-06-04 21:15:25 -04:00
Michael Stenta bab926b199 Reformat farm_location_views_data_alter() to make it easier to extend. 2021-06-04 21:13:30 -04:00
Michael Stenta ce152ddd31 Do not filter out archived assets - this should be the responsibility of downstream code. 2021-06-04 21:12:37 -04:00
Michael Stenta f6aadf4cd7 Automated tests for getAssetsByLocation() method. 2021-06-04 21:12:37 -04:00
Michael Stenta cc9e0a8a6c Add a getAssetsByLocation() method to the asset.location service. 2021-06-04 21:12:37 -04:00
Michael Stenta a860653c76 Fix AssetLocation @param $asset docblocks. 2021-06-04 14:49:03 -04:00
Michael Stenta b27419ea68 Add EXIF Orientation module. 2021-05-26 12:33:26 -04:00
Michael Stenta 360e133164 Add Birth log type and migration. 2021-05-26 12:19:05 -04:00
paul121 292d46878a Create reverse relationships for ER bundle fields after they are installed. 2021-05-20 17:31:59 -04:00
paul121 2c89b25a69 Fix file field handler. 2021-05-08 14:26:41 -07:00
paul121 af805d4502 Extend from QuantityViewsData for quantity entities. 2021-04-21 14:26:25 -04:00
paul121 7358e4d64c Extend entity views data to configure the correct filter for all taxonomy_term reference fields. 2021-04-21 14:26:23 -04:00
paul121 eed6503455 Add bundle plugin for movement log type used in tests. 2021-04-21 08:21:02 -04:00
paul121 6642f2bc08 Add bundle plugins for asset types used in tests. 2021-04-21 08:21:02 -04:00
paul121 5136e378e5 Remove todo referencing issue #3197363.
This should have been listed above the next code block.
2021-04-21 08:21:02 -04:00
paul121 ec5156876f Update the map size when the map's field wrapper display state changes. 2021-04-21 08:21:02 -04:00
paul121 85e7449cb6 Render the intrinsic_geometry form field below is_fixed in forms. 2021-04-21 08:21:02 -04:00
paul121 014bea7e5c Hide the intrinsic_geometry field in asset forms if is_fixed is unchecked. 2021-04-21 08:21:01 -04:00
paul121 e82ac54474 Allow access to the view label operation on bundle entity types. 2021-04-20 09:22:02 -07:00
paul121 f4c8a7116e Do not display the entity type field in entity forms. 2021-04-20 09:21:59 -07:00
paul121 0042e53bc2 Add entity type field to entity view pages. 2021-04-19 13:16:16 -04:00
Michael Stenta 2e43c1a7f2 Remove old color config, logic, and schema. 2021-04-16 08:09:27 -04:00
Michael Stenta e569f74918 Provide a layer style loader service for loading styles based on conditions. 2021-04-16 07:46:59 -04:00
Michael Stenta 7f5050681f Create a simple LayerStyle config entity for creating map layer style definitions. 2021-04-16 07:39:13 -04:00
Michael Stenta 98ffd94b5a Add a third-party setting for asset map layer color. 2021-04-14 08:57:21 -04:00
paul121 9d287f351c Test multiple allowed origins. 2021-04-08 19:05:36 -04:00
paul121 8734e3d276 Add CORS headers for allowed origins configured on consumers. 2021-04-08 19:05:36 -04:00
paul121 08857be054 Add an allowed_origins string field to consumer entities. 2021-04-08 19:05:36 -04:00
paul121 2a9084c1e2 Only add bundle fields to the consumer entity. 2021-04-08 17:10:06 -04:00
paul121 2c5a38dc6f Issue #3207716 by paul121: Use BundleFieldDefinition for additional Consumer fields 2021-04-08 15:57:27 -04:00
Michael Stenta 930df73049 Revert "Add a setting to configure if the map popup behavior is enabled."
This reverts commit 19f8851543.
2021-04-08 15:37:23 -04:00
Michael Stenta b4b19147a9 Allow multiple asset type contextual filters in farm_asset_geojson View. 2021-04-08 15:37:23 -04:00
Michael Stenta fe95745153 Remove farmOS-map version from farm_map.libraries.yml.
We don't need to keep this up-to-date alongside the composer.json version constraint.
2021-04-08 15:37:23 -04:00
Michael Stenta c82536d4d0 Move asset_type_layers behavior to farm_ui_map. 2021-04-08 15:37:23 -04:00
Michael Stenta 2e4d0bef1d Move logic for disabling zoom when WKT is present to farm_ui_map. 2021-04-08 15:37:23 -04:00
Michael Stenta 83e6d3abfb Add "all locations" layers to default and geofield maps via farm_ui_map instead of default behaviors. 2021-04-08 15:37:23 -04:00
Michael Stenta b58f4f8b1a Move dashboard map and block to farm_ui_map. 2021-04-08 14:59:39 -04:00
Michael Stenta 07b06b3a5f Move subscriber logic for adding dashboard map asset layers to farm_ui_map. 2021-04-08 11:24:55 -04:00
Michael Stenta f57cebd68f Split Asset GeoJSON Views displays out to their own View provided by the farm_location module. 2021-04-08 11:24:55 -04:00
Michael Stenta 577f04fa0c Patch Geofield to add support for centroid WKT in LatLon formatter (Issue #3207078), and remove custom geofield_centroid formatter. 2021-04-08 11:24:55 -04:00
paul121 19f8851543 Add a setting to configure if the map popup behavior is enabled. 2021-04-08 11:24:55 -04:00
paul121 d2d42f3811 Add an "Other locations" layer to the dashboard map. 2021-04-08 11:24:55 -04:00
paul121 a51c58185a Add layers for location asset types to the dashboard map. 2021-04-08 11:24:55 -04:00
paul121 8b4e1eeb9f Add cache tag on the map type. 2021-04-08 11:24:55 -04:00
paul121 7487a782e0 Remove redundant div. 2021-04-08 11:24:55 -04:00
paul121 e066abfd49 Zoom to WKT if it exists else zoom to all locations vectors. 2021-04-08 11:24:55 -04:00
paul121 b5a56381b4 Use array_replace_recursive to allow overriding of values. 2021-04-08 11:24:55 -04:00
paul121 dd423d2208 Dynamically add asset layers to the dashboard map. 2021-04-08 11:24:55 -04:00
paul121 42d1e75535 Add helper function to get the map target ID. 2021-04-08 11:24:55 -04:00
paul121 515352ef4e Create a geojson feed of asset centroids. Change paths to be assets/geojson/{geom_type}/{asset_type} 2021-04-08 11:24:55 -04:00
paul121 e6f3ec7ece Provide a centroid formatter to format geofield centroids as a WKT point. 2021-04-08 11:24:55 -04:00
paul121 0ad329e5fd Add an All locations layer to default and geofield maps. 2021-04-08 11:24:55 -04:00
paul121 1383434df9 Do not default to the Assets layer group, make this optional. 2021-04-08 11:24:55 -04:00
paul121 fb09715727 Change asset geojson path to /assets/geojson/type and default to all. 2021-04-08 11:24:55 -04:00
paul121 191caffb52 Reverse layers array before adding to the map instance. 2021-04-08 11:24:55 -04:00
paul121 8cf638cd33 Allow the layer group to be specified. 2021-04-08 11:24:55 -04:00
paul121 325dec86a6 Render area assets on the dashboard map. 2021-04-08 11:24:55 -04:00
paul121 aa5e956717 Assemble geojson url client side. 2021-04-08 11:24:55 -04:00
paul121 5d1d7aa324 Provide an asset_type_layers map behavior. 2021-04-08 11:24:54 -04:00
paul121 dc5dd3e2fa Include the computed asset geometry field in views. 2021-04-08 11:24:54 -04:00
paul121 bdc0a3bb00 Allow map types to define default behaviors. 2021-04-08 11:24:54 -04:00
Michael Stenta ee080f2e00 Fix "Wrong class casing" warning in PHPStorm. 2021-04-05 10:59:04 -04:00
paul121 bb02b4259b Use array_replace_recursive to prevent merging duplicate values into arrays. 2021-04-01 11:22:28 -04:00
Michael Stenta 3cf61d4c88 Remove LegacySensorApiInterface and call apiHandleRequest() directly. 2021-04-01 11:22:28 -04:00
Michael Stenta 2a12fb4e3d DataStreamPrivateKeyAccess trait is not necessary in LegacyListener because it is in the parent class. 2021-04-01 11:22:28 -04:00
Michael Stenta 645ce82b44 Refer to legacy_listener as "Listener (Legacy)". 2021-04-01 11:22:28 -04:00
Michael Stenta 60efdd5de7 Explicitly check the value of a name-filtered get request in LegacyApiTest. 2021-04-01 11:22:27 -04:00
Michael Stenta b386442df4 Change /api/data_stream/listener/UUID/data to /api/data_stream/UUID/data. 2021-04-01 11:22:27 -04:00
paul121 8a9f65990a Remove data stream list_builder handler and class. 2021-04-01 11:22:27 -04:00
paul121 a5078847b9 Data stream entity reference fields use the inline_entity_form_complex form widget. 2021-04-01 11:22:27 -04:00
paul121 8338b3bcd4 Remove PluginFormInterface from DataStreamTypeInterface.
Custom data stream fields are supported by core form handling. This
keeps things simpler for now and makes it much easier to use inline
entity forms.
2021-04-01 11:22:27 -04:00
paul121 5899b2cea5 Legacy tests should be in src directory. 2021-04-01 11:22:27 -04:00
paul121 ce02197697 Save a reference to the start time of mock data stream data. 2021-04-01 11:22:27 -04:00
paul121 019a734136 Remove connection and tableName properties from DataStreamSqlStorage. 2021-04-01 11:22:27 -04:00
paul121 d9897661c4 Use assertEquals because assertEqual is deprecated. 2021-04-01 11:22:27 -04:00
Michael Stenta 95dad89e14 Enable entity module for automated tests. 2021-04-01 11:22:27 -04:00
Michael Stenta 424c45aa95 Make $modules protected. 2021-04-01 11:22:27 -04:00
Michael Stenta d223456f02 Declare setUp() method return type. 2021-04-01 11:22:27 -04:00
Michael Stenta ea253c1e26 Use Drupal core KernelTestBase. 2021-04-01 11:22:27 -04:00
Michael Stenta f8fb026a3d Move data stream Views to optional config. 2021-04-01 11:22:27 -04:00
Michael Stenta 0b56e1469d Move migration source for the d7 sensor asset to farm_migrate. 2021-04-01 11:22:27 -04:00
paul121 c14d5053f0 LegacyListener extends the Basic data stream type. 2021-04-01 11:22:27 -04:00
paul121 bb6a6e0cd3 Add a getViewsData() method to data stream type plugins. 2021-04-01 11:22:27 -04:00
paul121 b2577e0974 Use the contrib entity EntityViewsData handler. 2021-04-01 11:22:27 -04:00
paul121 74d72f3171 Rename data_stream_data_legacy to data_stream_legacy. 2021-04-01 11:22:27 -04:00
paul121 2419039339 Move farm_sensor_listener to data_stream/legacy. 2021-04-01 11:22:27 -04:00
paul121 58d2631ead Move data_stream field to sensor bundle plugin. 2021-04-01 11:22:27 -04:00
paul121 7c3a73b924 Do not add data_stream field to equipment assets. 2021-04-01 11:22:27 -04:00
paul121 977fdd85a0 Rename data_stream_data_storage to data_stream_basic. 2021-04-01 11:22:27 -04:00
paul121 5d42be6412 Rename listener to basic. 2021-04-01 11:22:27 -04:00
paul121 0981588bb6 Fix fraction field schema error. 2021-04-01 11:22:27 -04:00
paul121 d9a2a858cf View private and public key labels inline, standardize field definition. 2021-04-01 11:22:27 -04:00
paul121 768169f4c0 Remove the created field from the UI. 2021-04-01 11:22:27 -04:00
paul121 01b38c3204 Use a default value callback method to set the private key. 2021-04-01 11:22:27 -04:00
paul121 783d547cc0 Use the contrib entity bundle class instead of custom data stream plugin. 2021-04-01 11:22:27 -04:00
paul121 3fca66b83b Create private key using a default value callback function.
This way a default value is always created, such as via the API or in
in the inline entity form widget.
2021-04-01 11:22:27 -04:00
paul121 41058a4b57 Fix phpcs errors. 2021-04-01 11:22:27 -04:00
paul121 1a92ffe4a0 Add a migration for sensor listener data. 2021-04-01 11:22:27 -04:00
paul121 9469d9cf4f Create a migration process to look up data streams provided by an asset. 2021-04-01 11:22:27 -04:00
paul121 7e1aa10f1e Remove references to data streams when they are deleted. 2021-04-01 11:22:27 -04:00
paul121 7bed6d3ae9 Add a migration that creates a legacy listener data stream for each listener sensor. 2021-04-01 11:22:27 -04:00
paul121 87b75501e6 Create a sensor data migration group. 2021-04-01 11:22:27 -04:00
paul121 0fde00f4fc Create a migration destination for data stream entities that are provided by an asset. 2021-04-01 11:22:27 -04:00
paul121 54fc7ddaf5 Add listener data block view to listener data stream entity view. 2021-04-01 11:22:27 -04:00
paul121 1c9bc63423 Add table view of listener data with CSV export. 2021-04-01 11:22:27 -04:00
paul121 e4f75bed15 Make listener data stream data available to views. 2021-04-01 11:22:27 -04:00
paul121 6f7674c380 Change the data stream API path to /api/data_stream/listener/{UUID}/data. 2021-04-01 11:22:27 -04:00
paul121 e9e5c599ec Move the processRequest method to DataStreamTestbase. 2021-04-01 11:22:27 -04:00
paul121 70636be3c5 Add data stream API tests. 2021-04-01 11:22:27 -04:00
paul121 042c3c245f Add asset field to all data stream entities. 2021-04-01 11:22:27 -04:00
paul121 15158f2ea1 Remove "data stream" from plugin labels. 2021-04-01 11:22:27 -04:00
paul121 24570b5763 Implement PluginFormInterface so plugins can provide configuration forms. 2021-04-01 11:22:27 -04:00
paul121 80d1271b1f Add a data_stream field to sensor and equipment assets. 2021-04-01 11:22:27 -04:00
paul121 3c871623f6 Add data_stream as a supported target_type for entity_reference fields in FarmFieldFactory. 2021-04-01 11:22:27 -04:00
paul121 781017c5b4 Add common_reference_target so entities can reference data streams. 2021-04-01 11:22:27 -04:00
paul121 7a1a6afc2b Generate a new private key when add data streams via the form. 2021-04-01 11:22:27 -04:00
paul121 483f9149cc Create admin UI for data streams. 2021-04-01 11:22:27 -04:00
paul121 5c8430118d Allow GET requests to public listener sensors. 2021-04-01 11:22:27 -04:00
paul121 c573ded4e5 Add a public field to all data stream entities. 2021-04-01 11:22:27 -04:00
paul121 4e403c97cf Implement EntityChangedInterface. 2021-04-01 11:22:27 -04:00
paul121 5f7f4985e9 Move config directory to correct location. 2021-04-01 11:22:27 -04:00
paul121 cdb2c2d724 Provide a Listener data stream type. 2021-04-01 11:22:27 -04:00
paul121 564163e7d1 Implement the ContainerFactoryPluginInterface so plugins can use dependency injection. 2021-04-01 11:22:27 -04:00
paul121 2f398919b9 Provide a trait for checking the private_key in requests. 2021-04-01 11:22:26 -04:00
paul121 e83c45a6dc Add a route to interact with data streams via API. 2021-04-01 11:22:26 -04:00
paul121 dbe50281fc Provide a data_stream_data_storage table and trait for plugins to use. 2021-04-01 11:22:26 -04:00
paul121 387e8fcab2 Add dependency on the Fraction module. 2021-04-01 11:22:26 -04:00
paul121 0d10556c56 Create a DataStream plugin type. 2021-04-01 11:22:26 -04:00
paul121 fe63dcc107 Create a DataStream entity. 2021-04-01 11:22:26 -04:00
paul121 38a9597296 Alias field_data_field_farm_inventory as fdffi. 2021-03-29 08:35:18 -07:00
Michael Stenta b5f5a1da8f Add an Inventory field formatter and display current inventory on asset pages. 2021-03-27 14:44:42 -04:00
paul121 54ddd93277 Fix class description. 2021-03-27 14:43:53 -04:00
paul121 039ece7f93 Migrate log inventories. 2021-03-27 14:43:53 -04:00
paul121 d44751e7a0 Provide a migration source for log inventories. 2021-03-27 14:43:53 -04:00
Michael Stenta ca456b906d Add automated tests of the inventory computed field in JSON:API. 2021-03-27 14:43:53 -04:00
Michael Stenta 046de970e0 Invalidate asset cache when an inventory adjustment that references it is saved or deleted. 2021-03-27 14:43:53 -04:00
Michael Stenta b7468fdc9b Dispatch a QuantityEvent when on quantity presave and delete. 2021-03-27 14:43:53 -04:00
Michael Stenta e973a2bd73 If the asset is new, it won't have inventory, so getInventory() can bail early. 2021-03-27 14:43:53 -04:00
Michael Stenta 7c6b543ff1 Add a computed Inventory field to assets. 2021-03-27 14:43:53 -04:00
Michael Stenta 1811ce05d1 Add Inventory field support to farm.field_factory. 2021-03-25 18:42:03 -04:00
Michael Stenta 94546a0826 Define Inventory field type schema. 2021-03-25 18:42:03 -04:00
Michael Stenta 2526d69488 Output the units as a term label, rather than a term ID. 2021-03-25 18:42:03 -04:00
Michael Stenta 29cfef230a Add automated tests for assets with multiple inventories. 2021-03-25 18:42:03 -04:00
Michael Stenta ee84726112 Initial inventory automated tests. 2021-03-25 18:42:03 -04:00
Michael Stenta 4064c4f84f Initial asset.inventory service. 2021-03-25 18:42:03 -04:00
Michael Stenta f9e7b8883d Revert "Create an entity browser for inventory assets."
This reverts commit 3bb4613a445da64364899ce5aaa1a4a2b4df9805.
2021-03-25 18:42:03 -04:00
Michael Stenta dd0b75592a Revert "Start an entity_browser view that displays inventory asset options."
This reverts commit 53ccab74073ab4a8f8728e839a3447296bc03607.
2021-03-25 18:42:03 -04:00
Michael Stenta e952ca952a Refactor/rename inventory fields. Use farm.field_factory. 2021-03-25 18:41:52 -04:00
Michael Stenta 4eb303c77c Replace references to farm_quantity with quantity. 2021-03-25 18:31:09 -04:00
paul121 42079f795d Change the quantity.asset form display to use the inventory_assets entity browser. 2021-03-25 18:31:09 -04:00
paul121 029579a7f3 Create an entity browser for inventory assets. 2021-03-25 18:31:09 -04:00
paul121 5fcda12c31 Start an entity_browser view that displays inventory asset options. 2021-03-25 18:31:09 -04:00
paul121 5a6ba4d55b Include log_inventories in the FarmLog source plugin. 2021-03-25 18:31:09 -04:00
paul121 9479eecdfc Add inventory base fields to farm_quantity entity. 2021-03-25 18:31:09 -04:00
paul121 44cfb7e92e Init farm_inventory module. 2021-03-25 18:31:09 -04:00
Michael Stenta 319fcad256 Make the asset field in test modules a BaseFieldDefinition and allow multiple values. 2021-03-25 08:43:13 -04:00
Michael Stenta cec5058337 Issue #3200219 by paul121: Uninstalling a bundle removes field storage definitions that are used by other bundles
This fixes the incorrect commit message used for the previous merge (two
commits ago), so that future git blame history is correct.
2021-03-23 17:43:01 -04:00
Michael Stenta 3752976f1a Revert "Issue #2991394 by paul121: Move inventory fields to quantity measurements"
This reverts commit d8443dfa56, reversing
changes made to d40531cbbc.

I mistakenly copied and pasted the wrong commit message for the previous
merge commit. This reverts the entire merge. I will revert this revert,
and give it the correct commit message in the next commit so that git
blame history is corrected moving forward.
2021-03-23 17:41:05 -04:00
paul121 d4e0d26aef Add explicit test to ensure field storage definitions provided by hook_farm_entity_bundle_field_info are deleted. 2021-03-22 07:27:26 -04:00
paul121 bf1ba8a86c Decorate the BundlePluginInstaller service to not delete field storage definitions used by other bundles. 2021-03-22 07:27:26 -04:00
paul121 29b8355731 Rename to FarmEntityBundleFieldTest. 2021-03-22 07:27:26 -04:00
paul121 bf492f3347 Add test for bundle field storage definitions on multiple bundles. 2021-03-22 07:27:26 -04:00
Michael Stenta a2a8e3d361 Disable consumer JSON:API resource. 2021-03-18 15:53:17 -04:00
Michael Stenta 30ba7836d8 Disable additional JSON:API resources: date_format, image_style, migration, migration_group, rest_resource_config. 2021-03-18 15:49:45 -04:00
Michael Stenta f5e7d59549 Move jsonapi_extras.jsonapi_resource_config.* to optional config and remove enforced dependency on farm_api. 2021-03-18 15:49:34 -04:00
Michael Stenta f2bdfde99a Alphabetize farm_dashboard dependencies. 2021-03-18 15:49:29 -04:00
Michael Stenta 1de7f4ed77 Improvements to farm_migrate_role migration config.
These changes help to support custom/contrib modules that want
to provide their own role migrations.

- Use skip_map_on_empty process plugin to ensure that skipped rows are not added to the map tables.
- Set a "role" pseudo-field, which is used by role ID matching.
- Move role ID matching process to farm_migrate_role migration group shared config.
- Move farm_migrate_role migration to optional config, dependent on farm_role_roles module.
2021-03-18 15:49:14 -04:00
Michael Stenta 7c16a8db46 Add a skip_map_on_empty process plugin that prevents mappings from being saved when a row is skipped. 2021-03-18 15:49:14 -04:00
Michael Stenta f3c735b5c9 Issue #3176503: Migrate soil names field data (concat to notes). 2021-03-17 08:17:16 -04:00
Michael Stenta 7caf747694 Add a third-party setting for default quantity types on log types. 2021-03-15 15:46:36 -04:00
Michael Stenta 7fe08b4ca8 Move schema for location third party settings out of Views schema file. 2021-03-12 20:34:42 -05:00
Michael Stenta 3e19eb86b2 Migrate price quantities with a measure of value. 2021-03-12 20:34:08 -05:00
Michael Stenta a39c667049 Move CreateQuantity to farm_migrate. 2021-03-12 08:15:56 -05:00
paul121 fc3f00883f Only create price quantities if price data was provided. 2021-03-12 08:15:56 -05:00
paul121 a00d0b32f6 Migrate purchase and sale log values to a price quantity. 2021-03-12 08:15:56 -05:00
paul121 cf2659db7b Add a create_quantity process plugin. 2021-03-12 08:15:56 -05:00
paul121 c5548eab72 Support fraction fields in FarmFieldFactory. 2021-03-12 08:15:56 -05:00
Michael Stenta 19dc89750f Add Lot number field (with migration) to Sale and Purchase logs. 2021-03-11 21:39:18 -05:00
Michael Stenta fe5929ab2f Use taxonomy_index_tid Views filter handler plugin for quantity units column. 2021-03-11 17:49:01 -05:00
Michael Stenta 835137d0f3 Only include quantity fields in the template if they are not empty. 2021-03-11 08:40:32 -05:00
Michael Stenta 0f49717e96 Provide a reverse entity reference relationship from quantities to logs that reference them. 2021-03-11 07:38:15 -05:00
Michael Stenta 274b510d2e Set the views data handler class for logs to FarmLogViewsData. 2021-03-11 07:38:15 -05:00
Michael Stenta dae3ccd80c Add Views integration for Quantity Value field, filter, and sort using fraction decimal handlers. 2021-03-11 07:38:15 -05:00
Michael Stenta 3c9087a3d0 The Quantity value field is not required.
This was dependent on https://www.drupal.org/project/fraction/issues/3202832
2021-03-11 07:38:15 -05:00
paul121 06c03f1073 Always render the Quantity type field. 2021-03-09 09:12:05 -08:00
paul121 bdd4e66714 Render the quantity entity in quantity inline entity forms. 2021-03-09 08:58:41 -08:00
paul121 7727048c6f Allow the quantity type label to be viewed without the administer bundle permission.
https://www.drupal.org/project/entity/issues/2943571
2021-03-09 08:23:28 -08:00
paul121 19a2169ac1 Add quantity permissions to managed roles. 2021-03-09 08:21:28 -08:00
Michael Stenta 19b5705f41 Use quantity_base_fields instead of standard_quantity_fields to avoid confusion with standard bundle. 2021-03-08 10:09:22 -05:00
Michael Stenta 85f979a439 Do not include quantity type in default template. 2021-03-08 10:01:42 -05:00
Michael Stenta c394b7bacf Fix "Call to a member function setRequirement() on null" for entity types that do not expose bundle admin UI. 2021-03-08 09:43:14 -05:00
Michael Stenta 8fbf8def75 Remove unimplemented quantity entity type annotations and related unused classes. 2021-03-08 09:42:33 -05:00
Michael Stenta 07c6e32d14 Revert "Make farm_migrate depend on farm_entity."
This reverts commit 6dc2f82c24aae2c4b11f037e73f15ccf81d167e0.
2021-03-05 14:16:06 -05:00
Michael Stenta c8cf3ae94d Revert "The farm_migrate module depends on farm_quantity_standard."
This reverts commit 04f3af4dc530998815b60048befb3da61bb439b3.
2021-03-05 14:16:06 -05:00
Michael Stenta 07d03f617b Move farm_migrate_quantity_standard to optional config. 2021-03-05 14:16:06 -05:00
paul121 97b744207e The farm_migrate module depends on farm_quantity_standard. 2021-03-05 14:16:06 -05:00
paul121 5491b83fb2 Remove devel and standard quantity reference from template. 2021-03-05 14:16:06 -05:00
Michael Stenta dd910c1d95 The farm_entity module depends on quantity, not farm_quantity_standard. 2021-03-05 14:16:06 -05:00
Michael Stenta 078826205a Rename quantity migration to farm_migrate_quantity_standard. 2021-03-05 14:16:05 -05:00
paul121 d942781100 Render the quantity type label if it is not the standard type. 2021-03-05 14:16:05 -05:00
paul121 65d2348b93 Document that the quantity variable is available in template. 2021-03-05 14:16:05 -05:00
paul121 a5d1e7eeef Only display other quantity field labels if they are not hidden. 2021-03-05 14:16:05 -05:00
paul121 91aef36db3 Do not add clearfix to quantity fields. 2021-03-05 14:16:05 -05:00
paul121 b7caa132c7 Move the quantity label to the bottom of the form. 2021-03-05 14:16:05 -05:00
paul121 b8f8a7402f Migrate quantities to the standard quantity type. 2021-03-05 14:16:05 -05:00
paul121 1840292885 Make farm_migrate depend on farm_entity. 2021-03-05 14:16:05 -05:00
paul121 0fc69793a0 Require the standard quantity type. 2021-03-05 14:16:05 -05:00
paul121 c6a2d1daf1 Make the default quantity template compatible with all bundles. 2021-03-05 14:16:05 -05:00
paul121 d4037fc0f5 Add field__quantity__field theme hook suggestion. 2021-03-05 14:16:05 -05:00
paul121 d258e05c2e Add theme suggestions for each quantity bundle. 2021-03-05 14:16:05 -05:00
paul121 1b3dbe6540 Enable bundle plugins for the quantity entity. 2021-03-05 14:16:05 -05:00
paul121 fd1496448d Enable bundles on Quantity entities. 2021-03-05 14:16:05 -05:00
Michael Stenta aff6c154fc Add log migration processing for the group and is_group_assignment fields. 2021-03-01 09:55:58 -05:00
Michael Stenta 7c9a7983d9 Move geometry and is_movement process fields below location in farm_migrate_log migration group. 2021-03-01 09:55:58 -05:00
Michael Stenta b70f2f8b45 Load group assignment information in the FarmLog D7 migration source. 2021-03-01 09:55:58 -05:00
Michael Stenta 9bb01ab1ef Split FarmLog::prepareRow() method into prepareMovement() and prepareQuantity() methods. 2021-03-01 09:55:58 -05:00
Michael Stenta 4041a46715 Rename the farm_migrate group to farm_migrate_config. 2021-03-01 08:15:46 -05:00
Michael Stenta 0555d774ae Split file migrations out to a farm_migrate_file migration group to resolve dependency issues. 2021-03-01 08:15:46 -05:00
Michael Stenta 53e83b7365 Add a third party setting to log types to allow them to be designated as movements by default. 2021-02-25 15:21:27 -05:00
Michael Stenta b0726ce09c Add third party settings to asset types to allow them to be designated as fixed locations by default. 2021-02-25 15:20:58 -05:00
Michael Stenta d38a5eb1d9 Split farm_migrate_user and farm_migrate_role out to their own migration groups.
This allows contrib modules to provide their own role migrations by replicating the farm_migrate_role config.
2021-02-25 12:58:32 -05:00
Michael Stenta 74effb652c Migrate farmOS roles. 2021-02-25 12:48:27 -05:00
paul121 5667b67ffa Make the map clear inline field labels. 2021-02-24 15:36:26 -05:00
paul121 02de4ba117 Deny access to the entity type add form. 2021-02-23 09:45:39 -05:00
paul121 d127a9400a Wrap flags in css classes. 2021-02-23 09:16:20 -05:00
paul121 13fd1e1815 Hide log.is_movement boolean if false. 2021-02-23 09:02:47 -05:00
paul121 f0daf81204 Hide asset is_location and is_fixed booleans if false. 2021-02-23 09:02:47 -05:00
paul121 070b918c34 Create hideable_boolean field formatter. 2021-02-23 09:02:46 -05:00
paul121 555067a33f Add gear icon before the toolbar link. 2021-02-23 08:47:36 -05:00
paul121 36e503aa1e Add link to farm settings in the gin secondary toolbar. 2021-02-23 08:47:36 -05:00
Michael Stenta cfa121e461 Migrate 1.x system of measurement variable to 2.x quantity config. 2021-02-22 21:02:41 -05:00
Michael Stenta 6c007a2d11 Add the quantity system of measurement to meta.farm. 2021-02-22 21:02:41 -05:00
paul121 f537b4a0bb Use the system of measurement as the map units. 2021-02-22 21:02:41 -05:00
paul121 61626f6dd7 Provide a quantity settings form. 2021-02-22 21:02:41 -05:00
paul121 27bee57307 Create administer quantity permission. 2021-02-22 21:02:41 -05:00
paul121 3c5262f7a8 Add config for quantity system_of_measurement. 2021-02-22 21:02:41 -05:00
Michael Stenta d6a9fe98e6 Allow modules to add additional data to meta.farm in /api. 2021-02-22 21:02:35 -05:00
Michael Stenta c42bd1f4c3 Override formElement() to remove "Leave blank to use the time of form submission." from description. 2021-02-22 11:12:59 -05:00
paul121 0416267cf9 Use the datetime_timestamp_optional field widget. 2021-02-22 10:50:48 -05:00
paul121 79693d28dc Add datetime_timestamp_optional field widget for timestamp fields. 2021-02-22 10:50:47 -05:00
Michael Stenta 9023567026 Run parent::prepareRow($row) before performing our own modifications in FarmLog.php. 2021-02-16 09:49:27 -05:00
Michael Stenta 6fcc4c4c58 If a migrated log has movement geometry but no areas, save the geometry, store a message, and allow the migration to continue. 2021-02-16 09:38:44 -05:00
Michael Stenta c645cc4718 Remove redundant call to getFieldValues(). 2021-02-16 08:55:50 -05:00
Michael Stenta 063173d459 Fix queries in D7 FarmLog migration areas/geometry lookup to prevent cross-referencing unintended entity types. 2021-02-16 08:53:22 -05:00
Michael Stenta 14e4912420 Link to "Movement logs" section of migration docs from warning message. 2021-02-16 06:06:09 -05:00
Michael Stenta 9fb8009586 Fix is_movement mapping in Log migrations. 2021-02-16 06:05:38 -05:00
Symbioquine 3c7886dbc5 Fix quantity queries in migration to avoid extraneous rows
**Why?** Drupal 7 allows field re-use which means there may
be extra unrelated rows in addition to the ones pertaining
to the core logs.
2021-02-14 14:07:41 -05:00
Michael Stenta 32dceb53a8 Create an empty Mapbox API key config when farm_map_mapbox is installed. 2021-02-10 07:52:02 -05:00
paul121 62c30d13c9 Use the farm_map_geofield widget and formatter. 2021-02-10 06:53:28 -05:00
Michael Stenta d830ec3fa4 Add comment with link to Gin issue for future reference. 2021-02-10 06:53:28 -05:00
paul121 ea25faea65 Update the map size when its parent details element is toggled. 2021-02-10 06:53:28 -05:00
Michael Stenta 365c5f5d7d Pull farmOS-map v1.4.1 from asset-packagist.org (requires repository declaration in downstream composer.json). 2021-02-10 06:53:28 -05:00
paul121 43bd3a4e77 Only create a map once per element. 2021-02-10 06:53:28 -05:00
paul121 bff5c84fe3 Update the map size when the toolbar is toggled. 2021-02-10 06:53:28 -05:00
Michael Stenta 4f3319a9e3 Use "farmOS" instead of "farm" in .info.yml descriptions. 2021-02-09 14:39:36 -05:00
Michael Stenta 46fc6bc849 Whitespace. 2021-02-09 14:39:36 -05:00
Michael Stenta 0d0dab694a Move farm_map_mapbox into modules/mapbox directory. 2021-02-09 14:39:36 -05:00
paul121 64f94a54f3 Read instance options from the instance key. 2021-02-09 14:39:36 -05:00
paul121 c92a1a05f4 Always add the WKT behavior to the geofield_widget map. 2021-02-09 14:39:36 -05:00
paul121 b026b618aa Rename map_name to map_type. 2021-02-09 14:39:36 -05:00
paul121 d00a4eb2e1 Prepend the map element id with 'farm-map-' to avoid conflicts. 2021-02-09 14:39:36 -05:00
paul121 006bdd9c52 Provide the map popup behavior. 2021-02-09 14:39:36 -05:00
paul121 d468683960 Provide a field widget plugin to edit geofields with farmOS-map. 2021-02-09 14:39:36 -05:00
paul121 0364c13cc4 Add the geofield behavior to the geofield_widget map. 2021-02-09 14:39:36 -05:00
paul121 9e3c81c70f Add a getter method for the mapType property of the MapRenderEvent. 2021-02-09 14:39:36 -05:00
paul121 bb20abc22f Create a geofield_widget map type. 2021-02-09 14:39:36 -05:00
paul121 0d9ec4f3b7 Create the map geofield behavior. 2021-02-09 14:39:36 -05:00
paul121 1224aaead1 Provide a field formatter plugin to display geofields with farmOS-map. 2021-02-09 14:39:36 -05:00
paul121 f1ea20c830 Create a geofield map type. 2021-02-09 14:39:36 -05:00
paul121 5a61938082 Add the wkt behavior if the render element has WKT. 2021-02-09 14:39:36 -05:00
paul121 c7a16d0f5d Create the map WKT behavior. 2021-02-09 14:39:36 -05:00
paul121 2b13968c4d Copy the #map_settings property to drupalSettings.farm_map.{target_id}. 2021-02-09 14:39:36 -05:00
paul121 e9e41fd37e Add the mapbox behavior to all maps. 2021-02-09 14:39:36 -05:00
paul121 f71d68e4af Create the mapbox map behavior. 2021-02-09 14:39:36 -05:00
paul121 6b62a341ba Dispatch the MapRenderEvent in the farm_map pre_render callback. 2021-02-09 14:39:36 -05:00
paul121 691173ba82 Define a MapRenderEvent. 2021-02-09 14:39:36 -05:00
paul121 76792fcb64 Create a map_behavior config entity. 2021-02-09 14:39:36 -05:00
paul121 6516d9520b Add the farmOS-map mapbox behavior. 2021-02-09 14:39:36 -05:00
paul121 1786afe8d4 Create a mapbox settings form. 2021-02-09 14:39:36 -05:00
paul121 ea6e48eb2d Define farm_map_mapbox.settings config object. 2021-02-09 14:39:36 -05:00
paul121 f5c5beb5a7 Init farm_map_mapbox module. 2021-02-09 14:39:36 -05:00
paul121 cf521e6131 Use the default map by default. 2021-02-09 14:39:36 -05:00
paul121 0555c6d385 Add schema for map_block settings. 2021-02-09 14:39:36 -05:00
paul121 53456d047a Provide a dashbaord map type. 2021-02-09 14:39:36 -05:00
paul121 b6cccb487b Provide a default map type. 2021-02-09 14:39:36 -05:00
paul121 5db11dbc79 Create a map_type config entity. 2021-02-09 14:39:36 -05:00
paul121 6e732b0dbd Remove farm_map.js dependency on jQuery. 2021-02-09 14:39:36 -05:00
paul121 1d2dfbe0b1 Add 'administer farm map' permission to managed roles with config access. 2021-02-09 14:39:36 -05:00
paul121 caa03ea7f2 Provide a map settings form. 2021-02-09 14:39:36 -05:00
paul121 c1eae1577e Add 'administer farm map' permission. 2021-02-09 14:39:36 -05:00
paul121 3fd8ed6814 Add dependency on core/drupalSettings library. 2021-02-09 14:39:36 -05:00
paul121 7c79ae166f Add the dashboard_map block to the dashboard. 2021-02-09 14:39:36 -05:00
paul121 28178ed19e Create a dashboard_map block. 2021-02-09 14:39:36 -05:00
paul121 3ef5c4690e Implement a MapBlock block plugin. 2021-02-09 14:39:36 -05:00
paul121 b441a05605 Define the farm_map theme hook. 2021-02-09 14:39:36 -05:00
paul121 a5166a09fd Add a farm_map render element. 2021-02-09 14:39:36 -05:00
paul121 000b7b8ea5 Add farm_map library to create and style map instances. 2021-02-09 14:39:36 -05:00
paul121 1850c64ee2 Add farmOS-map library. 2021-02-09 14:39:36 -05:00
paul121 cef8334c5d Init farm_map module. 2021-02-09 14:39:36 -05:00
paul121 42e5b6603c Add test for using an email in the user login form. 2021-02-05 15:45:29 -05:00
paul121 53d3aab8b0 Alter UserLoginForm to accept an email as the username. 2021-02-05 15:45:29 -05:00