diff --git a/pom.xml b/pom.xml index a8d33114..d91d8ef3 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.openconext teams - 9.2.0 + 9.3.0-SNAPSHOT pom teams diff --git a/teams-gui/pom.xml b/teams-gui/pom.xml index 88113652..a76241af 100644 --- a/teams-gui/pom.xml +++ b/teams-gui/pom.xml @@ -4,7 +4,7 @@ org.openconext teams - 9.2.0 + 9.3.0-SNAPSHOT ../pom.xml diff --git a/teams-gui/src/icons/no-entry-symbol-svgrepo-com.svg b/teams-gui/src/icons/no-entry-symbol-svgrepo-com.svg new file mode 100644 index 00000000..3ecf7d7c --- /dev/null +++ b/teams-gui/src/icons/no-entry-symbol-svgrepo-com.svg @@ -0,0 +1,15 @@ + + + + + + + + + + \ No newline at end of file diff --git a/teams-gui/src/locale/en.js b/teams-gui/src/locale/en.js index 95ce2568..9cfa5e99 100644 --- a/teams-gui/src/locale/en.js +++ b/teams-gui/src/locale/en.js @@ -373,7 +373,9 @@ I18n.translations.en = { urn: "Unspecified urn", schacHome: "SchacHome organization", email: "Email" - } + }, + migrationOn: "SURF is working on the migration from Teams to SURFconext Invite" + + " - please contact support if you want to make a new team." } }; diff --git a/teams-gui/src/locale/nl.js b/teams-gui/src/locale/nl.js index b320a722..ae8a2bec 100644 --- a/teams-gui/src/locale/nl.js +++ b/teams-gui/src/locale/nl.js @@ -373,10 +373,10 @@ I18n.translations.nl = { urn: "Unspecified urn", schacHome: "SchacHome organization", email: "Email" - } + }, + migrationOn: "SURF werkt aan de migratie van Teams naar SURFconext Invite" + + " - neem contact op als je een nieuw team wilt maken" } - - }; export default I18n.translations.nl; diff --git a/teams-gui/src/pages/NewTeam.js b/teams-gui/src/pages/NewTeam.js index de7fa564..c5d91d6d 100644 --- a/teams-gui/src/pages/NewTeam.js +++ b/teams-gui/src/pages/NewTeam.js @@ -11,6 +11,7 @@ import TooltipIcon from "../components/Tooltip"; import InputField from "../components/InputField"; import ErrorIndicator from "../components/ErrorIndicator"; import {isEmpty, stopEvent} from "../utils/utils"; +import {ReactComponent as StopIcon} from "../icons/no-entry-symbol-svgrepo-com.svg"; import {ReactComponent as privateTeam} from "../icons/allowances-no-talking.svg"; import {ReactComponent as publicTeam} from "../icons/human-resources-offer-employee-1.svg"; import {ButtonContainer} from "../components/ButtonContainer"; @@ -94,121 +95,138 @@ const NewTeam = ({user}) => { } breadCrumbs.push({name: I18n.t(`breadcrumbs.${team.id ? "editTeam" : "newTeam"}`, {name: ""})}); - return ( - <> - - - - -

{I18n.t(`breadcrumbs.${team.id ? "editTeam" : "newTeam"}`, {name: team.name})}

-
- -
- { - setTeam({...team, name: e.target.value.replace(/[^\w\s-]/gi, "")}); - setNameExists(false) - }} - toolTip={team.id ? I18n.t("newTeam.tooltips.immutableName") : ""} - aria-describedby={"team-name"} - disabled={team.id} - placeholder={I18n.t("newTeam.placeholders.name")} - onBlur={e => teamExistsByName(e.target.value).then(exists => setNameExists(exists))} - error={nameExist || (!initial && isEmpty(team.name))} - name={I18n.t("newTeam.name")}/> - {(!initial && isEmpty(team.name)) && + const renderInviteMigration = () => { + return ( +
+
+ + +
+
+ ); + } + + const renderTeamForm = () => { + return ( + + { + setTeam({...team, name: e.target.value.replace(/[^\w\s-]/gi, "")}); + setNameExists(false) + }} + toolTip={team.id ? I18n.t("newTeam.tooltips.immutableName") : ""} + aria-describedby={"team-name"} + disabled={team.id} + placeholder={I18n.t("newTeam.placeholders.name")} + onBlur={e => teamExistsByName(e.target.value).then(exists => setNameExists(exists))} + error={nameExist || (!initial && isEmpty(team.name))} + name={I18n.t("newTeam.name")}/> + {(!initial && isEmpty(team.name)) && } - {nameExist && + {nameExist && } -
- - setTeam({...team, description: val})}/> -
- - { - setTeam({...team, personalNote: e.target.value}); - }} - placeholder={I18n.t("teamDetails.personalNotesPlaceholder")} - multiline={true} - toolTip={I18n.t("newTeam.tooltips.personalNote")} - name={I18n.t("newTeam.personalNote")}/> - -
- setTeam({...team, publicLinkDisabled: !team.publicLinkDisabled})} - readOnly={!team.viewable} - info={I18n.t("newTeam.publicLinkDisabled")} - toolTip={I18n.t("newTeam.tooltips.publicLinkDisabled")} - value={!team.publicLinkDisabled}/> -
- -
- setTeam({...team, hideMembers: !team.hideMembers})} - info={I18n.t("newTeam.hideMembers")} - toolTip={I18n.t("newTeam.tooltips.hideMembers")} - value={team.hideMembers || false}/> +
+ + setTeam({...team, description: val})}/> +
+ + { + setTeam({...team, personalNote: e.target.value}); + }} + placeholder={I18n.t("teamDetails.personalNotesPlaceholder")} + multiline={true} + toolTip={I18n.t("newTeam.tooltips.personalNote")} + name={I18n.t("newTeam.personalNote")}/> + +
+ setTeam({...team, publicLinkDisabled: !team.publicLinkDisabled})} + readOnly={!team.viewable} + info={I18n.t("newTeam.publicLinkDisabled")} + toolTip={I18n.t("newTeam.tooltips.publicLinkDisabled")} + value={!team.publicLinkDisabled}/> +
+ +
+ setTeam({...team, hideMembers: !team.hideMembers})} + info={I18n.t("newTeam.hideMembers")} + toolTip={I18n.t("newTeam.tooltips.hideMembers")} + value={team.hideMembers || false}/> +
+ +
+ +
+ {visibilities.map((visibility, i) => + )}
+
+ {!team.id && } + + {!team.id && { + setTeam({...team, invitationMessage: e.target.value}); + }} + id={"invitation-messsage"} + multiline={true} + placeholder={I18n.t("newTeam.placeholders.invitationMessage")} + name={I18n.t("newTeam.invitationMessage")}/>} + + + )} -
- - {!team.id && } - - {!team.id && { - setTeam({...team, invitationMessage: e.target.value}); - }} - id={"invitation-messsage"} - multiline={true} - placeholder={I18n.t("newTeam.placeholders.invitationMessage")} - name={I18n.t("newTeam.invitationMessage")}/>} - - -