Skip to content

Commit

Permalink
Corrected Personal app actions
Browse files Browse the repository at this point in the history
  • Loading branch information
anoopkarnik committed Sep 3, 2024
1 parent dd83d28 commit d0a00e1
Show file tree
Hide file tree
Showing 63 changed files with 67 additions and 65 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import React, { useContext, useEffect, useState } from 'react'
import { CONNECTIONS } from '../../../../lib/constant'
import { useSession } from 'next-auth/react'
import { getUserInfo } from '../../../../actions/connections/user-connections'
import { getUserInfo } from '../../../actions/connections/user-connections'
import { ConnectionsContext } from '../../../../providers/connections-provider'
import ConnectedCard from '../../../../components/ConnectedCard'

Expand Down
8 changes: 4 additions & 4 deletions apps/dashboard-app/app/(dashboard)/connections/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import { ConnectionsContext } from '../../../providers/connections-provider'
import Connected from './_components/Connected'
import Connections from './_components/Connections'
import { useSession } from 'next-auth/react';
import { getUserInfo } from '../../../actions/connections/user-connections';
import { onNotionConnection } from '../../../actions/connections/notion-connections';
import { onOpenAIConnection } from '../../../actions/connections/openai-connections';
import { onYoutubeConnection } from '../../../actions/connections/youtube-connections';
import { getUserInfo } from '../../actions/connections/user-connections';
import { onNotionConnection } from '../../actions/connections/notion-connections';
import { onOpenAIConnection } from '../../actions/connections/openai-connections';
import { onYoutubeConnection } from '../../actions/connections/youtube-connections';
import { useToast } from '../../../hooks/useToast';

const PlannerPage = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Input } from '@repo/ui/atoms/shadcn/Input'
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@repo/ui/molecules/shadcn/Select'
import React, { useContext, useEffect, useState } from 'react'
import { ConnectionsContext } from '../../../../providers/connections-provider'
import { createNotionPageAction, queryNotionDatabaseAction } from '../../../../actions/notion/notion'
import { createNotionPageAction, queryNotionDatabaseAction } from '../../../actions/notion/notion'

const BudgetForm = () => {
const connectionsContext = useContext(ConnectionsContext)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import { format } from "date-fns";
import { DatePickerWithRange } from '@repo/ui/molecules/shadcn/DateRange';
import { ConnectionsContext } from '../../../../providers/connections-provider';
import { getAccountsSummary, getDateSpecificFinancialSummary, getLastMonthsFinancialSummary, getYearlyBudgetSummary,
getMonthlyBudgetSummary, getPastMonthsBudgetSummary, } from '../../../../actions/notion/financial'
getMonthlyBudgetSummary, getPastMonthsBudgetSummary, } from '../../../actions/notion/financial'
import ChartCard from '@repo/ui/molecules/custom/ChartCard';
import { ChartConfig } from '@repo/ui/molecules/shadcn/Chart';
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '@repo/ui/molecules/shadcn/Accordion';
import {Skeleton} from '@repo/ui/molecules/shadcn/Skeleton'
import HeaderCard from '@repo/ui/molecules/custom/HeaderCard';
import { queryNotionDatabaseAction } from '../../../../actions/notion/notion';
import { queryNotionDatabaseAction } from '../../../actions/notion/notion';
import TransactionForm from './TransactionForm';
import BudgetForm from './BudgetForm';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Input } from '@repo/ui/atoms/shadcn/Input'
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@repo/ui/molecules/shadcn/Select'
import React, { useContext, useEffect, useState} from 'react'
import { ConnectionsContext } from '../../../../providers/connections-provider'
import { createNotionPageAction, queryNotionDatabaseAction } from '../../../../actions/notion/notion'
import { createNotionPageAction, queryNotionDatabaseAction } from '../../../actions/notion/notion'

const TransactionForm = () => {
const connectionsContext = useContext(ConnectionsContext)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Button } from '@repo/ui/atoms/shadcn/Button'
import { Input } from '@repo/ui/atoms/shadcn/Input'
import React, { useContext, useState } from 'react'
import { ConnectionsContext } from '../../../../providers/connections-provider'
import { createNotionPageAction } from '../../../../actions/notion/notion'
import { createNotionPageAction } from '../../../actions/notion/notion'
import { Textarea } from '@repo/ui/atoms/shadcn/Textarea'
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@repo/ui/molecules/shadcn/Select'
import {FloatingLabelInput} from '@repo/ui/molecules/custom/FloatingLabelInput'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Button } from '@repo/ui/atoms/shadcn/Button'
import { Input } from '@repo/ui/atoms/shadcn/Input'
import React, { useContext, useState } from 'react'
import { ConnectionsContext } from '../../../../providers/connections-provider'
import { createNotionPageAction } from '../../../../actions/notion/notion'
import { createNotionPageAction } from '../../../actions/notion/notion'
import { Checkboxes } from '@repo/ui/molecules/custom/Checkboxes'
import { Textarea } from '@repo/ui/atoms/shadcn/Textarea'
import { FloatingLabelInput } from '@repo/ui/molecules/custom/FloatingLabelInput'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import React, { useContext, useEffect, useState } from 'react'
import { ConnectionsContext } from '../../../../providers/connections-provider'
import HeaderCard from '@repo/ui/molecules/custom/HeaderCard';
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '@repo/ui/molecules/shadcn/Accordion';
import { getAreasDatabaseSummary, getBooksDatabaseSummary, getInterestingDatabaseSummary, getQuickCaptureDatabaseSummary } from '../../../../actions/notion/knowledgeBase';
import { getAreasDatabaseSummary, getBooksDatabaseSummary, getInterestingDatabaseSummary, getQuickCaptureDatabaseSummary } from '../../../actions/notion/knowledgeBase';
import InterestingForm from './InterestingForm';
import { Checkbox } from '../../../../../../packages/ui/src/components/atoms/shadcn/Checkbox';
import { modifyNotionPageAction } from '../../../../actions/notion/notion';
import { modifyNotionPageAction } from '../../../actions/notion/notion';
import { Card, CardContent, CardFooter, CardHeader, CardTitle } from '@repo/ui/molecules/shadcn/Card';
import Link from 'next/link';
import { LinkIcon } from 'lucide-react';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Button } from '@repo/ui/atoms/shadcn/Button'
import { Input } from '@repo/ui/atoms/shadcn/Input'
import React, { useContext, useEffect, useState } from 'react'
import { ConnectionsContext } from '../../../../providers/connections-provider'
import { modifyNotionPageAction, queryAllNotionDatabaseAction } from '../../../../actions/notion/notion'
import { modifyNotionPageAction, queryAllNotionDatabaseAction } from '../../../actions/notion/notion'
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@repo/ui/molecules/shadcn/Select'
import {FloatingLabelInput} from '@repo/ui/molecules/custom/FloatingLabelInput'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React, { useContext, useEffect, useState } from 'react'
import { ConnectionsContext } from '../../../../providers/connections-provider'
import HeaderCard from '@repo/ui/molecules/custom/HeaderCard';
import { getCalendarSummary, getTasksSummary, getWeeklyPlannerSummary } from '../../../../actions/notion/planner';
import { getCalendarSummary, getTasksSummary, getWeeklyPlannerSummary } from '../../../actions/notion/planner';
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '@repo/ui/molecules/shadcn/Accordion';
import { Checkbox } from '../../../../../../packages/ui/src/components/atoms/shadcn/Checkbox';
import { Button } from '@repo/ui/atoms/shadcn/Button';
import { createNotionPageAction, modifyNotionPageAction } from '../../../../actions/notion/notion';
import { createNotionPageAction, modifyNotionPageAction } from '../../../actions/notion/notion';
import SchedulerForm from './SchedulerForm';
import TaskForm from './TaskForm';
import WeeklyPlannerForm from './WeeklyPlannerForm';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Input } from '@repo/ui/atoms/shadcn/Input'
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@repo/ui/molecules/shadcn/Select'
import React, { useContext, useState } from 'react'
import { ConnectionsContext } from '../../../../providers/connections-provider'
import { createNotionPageAction } from '../../../../actions/notion/notion'
import { createNotionPageAction } from '../../../actions/notion/notion'
import { Checkboxes } from '@repo/ui/molecules/custom/Checkboxes'
import { DatePicker } from '@repo/ui/molecules/shadcn/DatePicker'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Button } from '@repo/ui/atoms/shadcn/Button'
import { Input } from '@repo/ui/atoms/shadcn/Input'
import React, { useContext, useState } from 'react'
import { ConnectionsContext } from '../../../../providers/connections-provider'
import { createNotionPageAction } from '../../../../actions/notion/notion'
import { createNotionPageAction } from '../../../actions/notion/notion'
import { DatePicker } from '@repo/ui/molecules/shadcn/DatePicker'
import { Checkbox } from '../../../../../../packages/ui/src/components/atoms/shadcn/Checkbox'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Input } from '@repo/ui/atoms/shadcn/Input'
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@repo/ui/molecules/shadcn/Select'
import React, { useContext, useState } from 'react'
import { ConnectionsContext } from '../../../../providers/connections-provider'
import { createNotionPageAction} from '../../../../actions/notion/notion'
import { createNotionPageAction} from '../../../actions/notion/notion'
import { DatePicker } from '@repo/ui/molecules/shadcn/DatePicker'

const WeeklyPlannerForm = () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { modifyNotionPageAction } from "../../../../actions/notion/notion";
import { modifyNotionPageAction } from "../../../actions/notion/notion";

export const calculateAndUpdateNextRevisionDate = async (page:any, apiToken:any) =>{
const baseInterval = 1; // Base interval in days
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use server'

import { queryNotionPageAction } from "../../../../actions/notion/notion"
import { queryNotionPageAction } from "../../../actions/notion/notion"

export const calculateTotalLength = async (skillTree:any, skillTrees:any) => {
let totalNotes = skillTree["Self"]
Expand Down
2 changes: 1 addition & 1 deletion apps/dashboard-app/app/(dashboard)/skill-trees/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { ConnectionsContext } from '../../../providers/connections-provider'
import { Select, SelectContent, SelectItem, SelectTrigger } from '@repo/ui/molecules/shadcn/Select'
import { useMedia,} from 'react-use'
import { Tabs, TabsList, TabsTrigger } from '@repo/ui/molecules/shadcn/Tabs'
import { queryAllNotionDatabaseAction } from '../../../actions/notion/notion'
import { queryAllNotionDatabaseAction } from '../../actions/notion/notion'
import SkillTrees from './_components/SkillTrees'
import { useRouter, useSearchParams } from 'next/navigation'
import { BookOpenCheckIcon, SettingsIcon } from 'lucide-react'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle }
import { Label } from '@repo/ui/atoms/shadcn/Label'
import { Switch } from '@repo/ui/molecules/shadcn/Switch'
import React, { useState } from 'react'
import { deleteFlow, publishFlow } from '../../../../actions/workflows/workflow'
import { deleteFlow, publishFlow } from '../../../actions/workflows/workflow'
import ConfirmDialog from '@repo/ui/molecules/custom/ConfirmDialog'
import { ArrowRightIcon, TrashIcon } from 'lucide-react'
import { useRouter } from 'next/navigation'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* eslint-disable */

import React, { useEffect, useState } from 'react'
import { getWorkflows } from '../../../../actions/workflows/workflow'
import { getWorkflows } from '../../../actions/workflows/workflow'
import { useSession } from 'next-auth/react'
import Workflow from './Workflow'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useEffect, useState } from 'react';
import { getEventsByWorkflowId } from '../../../../../../actions/workflows/workflow';
import { getEventsByWorkflowId } from '../../../../../actions/workflows/workflow';
import { useParams } from 'next/navigation';
import { format } from 'date-fns';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client'
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '@repo/ui/molecules/shadcn/Accordion'
import React, { useEffect, useState } from 'react'
import { getLatestEventByWorkflowIdAction } from '../../../../../../actions/workflows/workflow'
import { getLatestEventByWorkflowIdAction } from '../../../../../actions/workflows/workflow'

const NodeAccordion = ({node}:any) => {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import React, { useContext, useEffect, useState } from 'react'
import 'reactflow/dist/style.css';
import { Card,CardHeader,CardTitle,CardFooter,CardDescription,CardContent } from '@repo/ui/molecules/shadcn/Card';
import { useParams, useRouter, useSearchParams } from 'next/navigation';
import { deleteActionAction, deleteTriggerAction, editFlow, getActionTypesAction, getTriggerTypesAction, publishFlow, runWorkflow } from '../../../../../../actions/workflows/workflow';
import { deleteActionAction, deleteTriggerAction, editFlow, getActionTypesAction, getTriggerTypesAction, publishFlow, runWorkflow } from '../../../../../actions/workflows/workflow';
import { EditorContext } from '../../../../../../providers/editor-provider';
import { ArrowBigDownDash, Edit2Icon, TrashIcon } from 'lucide-react';
import { Input } from '@repo/ui/atoms/shadcn/Input';
import { Switch } from '@repo/ui/molecules/shadcn/Switch';
import { Label } from '@repo/ui/atoms/shadcn/Label';
import { getWorkflow } from '../../../../../../actions/workflows/workflow';
import { getWorkflow } from '../../../../../actions/workflows/workflow';
import NodeModal from './NodeModal';

import NodeCard from './NodeCard';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { useToast } from '../../../../../../../../hooks/useToast';
import { getSession } from 'next-auth/react';
import { useParams, useRouter } from 'next/navigation';
import { EditorContext } from '../../../../../../../../providers/editor-provider';
import { createActionAction, updateActionAction } from '../../../../../../../../actions/workflows/workflow';
import { createActionAction, updateActionAction } from '../../../../../../../actions/workflows/workflow';
import { set } from 'date-fns';

export const JavascriptCode = ({funcType,nodeType,type,subType,node}: any) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import { EditorContext } from '../../../../../../../../providers/editor-provider
import { useSession } from 'next-auth/react';
import { Button } from '@repo/ui/atoms/shadcn/Button';
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@repo/ui/molecules/shadcn/Select';
import { getNotionConnection } from '../../../../../../../../actions/connections/notion-connections';
import { getNotionConnection } from '../../../../../../../actions/connections/notion-connections';
import { Label } from '@repo/ui/atoms/shadcn/Label';
import { getDatabases} from '../../../../../../../../actions/notion/notion';
import { createActionAction, updateActionAction } from '../../../../../../../../actions/workflows/workflow';
import { getDatabases} from '../../../../../../../actions/notion/notion';
import { createActionAction, updateActionAction } from '../../../../../../../actions/workflows/workflow';
import { Textarea } from '@repo/ui/atoms/shadcn/Textarea';

const CreatePage = ({funcType,nodeType,type,subType,node}:any) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import { EditorContext } from '../../../../../../../../providers/editor-provider
import { useSession } from 'next-auth/react';
import { Button } from '@repo/ui/atoms/shadcn/Button';
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@repo/ui/molecules/shadcn/Select';
import { getNotionConnection } from '../../../../../../../../actions/connections/notion-connections';
import { getNotionConnection } from '../../../../../../../actions/connections/notion-connections';
import { Label } from '@repo/ui/atoms/shadcn/Label';
import { getDatabases, queryNotionDatabaseAction, queryNotionDatabaseProperties } from '../../../../../../../../actions/notion/notion';
import { getDatabases, queryNotionDatabaseAction, queryNotionDatabaseProperties } from '../../../../../../../actions/notion/notion';
import { Input } from '@repo/ui/atoms/shadcn/Input';
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '@repo/ui/molecules/shadcn/Accordion';
import { DeleteIcon } from 'lucide-react';
import { createActionAction, updateActionAction } from '../../../../../../../../actions/workflows/workflow';
import { createActionAction, updateActionAction } from '../../../../../../../actions/workflows/workflow';
import { set } from 'date-fns';
import SearchableSelect from '@repo/ui/molecules/custom/SearchableSelect';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import { EditorContext } from '../../../../../../../../providers/editor-provider
import { useSession } from 'next-auth/react';
import { Button } from '@repo/ui/atoms/shadcn/Button';
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@repo/ui/molecules/shadcn/Select';
import { getNotionConnection } from '../../../../../../../../actions/connections/notion-connections';
import { getNotionConnection } from '../../../../../../../actions/connections/notion-connections';
import { Label } from '@repo/ui/atoms/shadcn/Label';
import { getDatabases } from '../../../../../../../../actions/notion/notion';
import { createActionAction, updateActionAction } from '../../../../../../../../actions/workflows/workflow';
import { getDatabases } from '../../../../../../../actions/notion/notion';
import { createActionAction, updateActionAction } from '../../../../../../../actions/workflows/workflow';
import { Textarea } from '@repo/ui/atoms/shadcn/Textarea';

const UpdatePage = ({funcType,nodeType,type,subType,node}:any) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { getSession } from 'next-auth/react';
import { useParams } from 'next/navigation';
import { EditorContext } from '../../../../../../../../providers/editor-provider';
import { useRouter } from 'next/navigation';
import { createActionAction, createTriggerAction, updateActionAction } from '../../../../../../../../actions/workflows/workflow';
import { createActionAction, createTriggerAction, updateActionAction } from '../../../../../../../actions/workflows/workflow';
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@repo/ui/molecules/shadcn/Select';
import { Input } from '@repo/ui/atoms/shadcn/Input';
import { useToast } from '../../../../../../../../hooks/useToast';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { useParams } from 'next/navigation';
import { EditorContext } from '../../../../../../../../providers/editor-provider';
import { useRouter } from 'next/navigation';
import { useToast } from '../../../../../../../../hooks/useToast';
import { createTriggerAction } from '../../../../../../../../actions/workflows/workflow';
import { createTriggerAction } from '../../../../../../../actions/workflows/workflow';

const Schedule = ({funcType,nodeType,type,subType,node}:any) => {
const {toast} = useToast();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { getSession } from 'next-auth/react';
import { useParams } from 'next/navigation';
import { EditorContext } from '../../../../../../../../providers/editor-provider';
import { useRouter } from 'next/navigation';
import { createTriggerAction } from '../../../../../../../../actions/workflows/workflow';
import { createTriggerAction } from '../../../../../../../actions/workflows/workflow';
import { useToast } from '../../../../../../../../hooks/useToast';

const WebhookTrigger = ({funcType,nodeType,type,subType,node}:any) => {
Expand Down
Loading

0 comments on commit d0a00e1

Please sign in to comment.