chore: recategorize apps (#9306)

* Remove unused code in InstalledAppsLayout

* Add new app categories "crm", "conferencing" and "messaging"

* Sort getAppCategories entries alphabetically

* Fix 404s on new category pages (and remove hardcoded category lists)

* Fix admin apps list not showing "no available apps" for new categories

* Recategorise apps

* Sync seed-app-store categories with config files

* Replace unnecessary seed-app-store.config.json with appStoreMetadata

* Copy video.svg to conferencing.svg

* Add messaging.svg

* Remove web3 from getAppCategories (used by installed apps, admin apps)

* Fix app-store-cli categories

- Add conferencing
- Add CRM
- Remove video
- Remove web3

* Remove outdated web3 comment in seed-app-store

* Update apps/web/public/static/locales/en/common.json

* Add cron script to keep db apps in sync with app metadata

* Add redirect for app category "video" to "conferencing"

* Fix up "video" category overrides to apply to conferencing

* Fix conferencing apps not showing as a location for non-team users

* Restore "installed_app" string for conferencing apps

* Make linter happier

* Remove my "installed_app_conferencing_description" as this was fixed upstream

* Quick tidy up

* Add dry-run to syncAppMeta via  CRON_ENABLE_APP_SYNC env

* Replace console.log with logger in syncAppMeta

---------

Co-authored-by: Peer Richelsen <[email protected]>
Co-authored-by: alannnc <[email protected]>
Co-authored-by: Hariom Balhara <[email protected]>
Co-authored-by: Omar López <[email protected]>
This commit is contained in:
authored and GitHub committed 2023-06-28 18:22:51 +02:00
1 parent 8cfb9902ff
commit 171827f547
57 files changed
+304 -373

No files matched your search

@@ -17,7 +17,7 @@ type ListLocalOptions = {
export const listLocalHandler = async ({ ctx, input }: ListLocalOptions) => {
const { prisma } = ctx;
const category = input.category === "conferencing" ? "video" : input.category;
const category = input.category;
const localApps = getLocalAppMetadata();
const dbApps = await prisma.app.findMany({
@@ -3,7 +3,7 @@ import type { PrismaClient } from "@prisma/client";
import { getLocalAppMetadata } from "@calcom/app-store/utils";
import { sendDisabledAppEmail } from "@calcom/emails";
import { getTranslation } from "@calcom/lib/server";
import type { AppCategories } from "@calcom/prisma/enums";
import { AppCategories } from "@calcom/prisma/enums";
import { TRPCError } from "@trpc/server";
@@ -53,7 +53,13 @@ export const toggleHandler = async ({ input, ctx }: ToggleOptions) => {
// If disabling an app then we need to alert users basesd on the app type
if (!enabled) {
const translations = new Map();
if (app.categories.some((category) => ["calendar", "video"].includes(category))) {
if (
app.categories.some((category) =>
(
[AppCategories.calendar, AppCategories.video, AppCategories.conferencing] as AppCategories[]
).includes(category)
)
) {
// Find all users with the app credentials
const appCredentials = await prisma.credential.findMany({
where: {