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

970 commits

Author SHA1 Message Date
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