Commit Graph

115 Commits (aade8ffb324652ba619242203f91259207b81f4a)

Author SHA1 Message Date
mipel d84fe68120 #7 New Form
* adds NewEcoAccountForm
* refactors NewCompensationForm into AbstractCompensationForm so main fields can be reused again
* fixes template bug in account detail view where the amount of deductions has been displayed instead of the available rest
* refactors _generate_new_identifier() into generate_new_identifier()
* refactors get_available_rest() into returning both, the total and relative amount
* improves saving of SimpleGeometryForm()
* adds/updates translations
3 years ago
mipel 3d31a13508 #7 New Form
* adds creation of new compensation directly from intervention detail view
* adds comment rendering on compensation detail view (WIP)
* adds shared_access_required decorator
* adds/updates translations
3 years ago
mipel 9cfb400bad #7 New Form
* adds NewCompensationForm content and functionality
* renames CODELIST_COMPENSATION_COMBINATION_ID into CODELIST_COMPENSATION_FUNDING_ID for more clarity
* reorganizes compensation forms into compensation/forms/forms.py and forms/modalForms.py
* adds new compensation html template in compensation/templates/compensation/new
* adds new default message template in message_templates.py: IDENTIFIER_REPLACED
* adds/updates translations
3 years ago
mpeltriaux ea0a07890c #7 New forms
* introduces bootstrap class form-control for proper html form input rendering
* fixes bug where missing shared users for an entry resulted in a None exception
* adds GenerateInput with template in generate-content-input.html, which provides a generate button for fetching server-side content
* adds/updates translations
3 years ago
mpeltriaux e94dbbd3c8 #7 New forms
* fixes bug in case of unset dates for intervention
* adds missing template formater
* adds/updates translations
3 years ago
mipel 9b728e5d10 #7 New forms WIP
* adds saving functionality for new intervention form
* refactors new identifier generating, so a pre-generated identifier from a new element form will be checked again before saving
* adds css fixes for disturbing input field:focus bugs
* adds missing csrf token to new collapsible form
* adds/updates translations
* introduces mark_as_deleted as only marking instead of using delete() which will really delete from the db
3 years ago
mipel 951477c58f #7 New forms WIP
* adds new collapsible styled form for new main data
* adds/updates translations
3 years ago
mipel 251f88526e #18 EcoAccount funding
* adds fundings field to AbstractCompensation model
* adds funded by to detail view templates of Compensation and EcoAccount
* adds/updates translations
3 years ago
mipel a7970a1221 #18 EcoAccount funding
* adds constraint for setting the deductable_surface too low -> existing deductions would not be valid anymore
* adds/updates translations
3 years ago
mipel 4c045618e6 Eco Account deduction
* adds deductable_surface to EcoAccount model to provide an easy way to change the deductable amount from an account -> depends on external funding e.g. with AktionBlau or similar
* adds overview of deducted and deductable volume to detail view
* adds check to eco account model, so the deductable_surface can never be larger than the total amount of after_state surface sum
* adds german formating for python logic based number formating
* adds/updates translations
3 years ago
mipel cd5fb9cad6 Withdraw to deduct
* refactors all files and variable names
* WIP: Models and attributes
3 years ago
mipel 415fe267d2 [Intervention] Revocations files optional #4
* makes revocation file upload optional
 * adds overview about revocations to intervention index
 * adds/updates translations
3 years ago
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
3 years ago
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
3 years ago
mipel 631b5d0ea6 EMA Filter
* refactors EmaTableFilter to inherit from EcoAccountFilter
* refactors messages for recording/unrecording of EMA
* adds/updates translations
3 years ago
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
3 years ago
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
3 years ago
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
3 years ago
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
3 years ago
mipel ddd6669bbf Translations
* adds/updates translations
3 years ago
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"
3 years ago
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
3 years ago
mipel 09d7cad8c8 LANIS Link
* adds LANIS link getter to Intervention, Compensation and EcoAccount for creating a usable link to LANIS
* adds/updates translations
3 years ago
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
3 years ago
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
3 years ago
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
3 years ago
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
3 years ago
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
3 years ago
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
3 years ago
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
3 years ago
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
3 years ago
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
3 years ago
mipel 2e3fdaad97 Translation fix
* fixes label and translation in a form
3 years ago
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
3 years ago
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
3 years ago
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
3 years ago
mipel 19f50baae4 Missing group message
* adds group checker decorator for adding a message informing about missing group privileges
3 years ago
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
3 years ago
mipel c72ff615ba User contact modal
* adds user/includes/contact_modal_button.html for calling contact data of a user
* adds user contact modal to intervention detail view
* adds translations
3 years ago
mipel 6a650d2021 Eco Accounts
* adds related eco account withdraw detail view to intervention detail view
* adds new route for removing withdraws using RemoveModalForm
* adds EcoAccountWithdraw model
* adds admin interfaces for EcoAccount and EcoAccountWithdraw
* adds message_templates.py to konova/utils for reusable messages
* splits related-documents.html and related-objects.html into separate templates for each related object type: compensations.html, documents.html, eco-account-withdraws.html and payments.html
* adds translations
3 years ago
mipel 52600c9a16 Share intervention settings
* extends share link form to share settings form
* adds list of users with access to the intervention
* adds logic for removing these users
* enhances translations
3 years ago
mipel 923f09d9f4 Typo
* fixes minor translation typ
3 years ago
mipel 5c16406873 Share url view
* adds modal for rendering the share url
* adds new custom_widget text-to-clipboard-input.html
  * provides a copy button for writing the text input's value into the client's clipboard
* adds translation
3 years ago
mipel 2f33e5fba9 Access url for interventions
* adds access_token as new attribute
* adds generating of access_token
* adds new form
* adds two new routes for sharing an intervention
* adds translation
* adds render_submit to BaseModalForm which triggers rendering the modal footer
3 years ago
mipel 1d77eb293e Harden search filter
* hardens search filter against whitespaces
* renames 'Show all' filter to 'Show unshared' for clarification
* adds translation
3 years ago
mipel d919eee3b4 Dashboard dynamic content
* replaces static dummy values with database values
* renames 'Your own' into 'Shared with you' for clarification
* adds translation
3 years ago
mipel 2889b10e0d Payments add modal form
* adds help texts to add payment form
* adds removing button for payments
* refactors user fetching into BaseForm
* adds generic RemoveModalForm which is intended to be used for every modal form which shall remove something
* adds translations
* removes unused html
* prepares payment amount field to be able to process german inputs like '1.000,50' which is not the international default
3 years ago
mipel 23afe2654e Payments add modal form
* adds modal form for adding payments
* generalizes generic_table_form.html for table-form-like usage in modal_form.html
* adds css enhancements for focused input fields
* adds BaseModalForm as specification to BaseForm, which inherits the BSModalForm class as well
* adds translations
3 years ago
mipel 8885f81770 Documents removing
* adds generic modal rendering using package django-bootstrap-modal-forms
* adds document file removing from hard drive
* adds translations
3 years ago
mipel 47ec30919c Documents removing
* adds document removing button
* adds translation
* adds Document admin
3 years ago
mipel eaa9c43afe Intervention Detail View
* adds hint for empty map in case of missing geometry
* adds empty geometry workaround, so openlayers is rendered without digitalization tools
* adds translations
3 years ago
mipel a304f8d42e Intervention Detail View
* adds related object overview in detail view
* adds comment field to payment model for 'Verwendungszweck'
* simplifies intervention urls
* adds translations
3 years ago
mipel 4d651aec24 Intervention Detail View
* adds (WIP) detail view for interventions
* renames typo in conservations_file_number to conservation_file_number
* adds simple has_access check for intervention objects for given users
* renames occurences of "Registered" to "Recorded" (verzeichnen)
* adds an informing message for detail view of intervention objects which are not editable for a user
* adds GeometryAdmin
* adds fallback DEFAULT_SRID for Geometry model
* adds translations
3 years ago
mipel 0c1fa72556 Table filters
* adds table filtering for InterventionTable
* adds default ordering
* moves user-access filtering from view to InterventionTableFiler
* adds generic render_icn method for BaseTable (for usage with fontawesome5)
* adds translations
* improves table.html template
3 years ago
mipel 67f415c2e3 Intervention tables and model adjustments
* adds user access relation to certain models
* adds pagination to tables
* adds checked_on/_by attributes to intervention model
* adds custom column rendering for checked and registered columns
* adds first simple index filtering of default interventions for user
* adds translations
3 years ago
mipel ee6984de00 Translations
* adds some translations
3 years ago
mipel c72a7faa3d Translations
* re-enable translations for groups
3 years ago
mipel 044085bf55 Translations
* adds translations
3 years ago
mipel 903a22973f User menu
* adds user notifications and management
3 years ago
mipel b1ea9aa1e2 Dashboard
* finishes work on dashboard
3 years ago
mipel 7968d7d355 Landing page
* started to implement a landing page
* started news implementation
3 years ago
mipel b63cb3c493 Simple navbar finished 3 years ago
mipel 629bf4230e Simple navbar implemented 3 years ago
mipel 32370a0a7e Permission rethinking
* No detailed permissions due to django constraints on model-based permissions
* instead: logic controlled permission by group membership
* adds translations
3 years ago
mipel a5e8bcfa8c Initial 3 years ago