+ {data?.getPlugins
.filter(
- (plugin: any) => !plugin.uninstalledOrgs.includes(orgId),
+ (plugin: InterfacePluginHelper) =>
+ !plugin.uninstalledOrgs.includes(orgId ?? ''),
)
- .filter(
- (val: {
- _id: string;
- pluginName: string | undefined;
- pluginDesc: string | undefined;
- pluginCreatedBy: string;
- pluginInstallStatus: boolean | undefined;
- getInstalledPlugins: () => any;
- }) => {
+ .filter((val: InterfacePluginHelper) => {
+ if (searchText === '') {
+ return val;
+ } else if (
+ val.pluginName
+ ?.toLowerCase()
+ .includes(searchText.toLowerCase())
+ ) {
+ return val;
+ }
+ }).length === 0 ? (
+
{t('pMessage')}
+ ) : (
+ data?.getPlugins
+ .filter(
+ (plugin: InterfacePluginHelper) =>
+ !plugin.uninstalledOrgs.includes(orgId ?? ''),
+ )
+ .filter((val: InterfacePluginHelper) => {
if (searchText == '') {
return val;
} else if (
@@ -230,67 +224,31 @@ function addOnStore(): JSX.Element {
) {
return val;
}
- },
- ).length === 0 ? (
-
{t('pMessage')}
- ) : (
- data.getPlugins
- .filter(
- (plugin: any) => !plugin.uninstalledOrgs.includes(orgId),
- )
- .filter(
- (val: {
- _id: string;
- pluginName: string | undefined;
- pluginDesc: string | undefined;
- pluginCreatedBy: string;
- pluginInstallStatus: boolean | undefined;
- getInstalledPlugins: () => any;
- }) => {
- if (searchText == '') {
- return val;
- } else if (
- val.pluginName
- ?.toLowerCase()
- .includes(searchText.toLowerCase())
- ) {
- return val;
- }
- },
- )
+ })
.map(
(
- plug: {
- _id: string;
- pluginName: string | undefined;
- pluginDesc: string | undefined;
- pluginCreatedBy: string;
- uninstalledOrgs: string[];
- pluginInstallStatus: boolean | undefined;
- getInstalledPlugins: () => any;
- },
+ plug: InterfacePluginHelper,
i: React.Key | null | undefined,
): JSX.Element => (
-
+
),
)
)}
-
-
-
-
+