From 657c10299997ac8b4a2e50a49dca5a3bac59cf17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Ch=C3=A1vez?= Date: Wed, 18 Oct 2023 19:27:17 -0600 Subject: [PATCH 001/113] check if principal's email is public --- src/pages/TeachersUnite/IntroSchoolPrincipalPage.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pages/TeachersUnite/IntroSchoolPrincipalPage.js b/src/pages/TeachersUnite/IntroSchoolPrincipalPage.js index 207ff0664053..91f24721f6d2 100644 --- a/src/pages/TeachersUnite/IntroSchoolPrincipalPage.js +++ b/src/pages/TeachersUnite/IntroSchoolPrincipalPage.js @@ -19,6 +19,7 @@ import Navigation from '../../libs/Navigation/Navigation'; import TeachersUnite from '../../libs/actions/TeachersUnite'; import useLocalize from '../../hooks/useLocalize'; import * as ValidationUtils from '../../libs/ValidationUtils'; +import * as LoginUtils from '../../libs/LoginUtils'; const propTypes = { /** Login list for the user that is signed in */ @@ -74,6 +75,9 @@ function IntroSchoolPrincipalPage(props) { if (!_.isEmpty(values.partnerUserID) && !Str.isValidEmail(values.partnerUserID)) { ErrorUtils.addErrorMessage(errors, 'partnerUserID', translate('teachersUnitePage.error.enterValidEmail')); } + if (!_.isEmpty(values.partnerUserID) && LoginUtils.isEmailPublicDomain(values.partnerUserID)) { + ErrorUtils.addErrorMessage(errors, 'partnerUserID', translate('teachersUnitePage.error.tryDifferentEmail')); + } return errors; }, From eab7290bbee8c7626fe0e087f51f23964f2d1569 Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Fri, 20 Oct 2023 11:36:58 +0700 Subject: [PATCH 002/113] add new blocking view for new room page --- src/languages/en.ts | 2 + src/languages/es.ts | 2 + src/libs/Permissions.ts | 1 + src/pages/workspace/WorkspaceNewRoomPage.js | 156 +++++++++++--------- 4 files changed, 95 insertions(+), 66 deletions(-) diff --git a/src/languages/en.ts b/src/languages/en.ts index 11637846130a..f352e4aa3d08 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -1422,6 +1422,8 @@ export default { companyCards: 'Company credit cards', reimbursements: 'Easy reimbursements', }, + notFound: 'No workspace found', + description: 'Rooms are a great place to discuss and work with multiple people. To message a room, create or join a workspace' }, new: { newWorkspace: 'New workspace', diff --git a/src/languages/es.ts b/src/languages/es.ts index e4a5c37241f2..14b99ce92b76 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -1443,6 +1443,8 @@ export default { companyCards: 'Tarjetas de crédito corporativas', reimbursements: 'Reembolsos fáciles', }, + notFound: 'No se encontró ningún espacio de trabajo', + description: 'Las salas son un gran lugar para discutir y trabajar con varias personas. Para enviar mensajes a una sala, crear o unirse a un espacio de trabajo' }, new: { newWorkspace: 'Nuevo espacio de trabajo', diff --git a/src/libs/Permissions.ts b/src/libs/Permissions.ts index 13489c396c3c..fe06ebb77e0c 100644 --- a/src/libs/Permissions.ts +++ b/src/libs/Permissions.ts @@ -2,6 +2,7 @@ import CONST from '../CONST'; import Beta from '../types/onyx/Beta'; function canUseAllBetas(betas: Beta[]): boolean { + return true; return betas?.includes(CONST.BETAS.ALL); } diff --git a/src/pages/workspace/WorkspaceNewRoomPage.js b/src/pages/workspace/WorkspaceNewRoomPage.js index da0bf845cc81..54ad2babb187 100644 --- a/src/pages/workspace/WorkspaceNewRoomPage.js +++ b/src/pages/workspace/WorkspaceNewRoomPage.js @@ -27,6 +27,11 @@ import compose from '../../libs/compose'; import variables from '../../styles/variables'; import useDelayedInputFocus from '../../hooks/useDelayedInputFocus'; import ValuePicker from '../../components/ValuePicker'; +import BlockingView from '../../components/BlockingViews/BlockingView'; +import * as Illustrations from '../../components/Icon/Illustrations'; +import Button from '../../components/Button'; +import Navigation from '../../libs/Navigation/Navigation'; +import ROUTES from '../../ROUTES'; const propTypes = { /** All reports shared with the user */ @@ -162,7 +167,7 @@ function WorkspaceNewRoomPage(props) { return ( App.createWorkspaceAndNavigateToIt('', false, '', false, false)} @@ -175,75 +180,94 @@ function WorkspaceNewRoomPage(props) { testID={WorkspaceNewRoomPage.displayName} > {({insets}) => ( - -
- - (roomNameInputRef.current = el)} - inputID="roomName" - isFocused={props.isFocused} - shouldDelayFocus - autoFocus - /> - - - - - - - - {isPolicyAdmin && ( - + + + (roomNameInputRef.current = el)} + inputID="roomName" + isFocused={props.isFocused} + shouldDelayFocus + autoFocus + /> + + + + + + + + {isPolicyAdmin && ( + + + + )} + - )} - - - - {visibilityDescription} - -
+ {visibilityDescription} + + + ) : ( + <> + +