mirror of
https://github.com/Kingsrook/qqq-frontend-material-dashboard.git
synced 2025-07-18 05:10:45 +00:00
Try to use google login separately from picker, to get an access token with more scopes
This commit is contained in:
@ -41,6 +41,7 @@ import StepLabel from "@mui/material/StepLabel";
|
||||
import Stepper from "@mui/material/Stepper";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import {DataGridPro, GridColDef} from "@mui/x-data-grid-pro";
|
||||
import {GoogleOAuthProvider} from "@react-oauth/google";
|
||||
import FormData from "form-data";
|
||||
import {Form, Formik} from "formik";
|
||||
import React, {useEffect, useState} from "react";
|
||||
@ -54,7 +55,7 @@ import MDBox from "qqq/components/Temporary/MDBox";
|
||||
import MDButton from "qqq/components/Temporary/MDButton";
|
||||
import MDProgress from "qqq/components/Temporary/MDProgress";
|
||||
import MDTypography from "qqq/components/Temporary/MDTypography";
|
||||
import {QGoogleDriveFolderPicker} from "qqq/pages/process-run/components/QGoogleDriveFolderPicker";
|
||||
import {QGoogleDriveFolderPickerWrapper} from "qqq/pages/process-run/components/QGoogleDriveFolderPickerWrapper";
|
||||
import QValidationReview from "qqq/pages/process-run/components/QValidationReview";
|
||||
import QClient from "qqq/utils/QClient";
|
||||
import QValueUtils from "qqq/utils/QValueUtils";
|
||||
@ -181,21 +182,6 @@ function ProcessRun({process, defaultProcessValues}: Props): JSX.Element
|
||||
setDisabledBulkEditFields(newDisabledBulkEditFields);
|
||||
};
|
||||
|
||||
const formatViewValue = (value: any): JSX.Element =>
|
||||
{
|
||||
if (value === null || value === undefined)
|
||||
{
|
||||
return <span> </span>;
|
||||
}
|
||||
|
||||
if (typeof value === "string")
|
||||
{
|
||||
return QValueUtils.breakTextIntoLines(value);
|
||||
}
|
||||
|
||||
return (<span>{value}</span>);
|
||||
};
|
||||
|
||||
const toggleShowErrorDetail = () =>
|
||||
{
|
||||
setShowErrorDetail(!showErrorDetail);
|
||||
@ -335,7 +321,7 @@ function ProcessRun({process, defaultProcessValues}: Props): JSX.Element
|
||||
:
|
||||
</MDTypography>
|
||||
<MDTypography variant="button" fontWeight="regular" color="text">
|
||||
{formatViewValue(processValues[field.name])}
|
||||
{QValueUtils.getValueForDisplay(field, processValues[field.name])}
|
||||
</MDTypography>
|
||||
</MDBox>
|
||||
))}
|
||||
@ -396,7 +382,8 @@ function ProcessRun({process, defaultProcessValues}: Props): JSX.Element
|
||||
}
|
||||
{
|
||||
component.type === QComponentType.GOOGLE_DRIVE_SELECT_FOLDER && (
|
||||
<QGoogleDriveFolderPicker />
|
||||
// todo - make these booleans configurable (values on the component)
|
||||
<QGoogleDriveFolderPickerWrapper showSharedDrivesView={true} showDefaultFoldersView={false} />
|
||||
)
|
||||
}
|
||||
{
|
||||
|
Reference in New Issue
Block a user