Skip to content
This repository has been archived by the owner on Feb 5, 2024. It is now read-only.

Commit

Permalink
Auto formatted code
Browse files Browse the repository at this point in the history
  • Loading branch information
emneirin authored and actions-user committed May 21, 2023
1 parent 20a7e3b commit 52f893c
Showing 1 changed file with 20 additions and 24 deletions.
44 changes: 20 additions & 24 deletions frontend/pages/admin/communication.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
import AdminHeader from "@/components/header/adminHeader";
import {EmailTemplate, getAllEmailTemplates} from "@/lib/email-template";
import {ChangeEvent, useEffect, useState} from "react";
import {Button, Col, Container, Form, Row} from "react-bootstrap";
import { EmailTemplate, getAllEmailTemplates } from "@/lib/email-template";
import { ChangeEvent, useEffect, useState } from "react";
import { Button, Col, Container, Form, Row } from "react-bootstrap";
import TemplateAutocomplete from "@/components/autocompleteComponents/templateAutocomplete";
import {BuildingInterface, getAllBuildings} from "@/lib/building";
import {getAllUsers, User} from "@/lib/user";
import { BuildingInterface, getAllBuildings } from "@/lib/building";
import { getAllUsers, User } from "@/lib/user";
import UserAutoComplete from "@/components/autocompleteComponents/userAutocomplete";
import {useRouter} from "next/router";
import {withAuthorisation} from "@/components/withAuthorisation";
import {Send} from "@mui/icons-material";
import {handleError} from "@/lib/error";
import { useRouter } from "next/router";
import { withAuthorisation } from "@/components/withAuthorisation";
import { Send } from "@mui/icons-material";
import { handleError } from "@/lib/error";

interface ParsedUrlQuery {
}
interface ParsedUrlQuery {}

interface DataCommunicationQuery extends ParsedUrlQuery {
template?: number;
Expand Down Expand Up @@ -55,7 +54,7 @@ function AdminCommunication() {
async function routeToBuildings(syndicId: number) {
await router.push({
pathname: `data/buildings/`,
query: {syndic: selectedUser?.email},
query: { syndic: selectedUser?.email },
});
}

Expand Down Expand Up @@ -130,11 +129,11 @@ function AdminCommunication() {

return (
<>
<AdminHeader/>
<AdminHeader />
<Container>
<p className="title">Communicatie extern</p>
<div>
<Row style={{paddingBottom: '20px'}}>
<Row style={{ paddingBottom: "20px" }}>
<Col sm={12} md={4}>
<div>
<TemplateAutocomplete
Expand All @@ -146,17 +145,13 @@ function AdminCommunication() {
</Col>
<Col sm={12} md={4}>
<div>
<UserAutoComplete
initialId={userId}
setObjectId={setUserId}
required={false}
/>
<UserAutoComplete initialId={userId} setObjectId={setUserId} required={false} />
</div>
</Col>
<Col style={{display: 'flex', alignItems: 'end', justifyContent: 'end'}}>
<Col style={{ display: "flex", alignItems: "end", justifyContent: "end" }}>
<div className="padding">
<Button
style={{height: '50px'}}
style={{ height: "50px" }}
className="button"
onClick={() => {
if (userId) {
Expand Down Expand Up @@ -190,7 +185,9 @@ function AdminCommunication() {
<Col>
<div className="padding mt-auto">
<Button
href={`mailto:${getSelectedUserMail()}?body=${encodeURIComponent(updatedTemplateText)}`}
href={`mailto:${getSelectedUserMail()}?body=${encodeURIComponent(
updatedTemplateText
)}`}
className="wide_button"
size="lg"
style={{
Expand All @@ -199,12 +196,11 @@ function AdminCommunication() {
}}
>
Verstuur mail
<Send style={{height: "10px", paddingLeft: "10px", marginRight: "0.5em"}}/>
<Send style={{ height: "10px", paddingLeft: "10px", marginRight: "0.5em" }} />
</Button>
</div>
</Col>
</Row>

</div>
</Container>
</>
Expand Down

0 comments on commit 52f893c

Please sign in to comment.