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
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -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([
Expand Down Expand Up @@ -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]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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([
Expand Down Expand Up @@ -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]);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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([
Expand Down Expand Up @@ -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]);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
`
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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

could you elaborate?

<div>
<h3>Zeiträume <funding-validation-errors errors="errors['/grunddaten/zeitraeume']"></funding-validation-errors></h3>
<table class="table table-condensed table-striped table-hover">
Expand Down
5 changes: 5 additions & 0 deletions ang/crmFundingIJB/ijbApplicationEditor.template.html
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
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
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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 "
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand All @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ public function testFachkraefteprogrammDeutschland(): void {
'grunddaten' => [
'titel' => 'Test',
'kurzbeschreibungDesInhalts' => 'foo bar',
'internerBezeichner' => 'interne id',
'zeitraeume' => [
[
'beginn' => '2022-08-25',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -423,6 +425,7 @@ public function testFachkraefteprogrammPartnerland(): void {
'grunddaten' => [
'titel' => 'Test',
'kurzbeschreibungDesInhalts' => 'foo bar',
'internerBezeichner' => 'interne id',
'zeitraeume' => [
[
'beginn' => '2022-08-24',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -706,6 +710,7 @@ public function testJugendbegegnungDeutschland(): void {
'grunddaten' => [
'titel' => 'Test',
'kurzbeschreibungDesInhalts' => 'foo bar',
'internerBezeichner' => 'interne id',
'zeitraeume' => [
[
'beginn' => '2022-08-24',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -995,6 +1001,7 @@ public function testJugendbegegnungPartnerland(): void {
'grunddaten' => [
'titel' => 'Test',
'kurzbeschreibungDesInhalts' => 'foo bar',
'internerBezeichner' => 'interne id',
'zeitraeume' => [
[
'beginn' => '2022-08-24',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -1276,6 +1284,7 @@ public function testFinanzierungNichtAusgeglichen(): void {
'grunddaten' => (object) [
'titel' => 'Test',
'kurzbeschreibungDesInhalts' => 'foo bar',
'internerBezeichner' => 'interne id',
'zeitraeume' => [
(object) [
'beginn' => '2022-08-24',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ public function testValidation(): void {
$grunddaten = (object) [
'titel' => 'Test',
'kurzbeschreibungDesInhalts' => 'foo bar',
'internerBezeichner' => 'interne id',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Seeing this I think we have problems with the field mapping when used in report forms. The value would be mapped to the FundingClearingProcess entity which makes no sense. So this field either has to be read only in clearing forms or the value has to be mapped to the FundingApplicationProcess entity.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

in aul-funding, the custom group CustomGroup_funding_application_process_extra contains the internal_identifier field and extends FundingApplicationProcess . is it that what you mean?

'zeitraeume' => [
(object) [
'beginn' => '2022-08-24',
Expand Down Expand Up @@ -234,6 +235,7 @@ public function testValidationSpracheAndere(): void {
$grunddaten = (object) [
'titel' => 'Test',
'kurzbeschreibungDesInhalts' => 'foo bar',
'internerBezeichner' => 'interne id',
'zeitraeume' => [
(object) [
'beginn' => '2022-08-24',
Expand Down
Loading
Loading