Commit 60efbfdc authored by Micha Lutz's avatar Micha Lutz

pretty UI

parent 3cb7ca54
......@@ -104,27 +104,12 @@ const App = () => {
// component function to return an application as a card
const ApplicationCard = ({ application }) => {
const applicants = application.applicants
.map(
(applicant) =>
applicant.identityInfo.givenName +
" " +
applicant.identityInfo.familyName +
", " +
applicant.identityInfo.placeOfResidence.street +
", " +
applicant.identityInfo.placeOfResidence.postalCode +
", " +
applicant.identityInfo.placeOfResidence.city
)
.map((applicant) => applicant.identityInfo.givenName + " " + applicant.identityInfo.familyName)
.join("; ");
// TODO: allow displaying of all docs, not just the first one
return (
<Card>
<CardContent>
Subject: {application.additionalReferenceInfo.subject}
<br />
CaseId: {application.additionalReferenceInfo.caseId}
<br />
Service: {application.publicServiceType.name}
<br />
LeikaId: {application.publicServiceType.leikaId}
......@@ -145,12 +130,19 @@ const App = () => {
// finally return our JSX
return (
<Container maxWidth="sm">
<Container maxWidth="sm" style={{ fontFamily: "Roboto, Helvetica, Arial, sans-serif" }}>
<Grid container style={{ marginBottom: "30px" }}>
{destination.destinationId && (
<header>
<header style={{ width: "100%" }}>
<h1>{destination.organizationName}</h1>
<span style={{ color: "gray", size: "0.7rem" }}>My Destination ID: {destination.destinationId}</span>
<Grid container alignItems="center" style={{ color: "gray", fontSize: "0.8em" }}>
<Grid item xs={3}>
My Destination ID:
</Grid>
<Grid item xs={9}>
{destination.destinationId}
</Grid>
</Grid>
</header>
)}
</Grid>
......
import axios from "axios";
import config from "./config";
//import { getApplicationsResponseSample, getApplicationDataSample } from "./samples";
// function to initially request an access token from SubscriberAPI and save it in state variable
export const getAccessToken = async () => {
......@@ -65,7 +64,6 @@ export const createNewDestination = async (accessToken) => {
// handle function to request all applications from SubscriberAPI and save them in state variable
export const getApplications = async (destinationId, accessToken) => {
try {
//return getApplicationsResponseSample;
const response = await axios.get(
"https://subscriber.fiep-poc.de/beta5/" +
config.subscriberId +
......@@ -86,7 +84,6 @@ export const getApplications = async (destinationId, accessToken) => {
// handle function to request data of an application and display it in a modal
export const getApplicationData = async (applicationId, destinationId, accessToken) => {
try {
//return getApplicationDataSample;
const response = await axios.get(
"https://subscriber.fiep-poc.de/beta5/" +
config.subscriberId +
......
export const getApplicationsResponseSample = [
{
additionalReferenceInfo: {
subject: "Anmeldung eines Gewerbes in Musterstadt",
caseId: "DF/8923",
},
contentStructure: {
data: {
schema: {
mimeType: "json",
schemaSource: "none",
},
},
docs: [
{
docId: "1",
purpose: "form",
size: 13046,
mimeType: "application/pdf",
filename: "test.pdf",
description: "Das Antragsformular",
lang: {
lang: "de",
region: "DE",
},
hash: {
algorithm: "SHA-256",
digest: "bf37d894fdf9aeade63975ed648d49c3e8a7a773923597d2418915f54cd7c3b9",
},
},
],
},
publicServiceType: {
name: "Gewerbeanmeldung",
description: "Eine Gewerbeanmeldung ist immer dann notwendig, wenn Sie einen stehenden Gewerbebetrieb beginnen.",
leikaId: "99050012104000",
otherIdentifiers: [
{
id: "8664844",
schemeId: "service.niedersachsen.de",
schemeName: "Serviceportal Niedersachsen",
},
{
id: "354824",
schemeId: "buerger.thueringen.de",
schemeName: "Zuständigkeitsfinder Thüringen",
},
],
},
applicants: [
{
type: "person",
authentificationInfo: {
assuranceLevel: "high",
authentificationMethod: "eID",
timestamp: "2020-03-03T12:38:23Z",
},
identityInfo: {
dateOfBirth: "1970-09-13",
gender: "m",
givenName: "WERNER",
familyName: "MUSTERMANN",
placeOfResidence: {
type: "national",
street: "KURZER WEG 7",
postalCode: "12345",
city: "ANKH-MORPORK",
},
},
contactInfo: {
electronicAddresses: [
{
channelType: "Service-Account-Mailbox",
address: "3b0c9c8c-0801-45f0-a331-2abfc9db78d0",
},
],
physicalAddress: {
type: "national",
street: "Kurzer Weg",
houseNumber: "7",
postalCode: "12345",
city: "Ankh-Morpork",
},
telephone: [
{
number: "+49 89 32168-42",
mobile: true,
description: "work",
},
],
},
},
],
paymentInfo: {
reference: "TP/93/GDP",
usage: "Gewerbeanmeldung",
amount: 17.3,
timestamp: "2020-03-03T12:38:23Z",
status: "success",
transaction: "1f77c5f9b759db9cdce59988b24974d465c7be5e462a6185485559ff6e2dea82",
},
applicationId: "0c508e3f-2353-4206-9a1e-34b2e864d5a8",
},
];
export const getApplicationDataSample = {
F99000001: "string",
G99000001: {
F99000002: "string",
F99000003: 42,
},
G99000002: [
{
F99000004: true,
G99000001: {
F99000002: "string",
F99000003: 17,
},
},
{
F99000004: true,
G99000001: {
F99000002: "string",
F99000003: 24,
},
},
],
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment