Skip to content

Commit bb47030

Browse files
Developer (#5)
2 parents c851e1a + a845b2e commit bb47030

31 files changed

+813
-138
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,5 @@ bin/
9090
# Project exclude paths
9191
/api-contract/target/
9292
/government-service/target/
93+
/translation-service/target/
9394
/frontend/build/

api-contract/src/main/resources/api-contract.yaml

Lines changed: 177 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ servers:
1010
tags:
1111
- name: government-representative
1212
- name: government
13+
- name: menu
1314

1415
paths:
1516
/{languageShortName}/api/admin/gov-representatives:
@@ -77,7 +78,7 @@ paths:
7778
'405':
7879
description: Validation exception
7980

80-
/{languageShortName}/api/admin/gov-representatives/government/{governmentId}:
81+
/{languageShortName}/api/admin/gov-representatives/governments/{governmentId}:
8182
get:
8283
tags:
8384
- government-representative
@@ -137,19 +138,19 @@ paths:
137138
'405':
138139
description: Validation exception
139140

140-
/api/admin/gov-representatives/government:
141+
/{languageShortName}/api/admin/governments:
141142
get:
142143
tags:
143144
- government
144145
summary: Get government data
145146
operationId: renderAllGovernments
146-
#parameters:
147-
#- name: languageShortName
148-
#in: path
149-
#description: short name of selected language
150-
#required: true
151-
#schema:
152-
#type: string
147+
parameters:
148+
- name: languageShortName
149+
in: path
150+
description: short name of selected language
151+
required: true
152+
schema:
153+
type: string
153154
responses:
154155
'200':
155156
description: OK
@@ -158,7 +159,83 @@ paths:
158159
schema:
159160
type: array
160161
items:
161-
$ref: '#/components/schemas/GovernmentAdminModel'
162+
$ref: '#/components/schemas/GovernmentTranslationModel'
163+
headers:
164+
Cache-Control:
165+
description: Cache control header
166+
schema:
167+
type: string
168+
Expires:
169+
description: Expiration date header
170+
schema:
171+
type: string
172+
173+
/{languageShortName}/api/admin/governments/{governmentId}:
174+
get:
175+
tags:
176+
- government
177+
summary: Get government data
178+
operationId: renderAllGovernmentsById
179+
parameters:
180+
- name: languageShortName
181+
in: path
182+
description: short name of selected language
183+
required: true
184+
schema:
185+
type: string
186+
- name: governmentId
187+
in: path
188+
description: ID of the government to filter by
189+
required: true
190+
schema:
191+
type: integer
192+
format: int64
193+
minimum: 1
194+
responses:
195+
'200':
196+
description: OK
197+
content:
198+
application/json:
199+
schema:
200+
type: array
201+
items:
202+
$ref: '#/components/schemas/GovernmentTranslationModel'
203+
headers:
204+
Cache-Control:
205+
description: Cache control header
206+
schema:
207+
type: string
208+
Expires:
209+
description: Expiration date header
210+
schema:
211+
type: string
212+
/{languageShortName}/api/admin/menu:
213+
get:
214+
tags:
215+
- menu
216+
summary: Get menu translation
217+
operationId: renderAllMenuTranslations
218+
parameters:
219+
- name: languageShortName
220+
in: path
221+
description: short name of selected language
222+
required: true
223+
schema:
224+
type: string
225+
- name: translationKey
226+
in: query
227+
required: true
228+
schema:
229+
type: string
230+
responses:
231+
'200':
232+
description: OK
233+
content:
234+
application/json:
235+
schema:
236+
type: array
237+
items:
238+
$ref: '#/components/schemas/MenuTranslationModel'
162239
headers:
163240
Cache-Control:
164241
description: Cache control header
@@ -199,27 +276,17 @@ components:
199276
type: string
200277
format: uuid
201278
example: '3a8ea9f1-1a95-4caf-932f-2f988052933b'
202-
name:
203-
description: Name of the Representative entity
204-
type: string
205-
example: 'Vadász Csaba'
206279
government:
207280
#description: Name of the Ministry
208281
#type: string
209282
#example: "Miniszterelnökség"
210283
$ref: '#/components/schemas/GovernmentAdminModel'
211-
secretairat:
212-
description: Name of the Secretairat
213-
type: string
214-
example: "Közigzagatási államtitkár"
215-
jobTitle:
216-
description: Job title of the Government Representative
217-
type: string
218-
example: "Miniszterelnökséget vezető miniszter"
219-
address:
220-
description: Address of the Agency
221-
type: string
222-
example: "2011 Budakalász, Gerinc utca hrsz. 2287/3"
284+
representativeTranslation:
285+
$ref: '#/components/schemas/RepresentativeTranslationManagerModel'
286+
previousJobTitle:
287+
type: array
288+
items:
289+
$ref: '#/components/schemas/PreviousJobTitleTranslationModel'
223290
phoneNumber:
224291
description: Phone number of the Representative entity
225292
type: string
@@ -232,12 +299,6 @@ components:
232299
description: Photo of the Representative
233300
type: string
234301
format: byte
235-
note:
236-
description: Any extra, useful information
237-
type: string
238-
example: 'Főosztály megnevezése: '
239-
lang:
240-
type: string
241302
availability:
242303
$ref: '#/components/schemas/Availability'
243304

@@ -264,6 +325,10 @@ components:
264325
description: Address of the Agency
265326
type: string
266327
example: "2011 Budakalász, Gerinc utca hrsz. 2287/3"
328+
country:
329+
description: country of the Agency
330+
type: string
331+
example: "Magyarország"
267332
phoneNumber:
268333
description: Phone number of the Representative entity
269334
type: string
@@ -281,6 +346,54 @@ components:
281346
type: string
282347
example: 'ételérzékenység: nincs, egyéb infó: vegán'
283348

349+
RepresentativeTranslationManagerModel:
350+
type: object
351+
properties:
352+
id:
353+
type: string
354+
format: uuid
355+
example: '3a8ea9f1-1a95-4caf-932f-2f988052933b'
356+
languageShortName:
357+
type: string
358+
name:
359+
description: Name of the Representative entity
360+
type: string
361+
example: 'Vadász Csaba'
362+
secretairat:
363+
description: Name of the Secretairat
364+
type: string
365+
example: "Közigzagatási államtitkár"
366+
jobTitle:
367+
description: Job title of the Government Representative
368+
type: string
369+
example: "Miniszterelnökséget vezető miniszter"
370+
address:
371+
description: Address of the Agency
372+
type: string
373+
example: "2011 Budakalász, Gerinc utca hrsz. 2287/3"
374+
country:
375+
description: country of the Agency
376+
type: string
377+
example: "Magyarország"
378+
note:
379+
description: Any extra, useful information
380+
type: string
381+
example: 'Főosztály megnevezése: '
382+
secretNote:
383+
description: Secret note that is only visible for the Managers
384+
example: 'Secret message'
385+
386+
PreviousJobTitleTranslationModel:
387+
type: object
388+
properties:
389+
id:
390+
type: integer
391+
format: int64
392+
name:
393+
type: string
394+
languageShortName:
395+
type: string
396+
284397
GovernmentAdminModel:
285398
type: object
286399
properties:
@@ -289,6 +402,25 @@ components:
289402
format: int64
290403
name:
291404
type: string
405+
languageShortName:
406+
type: string
407+
governmentId:
408+
type: integer
409+
format: int64
410+
411+
GovernmentTranslationModel:
412+
type: object
413+
properties:
414+
id:
415+
type: integer
416+
format: int64
417+
language_short_name:
418+
type: string
419+
name:
420+
type: string
421+
governmentId:
422+
type: integer
423+
format: int64
292424

293425
Availability:
294426
type: string
@@ -306,4 +438,17 @@ components:
306438
shortName:
307439
type: string
308440
name:
441+
type: string
442+
443+
MenuTranslationModel:
444+
type: object
445+
properties:
446+
id:
447+
type: integer
448+
format: int64
449+
languageShortName:
450+
type: string
451+
translationKey:
452+
type: string
453+
translationValue:
309454
type: string

frontend/src/app/app.component.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
<div class="header-wrap">
1616
<form class="form-header" onsubmit="return false;" method="GET">
1717
<input class="au-input au-input-xl" type="text" name="search"
18-
placeholder="Adat keresés ..." />
18+
[placeholder]="searchPlaceholder ?? 'Data search ...'" />
1919
<button class="au-btn-submit" type="submit">
20-
Keresés
20+
{{ searchButton || 'Search' }}
2121
</button>
2222
</form>
2323

@@ -73,9 +73,9 @@
7373
<!-- END PAGE CONTAINER-->
7474
<footer>
7575
<ul>
76-
<li><a href="#">Bemutatkozás</a></li>
77-
<li><a href="#">Kapcsolat</a></li>
78-
<li><a href="#">Szolgáltatások</a></li>
79-
<li><a href="#">Gyakori kérdések</a></li>
76+
<li><a href="#">{{ introductionMenu || 'Introduction' }}</a></li>
77+
<li><a href="#">{{ contactMenu || 'Contact' }}</a></li>
78+
<li><a href="#">{{ serviceMenu || 'Services' }}</a></li>
79+
<li><a href="#">{{ questionMenu || 'Frequently asked questions' }}</a></li>
8080
</ul>
8181
</footer>

0 commit comments

Comments
 (0)