Skip to content

Commit

Permalink
[#1099] submit issue fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishek-p-s committed Jan 30, 2024
1 parent 4ec9b51 commit 7799fd8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
9 changes: 8 additions & 1 deletion frontend/src/components/filters/AdministrationDropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,17 @@ const AdministrationDropdown = ({
store.update((s) => {
s.administration = s.administration.concat(admItems);
});
if (onChange) {
const _values = admItems.map((item) => item.id);
onChange(_values);
}
} else {
store.update((s) => {
s.administration = s.administration.slice(0, 2);
s.administration = s.administration.slice(0, 1);
});
if (onChange) {
onChange(administration.slice(0, 1).map((adm) => adm.id));
}
}
};

Expand Down
1 change: 1 addition & 0 deletions frontend/src/pages/mobile-assignment/AddAssignment.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ const AddAssignment = () => {

const fetchData = useCallback(async () => {
if (id && preload && editAssignment?.id && selectedAdm) {
console.log(editAssignment, selectedAdm, "editAssignment");
setPreload(false);
form.setFieldsValue({
...editAssignment,
Expand Down

0 comments on commit 7799fd8

Please sign in to comment.