Web:Client:Add tag with providerType, change onSelectType to onSelectOption.
This commit is contained in:
parent
085306c74f
commit
cf4559f486
@ -5,9 +5,28 @@ import Tags from "@docspace/common/components/Tags";
|
||||
import Tag from "@docspace/components/tag";
|
||||
import { RoomsTypeTranslations } from "@docspace/common/constants";
|
||||
|
||||
const TagsCell = ({ t, item, tagCount, onSelectTag, onSelectType }) => {
|
||||
const TagsCell = ({ t, item, tagCount, onSelectTag, onSelectOption }) => {
|
||||
const styleTagsCell = {
|
||||
width: "100%",
|
||||
overflow: "hidden",
|
||||
display: item.thirdPartyIcon ? "flex" : "",
|
||||
};
|
||||
|
||||
return (
|
||||
<div style={{ width: "100%", overflow: "hidden" }}>
|
||||
<div style={styleTagsCell}>
|
||||
{item.providerType && (
|
||||
<Tag
|
||||
icon={item.thirdPartyIcon}
|
||||
label={item.providerKey}
|
||||
onClick={() =>
|
||||
onSelectOption({
|
||||
option: "typeProvider",
|
||||
value: item.providerType,
|
||||
})
|
||||
}
|
||||
/>
|
||||
)}
|
||||
|
||||
{item.tags.length > 0 ? (
|
||||
<Tags
|
||||
tags={item.tags}
|
||||
@ -18,7 +37,12 @@ const TagsCell = ({ t, item, tagCount, onSelectTag, onSelectType }) => {
|
||||
<Tag
|
||||
isDefault
|
||||
label={t(RoomsTypeTranslations[item.roomType])}
|
||||
onClick={() => onSelectType(item.roomType)}
|
||||
onClick={() =>
|
||||
onSelectOption({
|
||||
option: "defaultTypeRoom",
|
||||
value: item.roomType,
|
||||
})
|
||||
}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user