Added select all images/docs buttons IO-410

This commit is contained in:
Patrick Fic
2021-01-08 10:04:24 -08:00
parent e004abe0cf
commit ddb900bf01
6 changed files with 81 additions and 5 deletions

View File

@@ -8711,6 +8711,48 @@
</translation>
</translations>
</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>
</folder_node>
<folder_node>

View File

@@ -68,8 +68,6 @@ export function JobsChangeStatus({ job, bodyshop, jobRO }) {
}
}, [job, setAvailableStatuses, bodyshop]);
console.log("availableStatuses", availableStatuses);
console.log("otherStages", otherStages);
const statusmenu = (
<Menu
onClick={(e) => {

View File

@@ -11,24 +11,54 @@ export default function JobsDocumentsGallerySelectAllComponent({
const handleSelectAll = () => {
setGalleryImages({
...galleryImages,
other: galleryImages.other.map((i) => {
return { ...i, isSelected: true };
}),
images: galleryImages.images.map((i) => {
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 = () => {
setGalleryImages({
...galleryImages,
other: galleryImages.other.map((i) => {
return { ...i, isSelected: false };
}),
images: galleryImages.images.map((i) => {
return { ...i, isSelected: false };
}),
});
};
return (
<>
<Button onClick={handleSelectAll}>
{t("general.actions.selectall")}
</Button>
<Button onClick={handleSelectAllImages}>
{t("documents.actions.selectallimages")}
</Button>
<Button onClick={handleSelectAllDocuments}>
{t("documents.actions.selectallotherdocuments")}
</Button>
<Button onClick={handleDeselectAll}>
{t("general.actions.deselectall")}
</Button>

View File

@@ -575,7 +575,9 @@
"documents": {
"actions": {
"delete": "Delete Selected Documents",
"download": "Download Selected Documents"
"download": "Download Selected Documents",
"selectallimages": "Select All Images",
"selectallotherdocuments": "Select All Other Documents"
},
"errors": {
"deletes3": "Error deleting document from storage. ",

View File

@@ -575,7 +575,9 @@
"documents": {
"actions": {
"delete": "",
"download": ""
"download": "",
"selectallimages": "",
"selectallotherdocuments": ""
},
"errors": {
"deletes3": "Error al eliminar el documento del almacenamiento.",

View File

@@ -575,7 +575,9 @@
"documents": {
"actions": {
"delete": "",
"download": ""
"download": "",
"selectallimages": "",
"selectallotherdocuments": ""
},
"errors": {
"deletes3": "Erreur lors de la suppression du document du stockage.",