* Stop overriding provison key for all devices
During formatting from device document to UI template, the `provision`
key was overriden regardless of the device's provisionability.
This triggered a UX bug when adding SUP devices with unknown
brand/model, as it prompted end-users to specify a MAC address
eventhough the device couldn't be provisioned.
Upon creating the device, kazoo would make a request to the provisioning
service, which would subsequently fail because of the missing
provisioning information.
* Remove mergedDevice step
* Refactor user's device assignment logic
* Extract device assignment logic into app methods
* Move device retrieval into control flow
* Move un\assign logic into control flow
* Extract mobile callflow update into own function
* Patch device owner_id instead of full update
* Move mobile callflow id retrieval to control flow
* Patch callflow to avoid having to retrieve it first
* Consolidate un\assignment logic
* Migrate single-used app methods into closure
* Extract mobile callflow update logic into app method
* Run device patch and mobile callflow update in parallel
* Move back device assignment logic to users module
* Consolidate mobile callflow update w/ user callfow fetching logic
* Update linked callflow on mobile device un\assignment
* Refactor entities update logic on device un\assignment
* Extract device data merging to own variable
* Make existing settings take precedence over defaults
Using lodash#mergeWith to take into account the fact that we are merging
down existing settings into defualts, in which case, when evaluated
values are arrays, the former should take precedence over the latter and
is then "assigned" rather than "merge".
* Assign overrides over existing settings to replace vs merge
* Update German translation
* Refactor key actions generation
* Refactor key entries structure
While key entries is provided as an object where the key corresponds to
the entrie's number, this complexity does not have to make it to the
template.
We already fill up empty entries by generating an array of key entries
length, hence no need to switch back to an object structure.
* Render combo keys count by section title
* Add save and apply button in edit device form
* Use single button with dropup in edit device actions
* Do not show dropup when the device edited is not privisionable
* Show droup button just if the edited device is register
* Refactor device listing formatter with declarative style
* Refactor device edition formatter with declarative style
* Consolidate device edition data fetcher
* Consolidate device edition data formatter
* Generate addable device types from static list
* Allow for device types without edition template to be deleted
* Conditionaly render user assignment feature
* Pass down prop governing user assignment rendering
* Disable user assignment when loaded by user submodule
* Conditionaly render user assignment feature
* Pass down prop governing user assignment rendering
* Disable user assignment when loaded by user submodule
* Add assign to template
* Get users for the template
* Add translations
* Load in assignTo template
* Handle no owner case
* Fix translation reference
* Adhere to linter
* Clean up code
* Fix code style
* Update translation to be in devices.popupSettings
* Get user list in devicesGetEditData
* Fix templating
* Add default value to dropdown
* Remove error from listUsers call
* Rename usersData to users
* Ensure deviceData.users is not save to device
* Move users field to extra
* Move delete statements
* Move translations to popupsettings
* Move sub-module templates in their own `views` folder
By using `getTemplate()` we can specify which sub-module a template is
related to, enabling this behavior.
The templates names were shortened by stripping the name of their
sub-module from it since they are stored under their sub-module folder.
String templates are created using `getTemplate()` instead of
`monster.template()` that we are trying to depreciate.
* Only use `getTemplate()` for both regular and string templates