import { ApplicationCycle } from '@core/typings/application.typing'; import { ApplicationStatuses } from '@core/typings/status.typing'; import { MyWorkspaceForm } from '@features/configure-forms/form.typing'; import { SkeletonCard, SkeletonDisplayConfig, SkeletonItemType } from '@yourcause/common'; import moment from 'moment'; export enum ActionOptions { FORMS_TO_COMPLETE = 1, ACTIONS_AVAILABLE = 2, ALL_SUBMISSIONS = 3, ALL_SUBMISSION_IN_WFL = 4 } export interface MyWorkspacePayload { programId: number; notReviewed: boolean; hasFormToComplete: boolean; hasActionsAvailable: boolean; applicationId: number; organizationName: string; applicantName: string; startDate: moment.Moment; endDate: moment.Moment; } export interface MyWorkspaceCardView { workflowId: number; workflowName: string; currentWorkflowLevelId: number; currentWorkflowLevelName: string; grantProgramId: number; grantProgramName: string; applicationId: number; applicantId: number; applicantFirstName: string; applicantLastName: string; applicantFullName: string; organizationName: string; organizationId: number; organizationIdentification: string; organizationAddress: string; isApplicationInUserLevel: boolean; completionRequirementsMet: boolean; formsAvailableForCompletion: boolean; hasNonpaidPayments: boolean; reviewed: boolean; organizationImageUrl: string; organizationImageName: string; nonprofitGuid: string; applicantProfileImageUrl: string; applicationStatus: ApplicationStatuses; totalApplicationReviews: number; amountRequested: number; isNomination: boolean; isMasked: boolean; canViewMaskedApplicantInfo: boolean; isPrivateOrg: boolean; dateAddedToWorkflow: string; submittedDate: string; lastUpdatedBy: string; lastUpdatedDate: string; canRouteApplication: boolean; canApproveApplication: boolean; canDeclineApplication: boolean; canAwardApplication: boolean; canArchiveApplication: boolean; forms: MyWorkspaceForm[]; formsNeedingCompleted?: MyWorkspaceForm[]; formsOptionalForCompletion?: MyWorkspaceForm[]; currencyRequested: string; currencyRequestedAmountEquivalent: number; grantProgramCycle: ApplicationCycle; isInWorkflowLevel: boolean; nomineeName: string; } export interface MyWorkspaceSummary { totalApplication: number; totalActiveWorkflowLevels: number; totalApplicationsNotReviewed: number; totalActivePrograms: number; } export interface StringMap { [p: string]: string; } export interface MyWorkspaceDeadline { date: string; name: string; description: string; programName: string; createdDate: string; } export interface ApplicantPermission { canManageApplicants: boolean; canReceiveEmails: boolean; isOwner: boolean; } export interface SearchByDropdownValue { filterColumn: string; filterValue: string; filterType: string; } export const MyWorkspaceTableSkeletonConfig: SkeletonDisplayConfig = { skeletonItemType: SkeletonItemType.CONTAINER, height: '230px', width: '100%', justifyContent: null, extraStyling: { background: 'white' }, childElements: [ SkeletonCard ] }; export const MyWorkspaceSummarySkeletonConfig: SkeletonDisplayConfig = { skeletonItemType: SkeletonItemType.CONTAINER, height: '100px', width: '100%', justifyContent: null, extraStyling: { background: 'white', 'flex-direction': 'column' }, childElements: [{ skeletonItemType: SkeletonItemType.CONTAINER, height: '50%', width: '100%', justifyContent: null, extraStyling: {}, childElements: [{ skeletonItemType: SkeletonItemType.CONTAINER, height: '100%', width: '100%', justifyContent: null, extraStyling: { display: 'flex' }, childElements: [{ // Number of apps in your levels skeletonItemType: SkeletonItemType.BASIC_BLOCK, height: '75%', width: '50%', extraStyling: { 'margin-right': '1rem' } }] }] }, { skeletonItemType: SkeletonItemType.CONTAINER, height: '50%', width: '100%', justifyContent: null, extraStyling: {}, childElements: [{ skeletonItemType: SkeletonItemType.CONTAINER, height: '100%', width: '100%', justifyContent: null, extraStyling: { display: 'flex' }, childElements: [{ // Number of apps in your levels skeletonItemType: SkeletonItemType.BASIC_BLOCK, height: '75%', width: '20%', extraStyling: { 'margin-right': '1rem' } }, { // Action required skeletonItemType: SkeletonItemType.BASIC_BLOCK, height: '75%', width: '20%', extraStyling: null }] }] }] };