Skip to content

Commit

Permalink
Merge pull request #35 from 2060-io/Services-edition-Select-templates
Browse files Browse the repository at this point in the history
feat: templates select disabled if a template is already selected
  • Loading branch information
lotharking committed Aug 14, 2024
2 parents 859efa9 + bbcd2ed commit 033329d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/Services/DtsViewEdit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ function DtsViewEdit() {
}
}

let idinurl = pathname.replace("/services/", "");
const idinurl = pathname.replace("/services/", "");

function listDtsTemplateVOs() {
const configParameters: ConfigurationParameters = {
Expand Down Expand Up @@ -336,9 +336,10 @@ useEffect(() => {
value={selectedOption}
onChange={handleChange}
onBlur={refreshDtsTemplateFields}
disabled={'new' !== idinurl}
className={`relative z-20 w-full appearance-none rounded border border-stroke bg-transparent px-5 py-3 outline-none transition focus:border-primary active:border-primary dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary ${
isOptionSelected ? "text-black dark:text-white" : "bg-red-200 placeholder-gray-3"
}`}
} ${'new' !== idinurl ? "opacity-50 cursor-not-allowed bg-gray-200 text-gray-500 border-gray-300" : ""}`}
>

<option value="newTemplateFk" disabled className="text-body dark:text-bodydark">
Expand Down

0 comments on commit 033329d

Please sign in to comment.