Added select all images/docs buttons IO-410
This commit is contained in:
@@ -8711,6 +8711,48 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>selectallimages</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>selectallotherdocuments</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
</children>
|
</children>
|
||||||
</folder_node>
|
</folder_node>
|
||||||
<folder_node>
|
<folder_node>
|
||||||
|
|||||||
@@ -68,8 +68,6 @@ export function JobsChangeStatus({ job, bodyshop, jobRO }) {
|
|||||||
}
|
}
|
||||||
}, [job, setAvailableStatuses, bodyshop]);
|
}, [job, setAvailableStatuses, bodyshop]);
|
||||||
|
|
||||||
console.log("availableStatuses", availableStatuses);
|
|
||||||
console.log("otherStages", otherStages);
|
|
||||||
const statusmenu = (
|
const statusmenu = (
|
||||||
<Menu
|
<Menu
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
|
|||||||
@@ -11,24 +11,54 @@ export default function JobsDocumentsGallerySelectAllComponent({
|
|||||||
const handleSelectAll = () => {
|
const handleSelectAll = () => {
|
||||||
setGalleryImages({
|
setGalleryImages({
|
||||||
...galleryImages,
|
...galleryImages,
|
||||||
|
other: galleryImages.other.map((i) => {
|
||||||
|
return { ...i, isSelected: true };
|
||||||
|
}),
|
||||||
images: galleryImages.images.map((i) => {
|
images: galleryImages.images.map((i) => {
|
||||||
return { ...i, isSelected: true };
|
return { ...i, isSelected: true };
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
const handleSelectAllImages = () => {
|
||||||
|
setGalleryImages({
|
||||||
|
...galleryImages,
|
||||||
|
|
||||||
|
images: galleryImages.images.map((i) => {
|
||||||
|
return { ...i, isSelected: true };
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const handleSelectAllDocuments = () => {
|
||||||
|
setGalleryImages({
|
||||||
|
...galleryImages,
|
||||||
|
other: galleryImages.other.map((i) => {
|
||||||
|
return { ...i, isSelected: true };
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
};
|
||||||
const handleDeselectAll = () => {
|
const handleDeselectAll = () => {
|
||||||
setGalleryImages({
|
setGalleryImages({
|
||||||
...galleryImages,
|
...galleryImages,
|
||||||
|
other: galleryImages.other.map((i) => {
|
||||||
|
return { ...i, isSelected: false };
|
||||||
|
}),
|
||||||
images: galleryImages.images.map((i) => {
|
images: galleryImages.images.map((i) => {
|
||||||
return { ...i, isSelected: false };
|
return { ...i, isSelected: false };
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Button onClick={handleSelectAll}>
|
<Button onClick={handleSelectAll}>
|
||||||
{t("general.actions.selectall")}
|
{t("general.actions.selectall")}
|
||||||
</Button>
|
</Button>
|
||||||
|
<Button onClick={handleSelectAllImages}>
|
||||||
|
{t("documents.actions.selectallimages")}
|
||||||
|
</Button>
|
||||||
|
<Button onClick={handleSelectAllDocuments}>
|
||||||
|
{t("documents.actions.selectallotherdocuments")}
|
||||||
|
</Button>
|
||||||
<Button onClick={handleDeselectAll}>
|
<Button onClick={handleDeselectAll}>
|
||||||
{t("general.actions.deselectall")}
|
{t("general.actions.deselectall")}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -575,7 +575,9 @@
|
|||||||
"documents": {
|
"documents": {
|
||||||
"actions": {
|
"actions": {
|
||||||
"delete": "Delete Selected Documents",
|
"delete": "Delete Selected Documents",
|
||||||
"download": "Download Selected Documents"
|
"download": "Download Selected Documents",
|
||||||
|
"selectallimages": "Select All Images",
|
||||||
|
"selectallotherdocuments": "Select All Other Documents"
|
||||||
},
|
},
|
||||||
"errors": {
|
"errors": {
|
||||||
"deletes3": "Error deleting document from storage. ",
|
"deletes3": "Error deleting document from storage. ",
|
||||||
|
|||||||
@@ -575,7 +575,9 @@
|
|||||||
"documents": {
|
"documents": {
|
||||||
"actions": {
|
"actions": {
|
||||||
"delete": "",
|
"delete": "",
|
||||||
"download": ""
|
"download": "",
|
||||||
|
"selectallimages": "",
|
||||||
|
"selectallotherdocuments": ""
|
||||||
},
|
},
|
||||||
"errors": {
|
"errors": {
|
||||||
"deletes3": "Error al eliminar el documento del almacenamiento.",
|
"deletes3": "Error al eliminar el documento del almacenamiento.",
|
||||||
|
|||||||
@@ -575,7 +575,9 @@
|
|||||||
"documents": {
|
"documents": {
|
||||||
"actions": {
|
"actions": {
|
||||||
"delete": "",
|
"delete": "",
|
||||||
"download": ""
|
"download": "",
|
||||||
|
"selectallimages": "",
|
||||||
|
"selectallotherdocuments": ""
|
||||||
},
|
},
|
||||||
"errors": {
|
"errors": {
|
||||||
"deletes3": "Erreur lors de la suppression du document du stockage.",
|
"deletes3": "Erreur lors de la suppression du document du stockage.",
|
||||||
|
|||||||
Reference in New Issue
Block a user