Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New UI refresh fixes #1686

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const ApplicationFilter = ({ setDisplayFilter,filterParams,setFilterParams }) =>
/>
</Col>
<Col>
<label>Submission Name</label>
<label>Form Title</label>
<input
className="form-control"
placeholder=""
Expand Down
12 changes: 6 additions & 6 deletions forms-flow-web/src/components/Application/ApplicationTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,19 +79,19 @@ const ApplicationTable = () => {
},
];

const submittedForm = (data) => {
const submissionDetails = (data) => {
dispatch(push(`${redirectUrl}application/${data.id}`));
};



const viewSubmittedForm = (data) => (
<button className="btn btn-link mt-2" onClick={() => submittedForm(data)}>
<Translation>{(t) => t("View Submitted Form")}</Translation>{" "}
const viewSubmissionDetails = (data) => (
<button className="btn btn-link mt-2" onClick={() => submissionDetails(data)}>
<Translation>{(t) => t(" View Details")}</Translation>{" "}
</button>
);

const viewSubmissionDetails = (formData) => {
const viewSubmittedForm = (formData) => {
const url =
formData.isClientEdit || formData.isResubmit
? `${redirectUrl}form/${formData.formId}/submission/${formData.submissionId}/edit`
Expand All @@ -101,7 +101,7 @@ const ApplicationTable = () => {
className="btn btn-link mt-2"
onClick={() => window.open(url, "_blank")}
>
<Translation>{(t) => t("View Details")}</Translation>{" "}
<Translation>{(t) => t("View Submitted Form")}</Translation>{" "}
</button>
);
};
Expand Down
2 changes: 1 addition & 1 deletion forms-flow-web/src/components/Application/Details/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const Details = React.memo((props) => {
spinner
text={t("Select a task in the list.")}
>
<div className="row" style={{ marginTop: "26.5px", fontWeight: "500px" }}>
<div className="row m-0 bg-white p-3" style={{ fontWeight: "500px" }}>
<div className="col-md-6">
<ApplicationDetails application={props.application} />
</div>
Expand Down
6 changes: 3 additions & 3 deletions forms-flow-web/src/components/Application/ViewApplication.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ const ViewApplication = React.memo(() => {

return (
<div className="">
<div className="main-header">
<Link title={t("Back to Submissions")} to={`${redirectUrl}application`}>
<div className="d-flex align-items-center">
<Link title={t("Back to Submissions")} to={`${redirectUrl}application`} className="">
<i className="fa fa-chevron-left fa-lg" />
</Link>
<h3 className="ml-3 text-truncate" style={{height:"45px"}}>
<h3 className=" text-truncate">
<span className="application-head-details">
<i className="fa fa-list-alt" aria-hidden="true" />
&nbsp; <Translation>{(t) => t("Submissions")}</Translation> /
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const ApplicationCounter = React.memo((props) => {
}
return (
<Fragment>
<div className="row">
<div className="row m-0">
{application.map((app, idx) => (
<div
className="col-lg-4 col-sm-6 col-xs-12"
Expand Down
2 changes: 1 addition & 1 deletion forms-flow-web/src/components/Dashboard/Dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ const Dashboard = React.memo(() => {
</div>

{submissionsList.length && !metricsDateRangeLoader ? (
<div className="d-flex justify-content-between align-items-center mt-4">
<div className="d-flex justify-content-between align-items-center mt-3">
<div className="d-flex align-items-center">
<span className="mr-2"> {t("Rows per page")}</span>
<Dropdown>
Expand Down
2 changes: 1 addition & 1 deletion forms-flow-web/src/components/Draft/Details/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const Details = React.memo((props) => {
spinner
text={t("Select a task in the list.")}
>
<div className="row" style={{ marginTop: "26.5px", fontWeight: "500px" }}>
<div className="row m-0 bg-white p-3" style={{ fontWeight: "500px" }}>
<div className="col-md-6">
<DraftDetails draft={props.draft} />
</div>
Expand Down
2 changes: 1 addition & 1 deletion forms-flow-web/src/components/Draft/DraftTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ const DraftTable = () => {
</Dropdown>
<span className="ml-2">
Showing {(limit * pageNo ) - (limit - 1)} to{" "}
{limit * pageNo > totalForms ? totalForms : limit * pageNo} of
{limit * pageNo > totalForms ? totalForms : limit * pageNo} of{" "}
{totalForms} Results
</span>
</div>
Expand Down
10 changes: 5 additions & 5 deletions forms-flow-web/src/components/Draft/Edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,20 +237,20 @@ const View = React.memo((props) => {
</>
}
<div className="d-flex align-items-center justify-content-between">
<div className="main-header">
<div className="d-flex align-items-center">
<SubmissionError
modalOpen={props.submissionError.modalOpen}
message={props.submissionError.message}
onConfirm={props.onConfirm}
></SubmissionError>
{isAuthenticated ? (
<Link title={t("Back to Drafts")} to={`${redirectUrl}draft`}>
<Link title={t("Back to Drafts")} to={`${redirectUrl}draft`} className="">
<i className="fa fa-chevron-left fa-lg" />
</Link>
) : null}

{form.title ? (
<h3 className="ml-3">
<h3 className="">
<span className="task-head-details">
<i className="fa-solid fa-file-lines" aria-hidden="true" /> &nbsp;{" "}
{t("Drafts")}/
Expand Down Expand Up @@ -278,9 +278,9 @@ const View = React.memo((props) => {
active={isFormSubmissionLoading}
spinner
text={<Translation>{(t) => t("Loading...")}</Translation>}
className="col-12"
className="col-12 p-0"
>
<div className="ml-4 mr-4">
<div className="mt-4">
<Confirm
modalOpen={draftDelete.modalOpen}
message={`${t("Are you sure you wish to delete the draft")} "${
Expand Down
6 changes: 3 additions & 3 deletions forms-flow-web/src/components/Draft/ViewDraft.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ const ViewDraft = React.memo(() => {

return (
<div className="" id="main">
<div className="main-header">
<Link title={t("Back to Drafts")} to={`${redirectUrl}draft`}>
<div className="d-flex align-items-center">
<Link title={t("Back to Drafts")} to={`${redirectUrl}draft`} className="mt-1">
Ajay-aot marked this conversation as resolved.
Show resolved Hide resolved
<i className="fa fa-chevron-left fa-lg" />
</Link>
<h3 className="ml-3">
<h3 className="">
<span className="application-head-details">
<i className="fa fa-list-alt" aria-hidden="true" />
&nbsp; <Translation>{(t) => t("Drafts")}</Translation> /
Expand Down
76 changes: 39 additions & 37 deletions forms-flow-web/src/components/Form/Create.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const Create = React.memo(() => {
const submissionAccess = useSelector((state) => state.user?.submissionAccess || []);
const redirectUrl = MULTITENANCY_ENABLED ? `/tenant/${tenantKey}/` : "/";
const [open, setOpen] = useState(false);
const [formDescription,setFormDescription] = useState("");
const [formDescription, setFormDescription] = useState("");
const { t } = useTranslation();
useEffect(() => {
dispatch(clearFormError("form"));
Expand Down Expand Up @@ -165,7 +165,7 @@ const Create = React.memo(() => {
formRevisionNumber: "V1", // to do
anonymous: formAccess[0]?.roles.includes(roleIds.ANONYMOUS),
};

let payload = {
resourceId: data.formId,
resourceDetails: {},
Expand Down Expand Up @@ -215,9 +215,9 @@ const Create = React.memo(() => {
const formChange = (newForm) =>
dispatchFormAction({ type: "formChange", value: newForm });

const handleToggle = () => {
setOpen(!open);
};
const handleToggle = () => {
setOpen(!open);
};

return (
<div>
Expand Down Expand Up @@ -252,12 +252,14 @@ const Create = React.memo(() => {
/>
</div>
</div>
<div >
<div className="">
<label htmlFor="Description" className="control-label field-required font-weight-bold">
{" "}
{t("Description")}
</label>
<RichText onChange={setFormDescription} value={formDescription}/>
<div className="bg-white">
<RichText onChange={setFormDescription} value={formDescription} />
</div>
</div>
</div>
<div className="col-lg-6 col-md-6 col-sm-6 col-12">
Expand Down Expand Up @@ -324,41 +326,41 @@ const Create = React.memo(() => {
<div className="d-flex align-items-center cursor-pointer" onClick={handleToggle}>
<i className={`fa ${open ? 'fa-chevron-up' : 'fa-chevron-down'} mr-2`}></i>
<span className="text-primary font-weight-bold mr-4">Advanced Options</span>
<hr className="flex-grow-1 ml-2 mr-2"/>
<hr className="flex-grow-1 ml-2 mr-2" />
</div>
<Collapse in={open} className="mt-3">
<div id="example-collapse-text">

<div className="col-lg-12 col-md-12 col-sm-12">
<div id="form-group-name" className="form-group">
<label htmlFor="name" className="control-label field-required font-weight-bold">
{t("Name")}
{addingTenantKeyInformation("name")}
</label>
<div className="input-group mb-2">
{
MULTITENANCY_ENABLED && tenantKey ? <div className="input-group-prepend">
<div
className="input-group-text"
style={{ maxWidth: "150px" }}
>
<span className="text-truncate">{tenantKey}</span>
</div>
</div> : ""
}
<input
type="text"
className="form-control"
id="name"
placeholder={t("Enter the form machine name")}
value={form?.name || ""}
onChange={(event) => handleChange("name", event)}
/>
</div>
<div className="col-lg-12 col-md-12 col-sm-12">
<div id="form-group-name" className="form-group">
<label htmlFor="name" className="control-label field-required font-weight-bold">
{t("Name")}
{addingTenantKeyInformation("name")}
</label>
<div className="input-group mb-2">
{
MULTITENANCY_ENABLED && tenantKey ? <div className="input-group-prepend">
<div
className="input-group-text"
style={{ maxWidth: "150px" }}
>
<span className="text-truncate">{tenantKey}</span>
</div>
</div> : ""
}
<input
type="text"
className="form-control"
id="name"
placeholder={t("Enter the form machine name")}
value={form?.name || ""}
onChange={(event) => handleChange("name", event)}
/>
</div>
</div>
</div>

<div className="d-flex flex-wrap">
<div className="d-flex flex-wrap">
<div className="col-lg-6 col-md-6 col-sm-12 ">
<div id="form-group-type" className="form-group">
<label htmlFor="form-type" className="control-label font-weight-bold">
Expand Down Expand Up @@ -404,7 +406,7 @@ const Create = React.memo(() => {
type="text"
className="form-control"
id="path"
placeholder={t("Enter the path name")}
placeholder={t("Enter the path name")}
value={form?.path || ""}
onChange={(event) => handleChange("path", event)}
/>
Expand All @@ -413,7 +415,7 @@ const Create = React.memo(() => {
</div>
</div>
</div>
</Collapse>
</Collapse>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const View = React.memo((props) => {
}

return (
<div className="container row task-container">
<div className="container row task-container bg-white p-2 m-0">
<div className="main-header" style={{ "height": "45px" }}>
<h3 className="task-head text-truncate"> {form.title}</h3>
{showPrintButton && form?._id ? (
Expand Down
3 changes: 1 addition & 2 deletions forms-flow-web/src/components/Insights/Insights.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ const Insights = React.memo((props) => {
<Head items={headerList()} page="Insights"/>


<div
className="d-flex align-items-center flex-md-row flex-colum justify-content-between mt-3"
<div className="d-flex align-items-center flex-md-row flex-colum justify-content-between mt-3"
data-testid="Insight"
role="main"
>
Expand Down
1 change: 0 additions & 1 deletion forms-flow-web/src/containers/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,6 @@ margin-right: 1rem;
.application-head-details
{
font-weight: bold;
font-size:30px;
margin-left: 10px !important;
display: inline-block;
}
Expand Down