Commit Graph

175 Commits (master)

Author SHA1 Message Date
mpeltriaux c0de1ae28d #112 AbstractCompensation rendering enhancements
* minor changes to detail view rendering of EMA, Compensation and EcoAccount
3 years ago
mpeltriaux 95856c9ee9 #112 CompensationAction Tree
* implements generic HTML based and Django compatible TreeView
* enhances listing of CompensationActions on DetailView
3 years ago
mpeltriaux 1028c19f87 Translation update
* updates translations
3 years ago
mpeltriaux c5534bcd55 #86 Edit document
* adds support for editing of documents
* adds buttons for intervention
3 years ago
mpeltriaux d106977c34 #86 Edit deductions
* adds support for editing deductions
* adds tests
* improves major base test logic
3 years ago
mpeltriaux ce9143e4b2 #86 Edit payment
* adds button for payment editing
* adds new edit form payment editing
* adds tests for views and workflow
3 years ago
mpeltriaux 402bc2d6f3 #86 Parcel district column for all
* adds parcel district column for all major data objects
* adds warning about intervention-revocation on index view of compensations
* adds warning about intervention-revocation on detail view of related compensations
3 years ago
mpeltriaux 23c04c8883 #86 Parcel districts instead of revocation
* drops revocation column in favour of a parcel district column
3 years ago
mpeltriaux 5ebb3f833a #86 Log detail enhancements
* restructures removing of related data into separate sub-delete forms for easier logic handling
3 years ago
mpeltriaux 7d3c3f030b # 86 Deadline removal log entry
* adds log entries if deadline is removed
3 years ago
mpeltriaux 0a6d5cf19b #86 Userlogs Compensation
* adds log details for adding/removing of compensations for intervention
* adds handy restore-deleted function for admin backend for alls BaseObject derivatives
* adds/updates translations
3 years ago
mpeltriaux b17b0b5144 # 86 Proper log detail
* adds support for payment adding/deleting to intervention log
* adds support for deduction adding/deleting to intervention/ecoaccount log
* improves code snippets
* drops add_deduction() methods for ecoaccount and intervention in favor of simpler creation in NewDeductionModalForm
* adds messages
* adds/updates translations
3 years ago
mpeltriaux 73cf3fc503 #88 Action detail codes
* adds codelist 1035 for compensation action detail codes
* extends CompensationAction model
* extends NewActionForm
* extends detail view of compensation action related models
* add/updates translations
* adds autocomplete tests
3 years ago
mpeltriaux 95a17ed04f # 88 Extra biotope codes
* adds additional biotope konovaCodes to CompensationState model
* increases rpp for Autocompletion
* adds/updates translations
3 years ago
mpeltriaux e0f7de37b6 #31 API further credential
* adds Kspuser as another expected header data to resolve the api user
* adds/updates translations
3 years ago
mpeltriaux b86202ba98 #31 API Token mail
* sends an email to the support address if a new token has been generated
3 years ago
mpeltriaux b13e67e061 #31 API Frontend token generating
* adds frontend settings for users to create API tokens on their user settings
3 years ago
mpeltriaux b72426e20f # 83 Publication rework interventions
* adds abstract is_ready_for_publish method to PublishableObjectMixin which needs to be implemented in subclasses
* adds implementation for intervention model
* adds publishable check to rendering report view
* adds/updates translations
3 years ago
mpeltriaux 79b9be5637 # 70 Tab title rest
* adds tab titles for some other pages
* adds/updates translations
3 years ago
mpeltriaux 7a8cafcd77 # 70 Tab title EMA
* adds ema tab titles
* adds/updates translations
3 years ago
mpeltriaux b9bec82876 # 70 Tab title eco-account
* adds tab titles for eco account
* adds/updates translations
3 years ago
mpeltriaux 014155b0a4 # 70 Tab title compensation
* adds tab titles for compensations
* adds/updates translations
* optimizes identifier generating, so that one-digit months will be converted into two digits
3 years ago
mpeltriaux dc42278943 # 70 Tab titles interventions
* adds content related tab title
* adds/updates translations
3 years ago
mpeltriaux 6f76b3a53d # 62 404 and 500
* adds custom 404 and 500 error handling views
* adds/updates translations
3 years ago
mpeltriaux 795f64f20b # 63 Mail data checked
* adds mail sending if shared data is checked
* adds/updates translations
3 years ago
mpeltriaux 5ca4c7c777 # 63 UserNotificationEnum changes
* drops NOTIFY_ON_REGISTERED_DATA_EDITED in favor of NOTIFY_ON_SHARED_DATA_CHECKED
* adds/updates translations
3 years ago
mpeltriaux 7c5454a2c9 # 63 Mail data deleted
* adds mail sending if shared data is deleted
* adds/updates translations
* refactors recording mails into separate email template folder email/recording
3 years ago
mpeltriaux 157f05ead6 # 63 Mail recording/unrecording
* adds mail sending in case of unrecording and recording of data
* adds/updates translations
3 years ago
mpeltriaux 17dc3f7537 # 63 Mail celery
* moves mail sending to celery worker using shared_task in konova/tasks.py
* adds mail sending for shared access given
* adds UserNotification settings checks for mail sending
* adds/updates translations
3 years ago
mpeltriaux 9c4bab3800 # 63 Mail shared access revoked
* adds mail support for revoking shared access
* adds/updates translations
3 years ago
mpeltriaux 02970b19b4 # 63 Refactoring
* refactors django User model to custom User model to provide further attributes and methods directly on the user model
3 years ago
mpeltriaux 5bca8fc8f7 # 61 Filter frontend
* adds filtering for file number
* updates translations
3 years ago
mpeltriaux 524b5c340f # 61 Filter backend
* refactors table filters by introducing AbstractTableFilter, GeoReferencedTableFilterMixin, ShareableTableFilterMixin and RecordableTableFilterMixin
* adds full filter functionality
* refactors TableFilter inheritances for all objects
3 years ago
mpeltriaux e2fe85a4fb #57 Deduction shortcut remove
* removes deduction shortcut
* adds missing quality checks on intervention deduction accounts validity
* fixes error if checked intervention shall be checked again
* adds/updates translations
3 years ago
mpeltriaux d6d15185ea #55 Celery parcel updating
* adds celery to project
* adds celery background task for updating parcels
* adds parcel calculation to creating of new geometries as well
* tests outstanding!!!
3 years ago
mpeltriaux bf0de00b72 #49 Frontend rendering
* adds rendering for detail view
* adds new includable html snippet for parcel rendering
* refactors generic includables in konova/ app into konova/templates/includes/...
* fixes bug where parcels have been reused from the database due to wrong model structure
* adds get_underlying_parcels() for Geometry model
* adds get_underlying_parcels() for GeoReferencedMixin models
* fixes bug where missing geometry would lead to an error during geometry conflict check
* removes unused wfs attribute from AbstractWFSFetcher
* adds/updates translations
3 years ago
mpeltriaux 5df84bb7a1 #50 Overlaying geometries Tests
* adds test for geometry conflicts
* refactors rechecking of existing conflicts to avoid recursion in certain cases
* adds/updates translations
3 years ago
mpeltriaux 22da2d4bbe #48 Changes autocomplete
* changes the autocomplete route for user retrieving from _istartswith to full qualified check
* extends the help text for form to inform about full qualified username needed
* updates translation
3 years ago
mpeltriaux c43b45a0e4 #46 MIME Type check
* adds file mime type check on NewDocumentForm
* adds file size check on NewDocumentForm
* adds is_xy_valid methods as classmethods on AbstractDocument
* adds translations for error messages
* updates help text on NewDocumentForm file field
3 years ago
mpeltriaux 6cb1a31aff Refactors triggering checked/recorded
* refactors BaseForm request/user initialization
* introduces mark_as_edited() method for compensation models
3 years ago
mpeltriaux ab8d5c9724 #38 User requests
* implements 5) "Add 'Maßnahmentyp' for KOMs "
    * prepares model and form fields as mixins for easy extension to eco accounts and emas (possibly in the future?)
3 years ago
mpeltriaux 7ed114a858 #38 User requests
* implements 3) "Extend sharing on direct adding of users"
3 years ago
mpeltriaux 36470f819c #38 User requests
* implements 2) "Multiple revocations for interventions"
3 years ago
mpeltriaux 4a4c9ad049 #36 Quality checks
* adds unchecking/unrecording of interventions in case of post-check|post-record editing
3 years ago
mpeltriaux 26c1cee27e #36 Quality checks
* adds quality check logic for EcoAccount with EcoAccountQualityChecker
* adds/updates translations
* adds quality check logic for EMA with EmaQualityChecker
3 years ago
mpeltriaux 619f2110e4 #36 Quality checks
* adds quality check logic for Compensations with CompensationQUalityChecker
* adds compensation quality checking to checking routine of RunCheckModalForm.is_valid()
* adds/updates translations
3 years ago
mpeltriaux a5b1f68f62 #36 Quality checks
* adds AbstractQualityChecker as base for all quality checker instances
* adds InterventionQualityChecker, inheriting from AbstractQualityChecker
* adds functionality to InterventionQualityChecker
* adds/updates translations
3 years ago
mpeltriaux 6ca5b32945 #26 Annual conservation report
* adds LegalData to EcoAccount to provide registration_date support ("agreement date") for old-data report generating
* adds/updates translations
3 years ago
mpeltriaux e22e390040 #26 Annual conservation reports
* enhances TimespanReportForm control rendering
* adds/updates translations
3 years ago
mpeltriaux 6b839b7f60 #26 Annual conservation reports
* adds index form for selecting timespan and office of interest
* adds timespan support for TimespanReport
* fixes naive datetime issues
* fixes missing error message css tag
* adds/updates translations
3 years ago
mpeltriaux b90a07ca2a #26 Annual conservation report
* WIP: EcoAccountReport
3 years ago
mpeltriaux 88c7f64901 #26 Annual conservation report
* finishes compensation analysis report
3 years ago
mpeltriaux 33de71d554 #26 Annual conservation report
* adds new templatetag default_if_zero in ksp_filters.py
* adds/updates translations
3 years ago
mpeltriaux 92155fb742 #26 Annual conservation report
* introduces new app 'analysis' for annual report generating and future features
* adds new templates (WIP)
* adds new routes (WIP)
3 years ago
mpeltriaux 7631adc88f Translations
* adds/updates translations
3 years ago
mpeltriaux 85759a636a Database performance
* optimizes the db fetching for all index views and detail views
* introduces usage of managers.py in all necessary apps for wrapping basic fetch settings
* moves comment.html to comment_card.html under /konova/templates/konova/
* adds/updates translations
* fixes document typos
* drops comment rendering in public reports
* opens public reports in new tabs if button is clicked from the detail view
3 years ago
mpeltriaux f5f08b979b #25 Public reports
* adds fully functional EMA report
* adds/updates translations
3 years ago
mpeltriaux 193ba4c658 #25 Public reports
* adds public report for compensations
* adds/updates translations
* prepares EMA and eco account reports
3 years ago
mpeltriaux c4a205908a #25 Public reports
* adds/updates translation
3 years ago
mpeltriaux ac17d953c6 #25 Public reports
* adds public report rendering for intervention model
* adds new routes for report
* adds new public_base.html and public_navbar.html
* adds lookup table for zoom levels for lanis link generating
* moves qr code generating into utils/generators.py
3 years ago
mipel 7d46ebd2f4 #7 New Form
* adds minor __str__() improvement
* adds/updates translations
3 years ago
mipel 60f03591ef #7 New Form
* adds EditEcoAccountForm
* adds placeholders for some form fields
* changes comment card in detail view into rlp-grayish
* adds eco account detail view comment box
* removes unnecessary loading of dal scripts in view.html
* refactors generated identifier for data objects (10 digits to 6 uppercase letter-digit combination)
* improves generate_random_string() method by adding more options for generation of strings
* adds/updates translations
3 years ago
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 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