Skip to content
Merged

Staging #1463

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions next/components/organisms/TablePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -469,8 +469,7 @@ export default function TablePage({ id, isBDSudo, changeTab, datasetName }) {
}
</Stack>

{/* FEAT: Notificação de tabela */}
{/* {!tableNotificationIsHidden &&
{!tableNotificationIsHidden &&
<Tooltip
label={tableNotificationStatus ? t('table.tooltipDisableNotification') : t('table.tooltipEnableNotification')}
hasArrow
Expand Down Expand Up @@ -520,7 +519,7 @@ export default function TablePage({ id, isBDSudo, changeTab, datasetName }) {
</Button>
</Box>
</Tooltip>
} */}
}
</StackSkeleton>

<SkeletonText
Expand Down
65 changes: 61 additions & 4 deletions next/components/organisms/componentsUserPage/Account.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export default function Account({ userInfo }) {
const eraseModalAccount = useDisclosure();
const sucessEraseModalAccount = useDisclosure();
const errorEraseModalAccount = useDisclosure();
const disableNotificationsModal = useDisclosure();
const [isLoading, setIsLoading] = useState(false);
const [hasCancelSubscription, setHasCancelSubscription] = useState(false);
const [hasMembers, setHasMembers] = useState(false);
Expand Down Expand Up @@ -144,6 +145,7 @@ export default function Account({ userInfo }) {

async function handleDisableAllNotifications() {
setIsLoading(true)
disableNotificationsModal.onClose()
const reg = new RegExp("(?<=:).*")
const [ id ] = reg.exec(userInfo?.id)

Expand Down Expand Up @@ -421,6 +423,62 @@ export default function Account({ userInfo }) {
</Stack>
</ModalGeneral>

<ModalGeneral
isOpen={disableNotificationsModal.isOpen}
onClose={disableNotificationsModal.onClose}
propsModalContent={{minWidth: {base: "", lg: "800px !important"}}}
>
<Stack spacing={0} marginBottom="16px">
<TitleText marginRight="20px">{t('username.confirmDisableNotificationsTitle')}</TitleText>
<ModalCloseButton
fontSize="14px"
top="34px"
right="26px"
_hover={{backgroundColor: "transparent", opacity: 0.7}}
onClick={() => disableNotificationsModal.onClose()}
/>
</Stack>

<Stack spacing="24px" marginBottom="16px">
<ExtraInfoTextForm>
{t('username.confirmDisableNotificationsDescription')}
</ExtraInfoTextForm>
</Stack>

<Stack
flexDirection={{base: "column-reverse", lg: "row"}}
spacing={0}
gap="16px"
width={{base:"100%", lg: "fit-content"}}
>
<Button
width="100%"
border="1px solid #BF3434"
color="#BF3434"
backgroundColor="#fff"
_hover={{
color: "#992A2A",
borderColor: "#992A2A"
}}
onClick={() => disableNotificationsModal.onClose()}
>
{t('username.cancel')}
</Button>

<Button
width="100%"
backgroundColor="#BF3434"
_hover={{
backgroundColor: "#992A2A",
}}
onClick={() => handleDisableAllNotifications()}
isLoading={isLoading}
>
{t('username.confirmDisableNotificationsConfirmButton')}
</Button>
</Stack>
</ModalGeneral>

<Box marginTop="0 !important">
<TitleTextForm>{t('username.username')}</TitleTextForm>
<ExtraInfoTextForm>{userInfo.username}</ExtraInfoTextForm>
Expand All @@ -430,15 +488,14 @@ export default function Account({ userInfo }) {
>{t('username.changeUsername')}</Button>
</Box>

{/* FEAT: Notificação de tabela */}
{/* <Box>
<Box>
<TitleTextForm>{t('username.disableAllNotifications')}</TitleTextForm>
<ExtraInfoTextForm>{t('username.disableNotificationsInfo')}</ExtraInfoTextForm>
<Button
isVariant
onClick={() => handleDisableAllNotifications()}
onClick={() => disableNotificationsModal.onOpen()}
>{t('username.disableNotificationsButton')}</Button>
</Box> */}
</Box>

<Box>
<TitleTextForm>{t('username.exportAccountData')}</TitleTextForm>
Expand Down
16 changes: 9 additions & 7 deletions next/components/organisms/componentsUserPage/PlansAndPayment.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ export default function PlansAndPayment ({ userData }) {
{name: t('username.dozensOfHighFrequencyDatasets')},
{name: t('username.companyReferenceTable')},
{name: t('username.downloadLimit1GB'), tooltip: t('username.downloadLimit1GBTooltip')},
{name: t('username.selectedTableNotifications')}
]
},
"bd_pro_empresas" : {
Expand Down Expand Up @@ -1119,7 +1120,8 @@ export default function PlansAndPayment ({ userData }) {
resources={[
{name: t('username.dozensOfHighFrequencyDatasets')},
{name: t('username.companyReferenceTable')},
{name: t('username.downloadLimit1GB'), tooltip: t('username.downloadLimit1GBTooltip')}
{name: t('username.downloadLimit1GB'), tooltip: t('username.downloadLimit1GBTooltip')},
{name: t('username.selectedTableNotifications')}
]}
button={{
id: "bd_pro_button_sub_btn",
Expand Down Expand Up @@ -1332,7 +1334,7 @@ export default function PlansAndPayment ({ userData }) {

<Stack
spacing={0}
gap="64px"
gap={userData?.proSubscription === "bd_pro_empresas" ? {base: "0", lg: "64px"} : "64px"}
flexDirection={{base: "column", lg: "row"}}
>
<Stack minWidth="350px" spacing="8px">
Expand All @@ -1350,19 +1352,19 @@ export default function PlansAndPayment ({ userData }) {
return <ListFeature elm={elm} index={index} key={index}/>
})
}
</Stack>

<Stack spacing="8px">
{userData?.proSubscription === "bd_pro_empresas" &&
<>
<Stack spacing={0} gap="8px" marginTop={{base: "8px", lg: "36px"}}>
{resources["bd_pro"].resources.map((elm, index) => {
return <ListFeature elm={elm} index={index} key={index}/>
})}
{planResource.resources.map((elm, index) => {
return <ListFeature elm={elm} index={index} key={index}/>
})}
</>
</Stack>
}
</Stack>

<Stack spacing="8px">
{userData?.proSubscription !== "bd_pro_empresas" &&
<BodyText
typography="small"
Expand Down
3 changes: 2 additions & 1 deletion next/public/locales/en/prices.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
"features": [
"Dozens of updated high-frequency datasets",
"Company reference table with updated information",
"Direct download up to 1GB (80% of the platform's tables)"
"Direct download up to 1GB (80% of the platform's tables)",
"Selected table notifications"
]
},
"enterprise": {
Expand Down
6 changes: 5 additions & 1 deletion next/public/locales/en/user.json
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,11 @@
"noActiveNotifications": "There are no active notifications to disable.",
"changeBillingInformation": "Change billing information",
"changeBillingInformationInfo": "Learn more about how to change your billing information <1>here</1>.",
"changeBillingInformationButton": "Change billing information"
"changeBillingInformationButton": "Change billing information",
"confirmDisableNotificationsTitle": "Are you sure you want to disable all notifications?",
"confirmDisableNotificationsDescription": "By clicking \"Disable\", you will no longer receive alerts about updates on all tables you currently follow.",
"confirmDisableNotificationsConfirmButton": "Disable",
"selectedTableNotifications": "Selected table notifications"
},
"activate": {
"accountActive": "Active account",
Expand Down
3 changes: 2 additions & 1 deletion next/public/locales/es/prices.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
"features": [
"Decenas de bases de alta frecuencia actualizadas",
"Tabla de referencia de empresas con información actualizada",
"Descarga directa hasta 1GB (80% de las tablas de la plataforma)"
"Descarga directa hasta 1GB (80% de las tablas de la plataforma)",
"Notificaciones de actualización de tabla"
]
},
"enterprise": {
Expand Down
6 changes: 5 additions & 1 deletion next/public/locales/es/user.json
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,11 @@
"noActiveNotifications": "No hay notificaciones activas para desactivar.",
"changeBillingInformation": "Cambiar información de facturación",
"changeBillingInformationInfo": "Obtenga más información sobre cómo cambiar su información de facturación <1>aquí</1>.",
"changeBillingInformationButton": "Cambiar información de facturación"
"changeBillingInformationButton": "Cambiar información de facturación",
"confirmDisableNotificationsTitle": "¿Está seguro de que desea desactivar todas las notificaciones?",
"confirmDisableNotificationsDescription": "Al hacer clic en \"Desactivar\", dejará de recibir alertas sobre actualizaciones en todas las tablas que sigue actualmente.",
"confirmDisableNotificationsConfirmButton": "Desactivar",
"selectedTableNotifications": "Notificaciones de actualización de tabla"
},
"activate": {
"accountActive": "Cuenta activa",
Expand Down
3 changes: 2 additions & 1 deletion next/public/locales/pt/prices.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
"features": [
"Dezenas de bases de alta frequência atualizadas",
"Tabela de referência de empresas com informações atualizadas",
"Download direto até 1GB (80% das tabelas da plataforma)"
"Download direto até 1GB (80% das tabelas da plataforma)",
"Notificações de atualização de tabela"
]
},
"enterprise": {
Expand Down
6 changes: 5 additions & 1 deletion next/public/locales/pt/user.json
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,11 @@
"noActiveNotifications": "Não há notificações ativas para desativar.",
"changeBillingInformation": "Alterar dados de faturamento",
"changeBillingInformationInfo": "Saiba mais sobre como alterar os dados de faturamento <1>aqui</1>.",
"changeBillingInformationButton": "Alterar dados de faturamento"
"changeBillingInformationButton": "Alterar dados de faturamento",
"confirmDisableNotificationsTitle": "Tem certeza que deseja desativar todas as notificações?",
"confirmDisableNotificationsDescription": "Ao clicar em \"Desativar\", você deixará de receber alertas sobre atualizações em todas as tabelas que segue atualmente.",
"confirmDisableNotificationsConfirmButton": "Desativar",
"selectedTableNotifications": "Notificações de atualização de tabela"
},
"activate": {
"accountActive": "Conta ativa",
Expand Down
Loading