-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: get full access popup & customer PUT endpoint (BAL-3495) (#3025)
- Loading branch information
Showing
8 changed files
with
528 additions
and
7 deletions.
There are no files selected for viewing
361 changes: 361 additions & 0 deletions
361
apps/backoffice-v2/src/common/components/molecules/GetFullAccessCard/DataListImage.tsx
Large diffs are not rendered by default.
Oops, something went wrong.
71 changes: 71 additions & 0 deletions
71
apps/backoffice-v2/src/common/components/molecules/GetFullAccessCard/GetFullAccessCard.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import { ctw } from '@ballerine/ui'; | ||
import { ArrowRightIcon, CrownIcon, XIcon } from 'lucide-react'; | ||
import { useState } from 'react'; | ||
|
||
import { env } from '@/common/env/env'; | ||
import { useCustomerQuery } from '@/domains/customer/hooks/queries/useCustomerQuery/useCustomerQuery'; | ||
import { Button } from '../../atoms/Button/Button'; | ||
import { DataListImage } from './DataListImage'; | ||
|
||
export const GetFullAccessCard = () => { | ||
const [isHidden, setIsHidden] = useState(false); | ||
|
||
const { data: customer, isLoading } = useCustomerQuery(); | ||
|
||
if ( | ||
env.VITE_ENVIRONMENT_NAME === 'production' || | ||
isLoading || | ||
!customer?.config?.showFullAccessPopup | ||
) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<div | ||
className={ctw( | ||
'fixed bottom-8 right-8 flex max-w-lg flex-nowrap items-center justify-between gap-2 rounded-md border border-purple-500 bg-white px-6 py-4', | ||
isHidden && 'hidden', | ||
)} | ||
style={{ | ||
boxShadow: 'inset 0 24px 12px rgba(247, 241, 250, 1), 0 2px 6px rgba(208, 161, 255, 0.7)', | ||
}} | ||
> | ||
<div className="shrink-0 basis-7/12 space-y-4"> | ||
<div className="flex items-center gap-2"> | ||
<CrownIcon className="rounded-full bg-purple-200 p-[6px] font-bold text-purple-700 d-7" /> | ||
<span className="text-lg font-medium">Get Full Access</span> | ||
</div> | ||
|
||
<p className="leading-relaxed"> | ||
Unlock additional features and continue effective risk management with Ballerine. | ||
</p> | ||
|
||
<Button | ||
asChild | ||
variant="link" | ||
className="h-6 justify-start space-x-2 p-0 text-base text-blue-500" | ||
> | ||
<a | ||
href="https://calendly.com/d/cp53-ryw-4s3/ballerine-intro" | ||
target="_blank" | ||
rel="noreferrer" | ||
> | ||
<span>Talk to us</span> | ||
<ArrowRightIcon className="d-4" /> | ||
</a> | ||
</Button> | ||
</div> | ||
|
||
<div className="h-full grow-0 basis-5/12"> | ||
<DataListImage className="h-full" /> | ||
</div> | ||
|
||
<button | ||
onClick={() => setIsHidden(true)} | ||
className="absolute right-2 top-2 p-2 text-purple-400 transition-colors hover:text-purple-600" | ||
> | ||
<XIcon className="d-4" /> | ||
</button> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
services/workflows-service/src/customer/dtos/customer-update.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import { ApiProperty } from '@nestjs/swagger'; | ||
import { IsObject, IsOptional, IsString } from 'class-validator'; | ||
import { CustomerStatuses } from '@prisma/client'; | ||
|
||
export class CustomerUpdateDto { | ||
@ApiProperty({ type: String }) | ||
@IsString() | ||
@IsOptional() | ||
name?: string; | ||
|
||
@ApiProperty({ type: String }) | ||
@IsString() | ||
@IsOptional() | ||
displayName?: string; | ||
|
||
@ApiProperty({ type: String }) | ||
@IsString() | ||
@IsOptional() | ||
customerStatus?: CustomerStatuses; | ||
|
||
@ApiProperty({ type: String }) | ||
@IsString() | ||
@IsOptional() | ||
logoImageUri?: string; | ||
|
||
@ApiProperty({ type: String }) | ||
@IsString() | ||
@IsOptional() | ||
faviconImageUri?: string; | ||
|
||
@ApiProperty({ type: String }) | ||
@IsString() | ||
@IsOptional() | ||
language?: string; | ||
|
||
@ApiProperty({ type: String }) | ||
@IsString() | ||
@IsOptional() | ||
country?: string; | ||
|
||
@ApiProperty({ type: String }) | ||
@IsString() | ||
@IsOptional() | ||
projectName?: string; | ||
|
||
@ApiProperty({ type: String }) | ||
@IsString() | ||
@IsOptional() | ||
websiteUrl?: string; | ||
|
||
@ApiProperty({ required: false, type: 'object' }) | ||
@IsObject() | ||
@IsOptional() | ||
config?: Record<string, unknown>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters