Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added new field internerBezeicher (internal_identifier) #393

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
added new field internerBezeicher (internal_identifier)
updated localisation

fixed wrong intendations, tool long lines (code sniffer warnings)

added new json-schema field internerBezeichner to test data in unittests

Fix after rebase
svenow committed Jan 14, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 65985e3de0c60cb05c944b9d0e7ed8fe4f93bbff
Original file line number Diff line number Diff line change
@@ -47,6 +47,11 @@ public function __construct(
'maxLength' => 500,
'$tag' => JsonSchema::fromArray(['mapToField' => ['fieldName' => 'short_description']]),
]),
'internerBezeichner' => new JsonSchemaString([
'$tag' => JsonSchema::fromArray(
['mapToField' => ['fieldName' => 'funding_application_process_extra.internal_identifier']]
),
]),
'zeitraeume' => new JsonSchemaArray(
new JsonSchemaObject([
'beginn' => new JsonSchemaDate([
@@ -109,7 +114,9 @@ public function __construct(

$required = array_filter(
array_keys($properties),
static fn (string $key) => $key !== 'fahrtstreckeInKm' && $key !== 'programmtageMitHonorar',
static fn (string $key) => $key !== 'fahrtstreckeInKm'
&& $key !== 'programmtageMitHonorar'
&& $key !== 'internerBezeichner',
);

parent::__construct($properties, ['required' => $required]);
Original file line number Diff line number Diff line change
@@ -43,6 +43,7 @@ public function __construct(string $scopePrefix, bool $report = FALSE) {
'placeholder' => 'Maximal 500 Zeichen',
]
),
new JsonFormsControl("$scopePrefix/internerBezeichner", 'Interner Bezeichner'),
new JsonFormsArray("$scopePrefix/zeitraeume", 'Zeiträume', NULL, [
new JsonFormsControl('#/properties/beginn', 'Beginn'),
new JsonFormsControl('#/properties/ende', 'Ende'),
Original file line number Diff line number Diff line change
@@ -46,6 +46,11 @@ public function __construct(
'maxLength' => 500,
'$tag' => JsonSchema::fromArray(['mapToField' => ['fieldName' => 'short_description']]),
]),
'internerBezeichner' => new JsonSchemaString([
'$tag' => JsonSchema::fromArray(
['mapToField' => ['fieldName' => 'funding_application_process_extra.internal_identifier']]
),
]),
'zeitraeume' => new JsonSchemaArray(
new JsonSchemaObject([
'beginn' => new JsonSchemaDate([
@@ -109,7 +114,12 @@ public function __construct(
$teilnehmerProperties['mitFahrtkosten'] = new JsonSchemaInteger(['minimum' => 0], TRUE);
}

parent::__construct($properties, ['required' => array_keys($properties)]);
$required = array_filter(
array_keys($properties),
static fn (string $key) => $key !== 'internerBezeichner',
);

parent::__construct($properties, ['required' => $required]);
}

/**
Original file line number Diff line number Diff line change
@@ -74,6 +74,7 @@ public function __construct(string $scopePrefix, bool $report = FALSE) {
'placeholder' => 'Kurzbeschreibung der Kursinhalte (maximal 500 Zeichen)',
]
),
new JsonFormsControl("$scopePrefix/internerBezeichner", 'Interner Bezeichner'),
new JsonFormsArray("$scopePrefix/zeitraeume", 'Zeiträume', NULL, [
new JsonFormsControl('#/properties/beginn', 'Beginn'),
new JsonFormsControl('#/properties/ende', 'Ende'),
Original file line number Diff line number Diff line change
@@ -38,6 +38,11 @@ public function __construct(\DateTimeInterface $applicationBegin, \DateTimeInter
'maxLength' => 500,
'$tag' => JsonSchema::fromArray(['mapToField' => ['fieldName' => 'short_description']]),
]),
'internerBezeichner' => new JsonSchemaString([
'$tag' => JsonSchema::fromArray(
['mapToField' => ['fieldName' => 'funding_application_process_extra.internal_identifier']]
),
]),
'zeitraeume' => new JsonSchemaArray(
new JsonSchemaObject([
'beginn' => new JsonSchemaDate([
@@ -71,7 +76,12 @@ public function __construct(\DateTimeInterface $applicationBegin, \DateTimeInter
]),
];

parent::__construct($properties, ['required' => array_keys($properties)]);
$required = array_filter(
array_keys($properties),
static fn (string $key) => $key !== 'internerBezeichner',
);

parent::__construct($properties, ['required' => $required]);
}

/**
Original file line number Diff line number Diff line change
@@ -56,6 +56,10 @@ public function __construct(string $scopePrefix) {
'placeholder' => 'Maximal 500 Zeichen',
]
),
new JsonFormsControl(
"$scopePrefix/internerBezeichner",
'Interner Bezeichner'
),
new JsonFormsArray(
"$scopePrefix/zeitraeume",
'Zeiträume',
Original file line number Diff line number Diff line change
@@ -64,7 +64,12 @@ <h2>{{ ts('General') }}</h2>
value="data.grunddaten.kurzbeschreibungDesInhalts"
e-ng-required="true"></editable-field>
</div>

<div>
<editable-field label="'Interner Bezeichner'" type="text"
value="data.grunddaten.internerBezeichner"
e-ng-required="false"></editable-field>
</div>
`
<div>
<h3>Zeiträume <funding-validation-errors errors="errors['/grunddaten/zeitraeume']"></funding-validation-errors></h3>
<table class="table table-condensed table-striped table-hover">
5 changes: 5 additions & 0 deletions ang/crmFundingIJB/ijbApplicationEditor.template.html
Original file line number Diff line number Diff line change
@@ -66,6 +66,11 @@ <h2>Grunddaten</h2>
value="data.grunddaten.kurzbeschreibungDesInhalts"
e-ng-required="true"></editable-field>
</div>
<div>
<editable-field label="'Interner Bezeichner'" type="text"
value="data.grunddaten.internerBezeichner"
e-ng-required="false"></editable-field>
</div>
<div>
<h3>Zeiträume <funding-validation-errors errors="errors['/grunddaten/zeitraeume']"></funding-validation-errors></h3>
<table class="table table-condensed table-striped table-hover">
Original file line number Diff line number Diff line change
@@ -64,7 +64,12 @@ <h2>{{ ts('General') }}</h2>
value="data.grunddaten.kurzbeschreibungDerInhalte"
e-ng-required="true"></editable-field>
</div>

<div>
<editable-field label="'Interner Bezeichner'" type="text"
value="data.grunddaten.internerBezeichner"
e-ng-required="false"></editable-field>
</div>
`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems not to be intended.

<div>
<h3>Zeiträume <funding-validation-errors errors="errors['/grunddaten/zeitraeume']"></funding-validation-errors></h3>
<table class="table table-condensed table-striped table-hover">
Binary file modified l10n/de_DE/LC_MESSAGES/funding.mo
Binary file not shown.
89 changes: 88 additions & 1 deletion l10n/de_DE/LC_MESSAGES/funding.po
Original file line number Diff line number Diff line change
@@ -30,6 +30,7 @@ msgstr "Währung"
#: Civi/Funding/Api4/Action/FundingProgram/GetFieldsAction.php
#: Civi/Funding/Api4/Action/FundingTransferContract/GetFieldsAction.php
#: ang/crmFunding/case/fundingCase.template.html
#: managed/SavedSearchFundingCases.mgd.php
#: managed/SavedSearchFundingProgramControlling.mgd.php
#: managed/SavedSearch_Clearings.mgd.php
#: managed/SavedSearch_funding_cases.mgd.php
@@ -43,6 +44,7 @@ msgstr "Abgerechneter Betrag"
#: Civi/Funding/Api4/Action/FundingProgram/GetFieldsAction.php
#: Civi/Funding/Api4/Action/FundingTransferContract/GetFieldsAction.php
#: ang/crmFunding/case/fundingCase.template.html
#: managed/SavedSearchFundingCases.mgd.php
#: managed/SavedSearchFundingProgramControlling.mgd.php
#: managed/SavedSearch_Clearings.mgd.php
#: managed/SavedSearch_funding_cases.mgd.php
@@ -1797,6 +1799,15 @@ msgstr "Rechnerische Prüfung: %status"
msgid "Status: %status"
msgstr "Status: %status"

#: ang/crmFunding/application/history/applicationProcessActivity.directive.js
#: ang/crmFunding/case/fundingCase.template.html
#: ang/crmFunding/clearing/clearingEditor.template.html
#: ang/crmFundingAVK1SonstigeAktivitaet/avk1SonstigeAktivitaetApplicationEditor.template.html
#: ang/crmFundingIJB/ijbApplicationEditor.template.html
#: ang/crmFundingSammelantragKurs/sammelantragKursApplicationEditor.template.html
msgid "Unknown"
msgstr "Unbekannt"

#: ang/crmFunding/application/history/applicationProcessHistory.template.html
msgid "Filter"
msgstr "Filter"
@@ -1897,6 +1908,44 @@ msgstr "leer"
msgid "Type"
msgstr "Art"

#: ang/crmFunding/case/permissions/fundingCaseContactRelation.template.html
#: ang/crmFunding/program/newCasePermissions/fundingNewCasePermissions.template.html
#: ang/crmFunding/program/permissions/fundingProgramContactRelation.template.html
msgid "Permissions"
msgstr "Berechtigungen"

#: ang/crmFunding/clearing/clearingEditor.template.html
#: ang/crmFundingAVK1SonstigeAktivitaet/avk1SonstigeAktivitaetApplicationEditor.template.html
#: ang/crmFundingIJB/ijbApplicationEditor.template.html
#: ang/crmFundingSammelantragKurs/sammelantragKursApplicationEditor.template.html
msgid "Reviewers"
msgstr "Prüfer*innen"

#: ang/crmFunding/clearing/clearingEditor.template.html
#: ang/crmFundingAVK1SonstigeAktivitaet/avk1SonstigeAktivitaetApplicationEditor.template.html
#: ang/crmFundingIJB/ijbApplicationEditor.template.html
#: ang/crmFundingSammelantragKurs/sammelantragKursApplicationEditor.template.html
msgid "General"
msgstr "Allgemein"

#: ang/crmFunding/clearing/clearingEditor.template.html
#: ang/crmFundingAVK1SonstigeAktivitaet/avk1SonstigeAktivitaetApplicationEditor.template.html
#: ang/crmFundingIJB/ijbApplicationEditor.template.html
#: ang/crmFundingSammelantragKurs/sammelantragKursApplicationEditor.template.html
#: managed/CustomGroupFundingApplicationTask.mgd.php
#: managed/SavedSearch_Clearings.mgd.php
msgid "Review Content"
msgstr "Fachliche Prüfung"

#: ang/crmFunding/clearing/clearingEditor.template.html
#: ang/crmFundingAVK1SonstigeAktivitaet/avk1SonstigeAktivitaetApplicationEditor.template.html
#: ang/crmFundingIJB/ijbApplicationEditor.template.html
#: ang/crmFundingSammelantragKurs/sammelantragKursApplicationEditor.template.html
#: managed/CustomGroupFundingApplicationTask.mgd.php
#: managed/SavedSearch_Clearings.mgd.php
msgid "Review Calculative"
msgstr "Rechnerische Prüfung"

#: ang/crmFunding/clearing/clearingSidebar.template.html
msgid ""
"The aim intended with the funding was achieved. All required proofs are "
@@ -2125,10 +2174,22 @@ msgstr "Förderfalltypen"
msgid "Funding Application"
msgstr "Förderantrag"

#: managed/OptionValue_cg_extend_objects-civicrm_funding_application_process.mgd.php
#: managed/OptionValueCgExtendsFundingProgram.mgd.php
#: managed/SavedSearchFundingCaseApplicationProcesses.mgd.php
#: managed/SavedSearchFundingCases.mgd.php
#: managed/SavedSearch_Clearings.mgd.php
#: managed/SavedSearch_Drawdowns_by_Recipient_and_Funding_Program.mgd.php
msgid "Funding Program"
msgstr "Förderprogramm"

#: managed/OptionValue_cg_extend_objects-civicrm_funding_application_process.mgd.php CRM/Funding/DAO/ApplicationProcess.php
msgid "Application Process"
msgstr "Antragsprozess"

#: CRM/Funding/DAO/ApplicationProcess.php
msgid "Application Processes"
msgstr "Antragsprozesse"

#: managed/OptionValue_funding_clearing_create.mgd.php
msgid "Activity type for funding clearing creation"
msgstr "Aktivitätsart für Erstellung eines Verwendungsnachweises"
@@ -2163,6 +2224,19 @@ msgstr "Rückzahlungsforderung"
msgid "Table"
msgstr "Tabelle"

#: managed/SavedSearchFundingApplicationProcesses.mgd.php
#: managed/SavedSearchFundingCaseApplicationProcesses.mgd.php
#: managed/SavedSearchFundingCaseTypes.mgd.php
#: managed/SavedSearchFundingProgramControlling.mgd.php
#: managed/SavedSearchFundingPrograms.mgd.php
#: managed/SavedSearch_Clearings.mgd.php
msgid "Title"
msgstr "Titel"

#: managed/SavedSearchFundingApplicationProcesses.mgd.php
msgid "Short Description"
msgstr "Kurzbeschreibung"

#: managed/SavedSearchFundingApplicationProcesses.mgd.php
msgid "Clearing Status"
msgstr "Verwendungsnachweisstatus"
@@ -2210,6 +2284,10 @@ msgstr "Vorlagen verwalten"
msgid "Manage external application templates"
msgstr "Externe Antragsvorlagen verwalten"

#: managed/SavedSearchFundingCases.mgd.php
msgid "Open case"
msgstr "Fall öffnen"

#: managed/SavedSearchFundingDrawdowns.mgd.php
msgid "Requester"
msgstr "Anforderer"
@@ -2231,10 +2309,19 @@ msgstr "Dokument herunterladen"
msgid "Budget"
msgstr "Budget"

#: managed/SavedSearchFundingProgramControlling.mgd.php
#: managed/SavedSearchFundingPrograms.mgd.php
msgid "End Date"
msgstr "Enddatum"

#: managed/SavedSearchFundingPrograms.mgd.php
msgid "Identifier Prefix"
msgstr "Bezeichnerpräfix"

#: managed/SavedSearchFundingPrograms.mgd.php
msgid "Start Date"
msgstr "Startdatum"

#: managed/SavedSearchFundingPrograms.mgd.php
msgid "Requests Start Date"
msgstr "Startdatum für Anträge"
Original file line number Diff line number Diff line change
@@ -132,6 +132,7 @@ public function testFachkraefteprogrammDeutschland(): void {
'grunddaten' => [
'titel' => 'Test',
'kurzbeschreibungDesInhalts' => 'foo bar',
'internerBezeichner' => 'interne id',
'zeitraeume' => [
[
'beginn' => '2022-08-25',
@@ -336,6 +337,7 @@ public function testFachkraefteprogrammDeutschland(): void {
static::assertEquals([
'title' => 'Test',
'short_description' => 'foo bar',
'funding_application_process_extra.internal_identifier' => 'interne id',
'recipient_contact_id' => 2,
'start_date' => '2022-08-24',
'end_date' => '2022-08-26',
@@ -423,6 +425,7 @@ public function testFachkraefteprogrammPartnerland(): void {
'grunddaten' => [
'titel' => 'Test',
'kurzbeschreibungDesInhalts' => 'foo bar',
'internerBezeichner' => 'interne id',
'zeitraeume' => [
[
'beginn' => '2022-08-24',
@@ -619,6 +622,7 @@ public function testFachkraefteprogrammPartnerland(): void {
static::assertEquals([
'title' => 'Test',
'short_description' => 'foo bar',
'funding_application_process_extra.internal_identifier' => 'interne id',
'recipient_contact_id' => 2,
'start_date' => '2022-08-24',
'end_date' => '2022-08-26',
@@ -706,6 +710,7 @@ public function testJugendbegegnungDeutschland(): void {
'grunddaten' => [
'titel' => 'Test',
'kurzbeschreibungDesInhalts' => 'foo bar',
'internerBezeichner' => 'interne id',
'zeitraeume' => [
[
'beginn' => '2022-08-24',
@@ -908,6 +913,7 @@ public function testJugendbegegnungDeutschland(): void {
static::assertEquals([
'title' => 'Test',
'short_description' => 'foo bar',
'funding_application_process_extra.internal_identifier' => 'interne id',
'recipient_contact_id' => 2,
'start_date' => '2022-08-24',
'end_date' => '2022-08-26',
@@ -995,6 +1001,7 @@ public function testJugendbegegnungPartnerland(): void {
'grunddaten' => [
'titel' => 'Test',
'kurzbeschreibungDesInhalts' => 'foo bar',
'internerBezeichner' => 'interne id',
'zeitraeume' => [
[
'beginn' => '2022-08-24',
@@ -1191,6 +1198,7 @@ public function testJugendbegegnungPartnerland(): void {
static::assertEquals([
'title' => 'Test',
'short_description' => 'foo bar',
'funding_application_process_extra.internal_identifier' => 'interne id',
'recipient_contact_id' => 2,
'start_date' => '2022-08-24',
'end_date' => '2022-08-26',
@@ -1276,6 +1284,7 @@ public function testFinanzierungNichtAusgeglichen(): void {
'grunddaten' => (object) [
'titel' => 'Test',
'kurzbeschreibungDesInhalts' => 'foo bar',
'internerBezeichner' => 'interne id',
'zeitraeume' => [
(object) [
'beginn' => '2022-08-24',
Original file line number Diff line number Diff line change
@@ -78,6 +78,7 @@ public function testValidation(): void {
$grunddaten = (object) [
'titel' => 'Test',
'kurzbeschreibungDesInhalts' => 'foo bar',
'internerBezeichner' => 'interne id',
'zeitraeume' => [
(object) [
'beginn' => '2022-08-24',
@@ -234,6 +235,7 @@ public function testValidationSpracheAndere(): void {
$grunddaten = (object) [
'titel' => 'Test',
'kurzbeschreibungDesInhalts' => 'foo bar',
'internerBezeichner' => 'interne id',
'zeitraeume' => [
(object) [
'beginn' => '2022-08-24',
Loading