Skip to content

Commit

Permalink
feat(3636): track reasons for choosing cloud provider
Browse files Browse the repository at this point in the history
  • Loading branch information
golebu2020 committed Sep 27, 2024
1 parent dcb1a18 commit 7bac5ac
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 10 deletions.
15 changes: 6 additions & 9 deletions app/components/billing/PublicCloudBillingInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,12 @@ export default function PublicCloudBillingInfo({
product,
className,
}: {
product: Omit<
Product & {
_permissions?: {
signMou: boolean;
reviewMou: boolean;
};
},
'providerSelectionReasons' | 'providerSelectionReasonsNote'
>;
product: Product & {
_permissions?: {
signMou: boolean;
reviewMou: boolean;
};
};
className?: string;
}) {
const { data: session } = useSession();
Expand Down
2 changes: 1 addition & 1 deletion app/components/billing/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ export type Product = Omit<
};
};
}>,
'updatedAt' | 'providerSelectionReasons' | 'providerSelectionReasonsNote'
'updatedAt'
>;
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
export const up = async (db, client) => {
await Promise.all([
db
.collection('PublicCloudRequestedProject')
.updateMany(
{ $or: [{ providerSelectionReasonsNote: null }, { providerSelectionReasonsNote: { $exists: false } }] },
{ $set: { providerSelectionReasonsNote: '' } },
),
db
.collection('PublicCloudProject')
.updateMany(
{ $or: [{ providerSelectionReasonsNote: null }, { providerSelectionReasonsNote: { $exists: false } }] },
{ $set: { providerSelectionReasonsNote: '' } },
),
]);
};

export const down = async (db, client) => {};

0 comments on commit 7bac5ac

Please sign in to comment.