Commit Graph

920 Commits

Author SHA1 Message Date
1f8440de57 Merge pull request '3_Payment_date_and_comment' (#10) from 3_Payment_date_and_comment into master
Reviewed-on: SGD-Nord/konova#10
2021-08-26 14:30:39 +02:00
mipel
6ce17dd480 Payment date and comment #3
* adds payment-comment relation in NewPaymentForm
 * drops transfer note form field (may not be used anyway) and replace it with comment
 * adds/updates translations
2021-08-26 14:30:05 +02:00
c2fdad1ab6 Merge pull request 'Konova Codelist enhancements' (#9) from master into 3_Payment_date_and_comment
Reviewed-on: SGD-Nord/konova#9
2021-08-26 13:20:25 +02:00
mipel
97571d4363 Konova Codelist enhancements
* adds proper boolean mapping to update_codelist
* differs between id and atom_id for KonovaCode since atomIds are not unique (could change in the future)
* adds is_selectable and is_archived to KonovaCode
* scales width of DAL form fields to 100% width
* adds table-responsive wrapping container for table forms to prevent unwanted rendering artifacts in case of table resizing due to long content
* adds autocomplete routes for law, registration offices and conservation offices
2021-08-26 12:45:48 +02:00
mipel
d33cf5ad4e Compensation app url reorganizing
* restructures urls into separate xy_urls files which are included inside of compensation/urls.py
* adds default ordering of Payment by .amount
2021-08-24 15:55:06 +02:00
mipel
24a6b7fd37 Konova code improvements
* improves rendering of codes as string (short names will be used if existing)
* reduces selectable konova codes to leafs (as discussed with experts)
* automatically resizes the width of modal form fields to w-100
* adds/updates translations
2021-08-24 14:50:51 +02:00
mipel
2469bde7ee Biotope code list
* integrates biotope code list to NewStateForm
* adds dal scripts automatically on compensation view
2021-08-24 09:37:59 +02:00
mipel
e9aea7bcc4 Compensation action code list
* integrates action code list to NewActionForm
2021-08-24 09:31:12 +02:00
mipel
41c9ed106c Codelist integration
* adds codelist app
* adds KonovaCodeList and KonovaCode model for fetching and storing OSIRIS Codelisten entries
* adds update_codelist command for updating and fetching codes
* adds autocomplete route for using codelists in forms
2021-08-23 18:30:02 +02:00
mipel
631b5d0ea6 EMA Filter
* refactors EmaTableFilter to inherit from EcoAccountFilter
* refactors messages for recording/unrecording of EMA
* adds/updates translations
2021-08-19 14:39:28 +02:00
mipel
5137572127 Identifier generating command
* adds a test command for calculating the collision rate for e.g. an intervention (Not important for production or anything)
2021-08-19 14:29:18 +02:00
mipel
2c3f6bbcd1 Detail view adjustments
* adds EMA and eco account conservation office data to detail views
* adds line break in header of detail views
* adds/updates translations
2021-08-19 14:04:44 +02:00
mipel
fd38ab8170 EMA and eco account
* adds EMA and eco account conservation office data to detail views
2021-08-19 14:00:36 +02:00
mipel
615b7bf5ea EMA
* fixes created timestamp in detail views where modified needs to be displayed
* adds fallback timestamp if data has not been edited, yet --> show created timestamp
* fixes bug where deleting of certain data didn't redirect to the index view
* adds quality_check() method for EMA, needed for recording
* adds all functions which are provided for compensations to EMA
* adds/updates translations
2021-08-19 13:44:06 +02:00
mipel
d1f43f8c64 EMA
* adds Ema model (basically Compensation inherited)
* adds index view for EMAs
* fixes drop-down link bug for menu 'More' in navbar
* refactors some more forms to use process_request()
* adds modified attribute to BaseResource for easy last_modified check
* adds setting of modified attribute in all places where UserAction.EDITED is added to log
* adds EMA_ACCOUNT_IDENTIFIER_LENGTH and EMA_ACCOUNT_IDENTIFIER_TEMPLATE to ema/settings.py
* adds EmaAdmin to ema/admin.py
* fixes wrong title in intervention detail view html for revocations
* adds support for subtitle variable to BaseTable and generic_index.html
* drops next_version attribute from models
* adds/updates translations
* adds default ordering for UserActionLogEntry
   * removes extra ordering in log modal rendering
2021-08-19 13:02:31 +02:00
mipel
03fe293cd8 Favicon
* adds favicon
2021-08-19 09:12:13 +02:00
mipel
198462b051 Modal forms
* adds new POST functionality in NewStateModalForm, which does not use the super classes process_request() method
* adds explaining comments on the is_ajax() call
* updates translations
2021-08-19 09:06:35 +02:00
mipel
7dbf4d5b91 Mobile optimization
* adds table-responsive class to BaseClass
* adds html meta attributes for proper small device rendering
2021-08-19 08:44:47 +02:00
mipel
c82ee8afbc Modal and other tweaks
* removes WIKI_URL, replaces with HELP_LINK since it was the same before as well
* refactors modal form processing (process_request())
   * modal form can now display errors directly inside the modal (as intended by the devs)
   * modals now properly support the GET-POST workflow that is intended by the devs. More information here: https://github.com/trco/django-bootstrap-modal-forms/issues/183
* Improves label-field linking in generic_table_form_body.html
* removes isDeleteForm attribute from modal_form_script.html
2021-08-17 15:27:49 +02:00
mipel
833483b810 SSO and messages
* adds message for checking of intervention
* refactors sso message sending to handle an iterable of users
* adds specific method for sending object checking related messages
* adds label support for modal form for more simple clicking of checkboxes
2021-08-17 10:32:54 +02:00
mipel
1a4a4a16c6 SSO and messages
* removes unused third party package from requirements.txt
* adds KonovaSSOClient as subclass of sso.Client for more control over login, e.g. which user data shall not be updated (found in konoa/sso/sso.py)
* adds Messenger class for communicating with SSO server (found in konova/utils/messenger.py)
2021-08-17 09:57:50 +02:00
mipel
74f71cfd1c Requirements
* updates requirements.txt
2021-08-17 08:51:20 +02:00
mipel
ddd6669bbf Translations
* adds/updates translations
2021-08-11 14:50:54 +02:00
mipel
244e300715 Identifier generating
* refactors identifier generating into BaseObject class
2021-08-11 14:31:24 +02:00
mipel
c8b6d001ef Minor enhancements
* refactors eco account rest surface calculation into designated method get_available_rest()
* refactors placeholder setter for BaseForm
* adds automatic eco account identifier generating on saving
* fixes ServerMessageImportance template tag
2021-08-11 14:17:43 +02:00
mipel
5f85f49636 Recording data
* adds dynamic icon for recording and unrecording of data
* adds record view to intervention and eco accounts
* adds quality_check() method for Intervention and EcoAccount class which holds logic for data quality checking
* adds UserAction "unrecorded"
2021-08-10 17:19:42 +02:00
mipel
bd2413d63c EcoAccount detail view
* adds record control button
* adds html markup for invalid withdraws (unrecorded account)
* adds constraint to is_valid() method of NewWithdrawForm for checking whether the selected account for a withdraw is recorded or not
* adds/updates translations
2021-08-10 14:15:42 +02:00
mipel
09d7cad8c8 LANIS Link
* adds LANIS link getter to Intervention, Compensation and EcoAccount for creating a usable link to LANIS
* adds/updates translations
2021-08-10 13:57:03 +02:00
mipel
766d38bcbf HTML improvements
* refactors initializing and rendering of a map view into map/geom_form.html, which leads to simple includes on the detail views instead of redundant html
* refactors django-autocomplete-light form media links and scripts into dal/scripts.html, which can be included on the header blocks of detail views to support form modals using dal easier without the need for form.media
* changes filter behaviour on eco account index: instead of hiding recorded accounts (like in interventions), the filter option there has been replaced with "Show only unrecorded" which can be used to hide all recorded ones
   * background: eco accounts shall be visible when recorded, since they can only be used for withdrawing if they are recorded. Hiding the recorded ones does not make any sense, just like in interventions
* updates some code documentation
* adds/updates translations
2021-08-10 13:12:15 +02:00
mipel
f8b3e5c8fd EcoAccount withdraws
* adds functionality for withdraws from eco accounts in detail view of interventions and eco account as well
* adds get_surface() method to AbstractCompensation class to provide a simple getter for a sql calculation
* adds get_surface_withdraws() method to EcoAccount class to provide a simple getter for a sql calculation
* renames some routes to match coherent rout naming
* adds logic check on NewWithdrawForm
* renames templates/table directory to templates/form, since there are form-table templates inside --> more clarity
* adds new autocomplete routes to konova/urls.py for Interventions and EcoAccounts
* adds/updates translations
* adds/updates template comments
* updates requirements.txt
2021-08-10 10:42:04 +02:00
mipel
58510eee50 EcoAccount template and logic
* adds eco-account own includes for simpler maintainability instead of refactoring to generic includes for compensation app and predefining urls and stuff on the backend
* adds before-state, after-state, actions, deadlines, documents and withdraws to eco account detail view
* adds hint for invalid withdraw in intervention detail view in case of deleted eco account
* adds/updates translations
2021-08-09 15:09:43 +02:00
mipel
abdc574ea2 EcoAccount detail
* adds detail view for eco account
* adds withdraw detail view to eco acount detail
* generalizes compensation/includes templates to be reusable for eco-accounts
* moves is_shared_with() check to class BaseObject
* adds/updates translations
2021-08-09 14:39:36 +02:00
mipel
93c02a72ca EcoAccount index
* renames eco_withdraws to withdraws
* adds EcoAccountTableFilter
* changes percentage withdraw to surface withdraw --> renames amount to surface
* updates EcoAccountTable
  * adds column for rendering rest of available account using a progress bar
* adds progressbar.html to konova/custom_widgets
* adds/updates translations
2021-08-09 14:16:54 +02:00
mipel
a7aeecde2e Restructure files
* reduce compensation/views.py file size by splitting into three sub view files in compensation/views/xy_views.py for compensation, eco-account and payment
* restructure urlpattern list by splitting into three smaller lists for a better overview and maintainability
2021-08-09 13:16:50 +02:00
mipel
5efa755188 Log
* adds modal_generic.html template for generic usage
* adds M2M field log to BaseObject
* adds show log button to controls.html
* adds logging on adding related objects
* adds render log table using generic modal
* adds tooltip to missing values in detail views
* adds/updates translations
2021-08-05 12:54:28 +02:00
mipel
f69d98460f Template improvement
* minor improvement
2021-08-04 15:55:40 +02:00
mipel
135f25d88b Intervention check
* adds functionality for check button
* adds highlighting of important data on detail view for intervention
* adds deleting logic to BaseObject model and BaseResource model
* adds RunCheckForm
* adds check_validity() method to Intervention class
* fixes wrong success msg for adding documents
* adds/updates translations
2021-08-04 15:19:06 +02:00
mipel
685f425e29 Document open fix
* fixes a bug in opening a document
2021-08-04 13:34:28 +02:00
mipel
8e1f679c2a Intervention revocation
* adds Revocation model to interventions/models.py
* adds revocations to interventions detail view
* fixes duplicated ids in html includes
* refactors controls for detail view into included template files (controls.html)
* reduces max length for payment transfer notes from 1000 to 200
* adds RevocationAdmin to intervention/admin.py
* adds new form for adding a Revocation to an intervention's legal_data
  * only one revocation per intervention possible
  * removes add button in case of an existing revocation
* adds revocation routes to intervention app
* renames document field in Document model into file for more clarity
* adds/updates translations
2021-08-04 13:32:35 +02:00
mipel
fd526b80b7 Compensation control
* removes CompensationControl model
* adds comment field to CompensationAction
* adds max length of 200 for comment fields in forms
* adds rendering of error messages in case of invalid form input
* adds/updates translations
2021-08-04 11:56:56 +02:00
mipel
2e3fdaad97 Translation fix
* fixes label and translation in a form
2021-08-04 11:02:26 +02:00
mipel
f666c3afa3 Compensation action
* adds compensation action to compensation detail view
* adds adding/removing logic for compensation action
* adds bootstrap style to select fields in forms
* refactors UnitEnum into UnitChoices using models.TextChoices (Django 3.x)
* adds translations
2021-08-04 10:44:02 +02:00
mipel
d773c3b3d4 Fixes and improvements
* fixes group check on detail views
* adds check for required fields in BaseForm for showing required field hint or not in template
2021-08-04 08:41:21 +02:00
mipel
cd5b2e264b Fixes and improvements
* moves diff_states message back to table top for direct presentation in compensation/detail/view.html
* removes diff_states rendering in deadline card in compensation/detail/view.html
* fixes before_state adding based on GET parameter
* refactors UserActionlogEntryEnum into a UserAction TextChoice (Django 3.x)
* adds ordering of compensation states depending on surface value
* refactors ServerMessageImportance from enum into TextChoice (Django 3.x)
* adds/updates translations
2021-08-03 17:22:41 +02:00
mipel
816600535a Compensation detail view
* adds compensation detail view (WIP)
* adds includes dir for related objects, similar to interventions
* adds functionality for
   * adding/removing before_states
   * adding/removing after_states
   * adding/removing deadlines
   * adding/removing documents
* refactors usage of BaseModalForm
   * holds now process_request() in base class for generic usage anywhere
* adds __str__() method for some models
* compensation__action is blank=True now
* renamed tooltips
* adds new routes for state/deadline/document handling inside of compensation/urls.py
* adds precalculation of before/after_states for detail view, so users will see directly if there are missing states
* removes unnecessary link for intervention detail payment
* adds missing tooltips for check and record icon on detail views
* refactors DeadlineTypeEnum into DeadlineType in konova/models.py, just as the django 3.x documentation suggests for model enumerations
* UuidModel id field is not editable anymore in the admin interface
* adds/updates translations
2021-08-03 13:13:01 +02:00
mipel
19f50baae4 Missing group message
* adds group checker decorator for adding a message informing about missing group privileges
2021-08-03 09:45:41 +02:00
mipel
715cf65538 Setup data
* removes auto-translating of setup data for database (keep english values in db and translate for templates)
2021-08-03 09:11:33 +02:00
mipel
f58650effa Default group required
* adds access checks depending on the current group confgiguration of a user
* removes buttons for adding/editing or removing data if default group is not set for a user
* removes buttons for adding/removing related data in unshared interventions
* removes shared-user setting from share menu of an intervention if user is not zb or ets
* renames has_access() from intervention Model into is_shared_with() for more clarity
* fixes bug in group check in_group() from utils.py
2021-08-02 16:23:29 +02:00
mipel
63b2d3ef66 Compensation enhancements
* compensations won't be listed in index table if related intervention has been deleted
* adds functionality for intervention remove button
* adds outcommented code
* adds configurable redirect_url for RemoveModalForm's process_request method
* adds translation
2021-08-02 15:39:33 +02:00
mipel
d203046666 Intervention detail view
* adds overview of shared with users
2021-08-02 14:56:08 +02:00