Skip to content

Commit

Permalink
Resolved merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaliya-AOT committed Jan 20, 2025
2 parents f011c13 + 7d3fdb8 commit 4b5d137
Show file tree
Hide file tree
Showing 12 changed files with 464 additions and 701 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/trivy-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,15 @@ jobs:
- { name: "redash", tag: "24.04.0" }
- { name: "forms-flow-data-analysis-api", tag: "latest" }
- { name: "forms-flow-documents-api", tag: "latest" }

steps:
- name: Authenticate with Docker Hub
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_ACCESS_TOKEN }}
run: |
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- name: Install Trivy
run: |
sudo apt-get update
Expand Down
120 changes: 0 additions & 120 deletions forms-flow-web/src/components/CustomComponents/MultiSelect.js

This file was deleted.

12 changes: 5 additions & 7 deletions forms-flow-web/src/components/CustomComponents/SortableHeader.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import React from 'react';
import PropTypes from 'prop-types';
import { useTranslation } from "react-i18next";
import { SortIcon } from "@formsflow/components";
import { StyleServices } from "@formsflow/service";

const SortableHeader = ({ columnKey, title, currentSort, handleSort,className = "" }) => {
const { t } = useTranslation();
Expand All @@ -11,6 +13,7 @@ const SortableHeader = ({ columnKey, title, currentSort, handleSort,className =
handleSort(columnKey);
}
};
const grayColor = StyleServices.getCSSVariable('--ff-gray-400');
return (
<button
className={`button-as-div ${className}`}
Expand All @@ -21,13 +24,8 @@ const SortableHeader = ({ columnKey, title, currentSort, handleSort,className =
aria-label={`${title}-header-btn`}
>
<span className="mt-1">{t(title)}</span>
<span>
<i
data-testid={`${columnKey}-${sortedOrder}-sort-icon`}
className={`fa fa-arrow-${sortedOrder === "asc" ? "up" : "down"} sort-icon fs-16 ms-2`}
data-toggle="tooltip"
title={t(sortedOrder === "asc" ? "Ascending" : "Descending")}
></i>
<span className={sortedOrder === "asc" ? "arrow-up" : "arrow-down"}>
<SortIcon color={grayColor}/>
</span>
</button>
);
Expand Down
8 changes: 5 additions & 3 deletions forms-flow-web/src/components/Form/EditForm/FormEdit.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ import NewVersionModal from "../../Modals/NewVersionModal";
import { currentFormReducer } from "../../../modules/formReducer.js";
import { toast } from "react-toastify";
import userRoles from "../../../constants/permissions.js";
import { generateUniqueId, isFormComponentsChanged, addTenantkey, textTruncate } from "../../../helper/helper.js";
import { generateUniqueId, isFormComponentsChanged, addTenantkey, textTruncate,
convertMultiSelectOptionToValue } from "../../../helper/helper.js";
import { useMutation } from "react-query";
import NavigateBlocker from "../../CustomComponents/NavigateBlocker";
import { setProcessData, setFormPreviosData, setFormProcessesData } from "../../../actions/processActions.js";
Expand Down Expand Up @@ -538,12 +539,13 @@ const handleSaveLayout = () => {


/* ----------- save settings function to be used in settings modal ---------- */

const filterAuthorizationData = (authorizationData) => {
if(authorizationData.selectedOption === "submitter"){
return {roles: [], userName:null, resourceDetails:{submitter:true}};
}
if (authorizationData.selectedOption === "specifiedRoles") {
return { roles: authorizationData.selectedRoles, userName: "" };
return { roles: convertMultiSelectOptionToValue(authorizationData.selectedRoles, "role"), userName: "" };
}
return { roles: [], userName: preferred_username };
};
Expand Down Expand Up @@ -582,7 +584,7 @@ const handleSaveLayout = () => {
resourceDetails: {},
roles:
rolesState.FORM.selectedOption === "specifiedRoles"
? rolesState.FORM.selectedRoles
? convertMultiSelectOptionToValue(rolesState.FORM.selectedRoles, "role")
: [],
},
};
Expand Down
Loading

0 comments on commit 4b5d137

Please sign in to comment.