From bdf90c1f79ac7616a0211e7ad7ffbeaef22cc771 Mon Sep 17 00:00:00 2001 From: jfrye122 Date: Wed, 12 Apr 2023 12:04:23 -0400 Subject: [PATCH] added tech signin screen --- .../screen-tech-sign-in.component.jsx | 80 +++++++++++++++++++ translations/en-US/common.json | 34 ++++++++ translations/es-MX/common.json | 13 +++ translations/fr-CA/common.json | 13 +++ 4 files changed, 140 insertions(+) create mode 100644 components/screen-tech-sign-in/screen-tech-sign-in.component.jsx diff --git a/components/screen-tech-sign-in/screen-tech-sign-in.component.jsx b/components/screen-tech-sign-in/screen-tech-sign-in.component.jsx new file mode 100644 index 0000000..6c257db --- /dev/null +++ b/components/screen-tech-sign-in/screen-tech-sign-in.component.jsx @@ -0,0 +1,80 @@ +import { Formik } from "formik"; +import React from "react"; +import { View, StyleSheet, Text } from "react-native"; +import { Button, TextInput } from "react-native-paper"; +import { useTranslation } from "react-i18next"; + +import { connect } from "react-redux"; + +//TODO JF add props +const mapStateToProps = (state) => ({}); + +//TODO JF add prop functions to call dispatch with actions +const mapDispatchToProps = {}; + +export function TechSignIn({ employeeSignInStart, employeeSigningIn }) { + const { t } = useTranslation(); + +//TODO add call to dispatch action + const formSubmit = (values) => { + const { employeeId, pin } = values; + // techSignInStart(employeeId, pin); + }; + + return ( + + + + {({ handleChange, handleBlur, handleSubmit, values }) => ( + + + + + + )} + + + + ); +} + +const localStyles = StyleSheet.create({ + content: { + display: "flex", + flex: 1, + }, + signInContainer: { + flex: 1, + }, + input: { + margin: 12, + }, +}); + +export default connect(mapStateToProps, mapDispatchToProps)(TechSignIn); diff --git a/translations/en-US/common.json b/translations/en-US/common.json index 153ab06..0d0fc62 100644 --- a/translations/en-US/common.json +++ b/translations/en-US/common.json @@ -305,6 +305,40 @@ "email": "Email", "password": "Password" } + }, + "techsignin": { + "actions": { + "techsignin": "Sign In" + }, + "errors": { + "employeeidnotfound": "No employee ID found.", + "wrongpin": "The pin you entered is not correct." + }, + "fields": { + "employeeid": "EmployeeID", + "pin": "PIN" + }, + "titles": { + "signin": "Tech Sign In" + } + }, + "timeticketbrowser": { + "actions": { + "refresh": "Refresh", + "upload": "Upload", + "activetickets": "Time Tickets", + "detail": "Time Ticket Details", + "notickets": "There are no active tickets." + }, + "labels": { + "converting": "Converting", + "selectjob": "--- Select a ticket ---", + "selectticketassetselector": "Please select a ticket to update. ", + "uploading": "Uploading" + }, + "titles": { + "timeticketbrowsertab": "Time Tickets" + } } } } diff --git a/translations/es-MX/common.json b/translations/es-MX/common.json index f4a1a3f..f883e6f 100644 --- a/translations/es-MX/common.json +++ b/translations/es-MX/common.json @@ -305,6 +305,19 @@ "email": "Email", "password": "" } + }, + "techsignin": { + "actions": { + "techsignin": "" + }, + "errors": { + "employeeidnotfound": "", + "wrongpin": "" + }, + "fields": { + "employeeid": "", + "pin": "" + } } } } diff --git a/translations/fr-CA/common.json b/translations/fr-CA/common.json index 54de618..30b1675 100644 --- a/translations/fr-CA/common.json +++ b/translations/fr-CA/common.json @@ -305,6 +305,19 @@ "email": "Email", "password": "" } + }, + "techsignin": { + "actions": { + "techsignin": "" + }, + "errors": { + "employeeidnotfound": "", + "wrongpin": "" + }, + "fields": { + "employeeid": "", + "pin": "" + } } } }