Property master list, deletion, permissions and relations
The property list query and columns, enabling, protection of permanent deletion, bulk store assignment, the map layer, export, permission layers and related modules.
The masterdata/property module appears in the Master data menu group (canSee('masterdata/property', 'list')) and is one of the modules under development. The property master is global: list, form, deletion and enabling are not narrowed to a company.
List
- Filter:
filter_name(LIKE on name, identifier, address, match value),filter_status; the values travel in the list AJAX URL (withlimit,sort,order). With debug permission the query SQL is shown. - Columns: checkbox, Property (name, identifier, inactive badge, address, operator), Owner (from md), Match value (from lg), Action. The interface sorts by name (the model also knows
identifieranddate_added). - With
brokerendthe number of active brokerage rows is fetched per row (contract/contract::countActiveBrokerages()). - Without permission a warning box: "Warning: You do not have permission to manage properties!".
Enabling and deletion
enable/disable:status1 / 0 withedit; no content check.delete(one row by GET orselected[]by POST): firstgetLinkCount()for each selected (how many contracts'property_idpoints to it); if any is above zero, nothing is deleted. OtherwisedeleteProperty()deletes the master row, store rows, description, rooms and utility identifiers; documents, powers of attorney and the map point are not deleted.- The
statusdeletekey is in the catalogue but has no endpoint: bin deletion is not available for properties.
Bulk store assignment, map, export
bulkstore(POSTselected[],modeadd or remove,store_ids[]):editfor one item,canBulkAction(route, 'edit')for several, plus the core modify permission;Dlbtstorebulk::apply()writes through the model'sgetPropertyStoresandsavePropertyStores.- Map layer (
mappermission): the "Properties" layer of the Geo map and geocoding from the address; candidates:getGeocodeCandidates()(active properties with address and no coordinates, at most 2000), write-back:setCoordinates(). - Export (
exportpermission):getPropertyFull()+ documents within scope, shaped byDlbtproperty::exportShape(), as a download. autocomplete: at most 8 active properties; used by the advert form and the shared folder form.
Permissions
- Core route:
masterdata/propertyaccess and modify;bulkstorerequires modify separately. - Function keys:
list,edit,delete,debug;statusdelete(no endpoint);map,export(SYSTEM);brokerend(BASE). There is noaddkey, so a new property also needsedit;computeareasruns witheditoradd. - Content scope: on selecting and saving the client (operator), on documents, the main image, the export and on documents in the REST interface.
Relations
Contracts (property_id, properties to broker, power of attorney badge, deletion protection); data room (tiles, data sheet, gallery, documents inside the shared folder); document centre (storage, linking, "Assign to property" bulk button); shared folders (object picker); tax authority tourism tax return (accommodation picker getOperatedProperties()); Geo map; adverts; labels; stores; REST (api/masterdata/property; catalog model: getPropertyForApi(), getPropertyChanges()).