|
@@ -31,6 +31,8 @@ import { courseUser } from "../../../reducers/course-user";
|
|
|
import { tempSet } from "../../../reducers/setting";
|
|
import { tempSet } from "../../../reducers/setting";
|
|
|
import { PopPlacement } from "./WbwPali";
|
|
import { PopPlacement } from "./WbwPali";
|
|
|
import store from "../../../store";
|
|
import store from "../../../store";
|
|
|
|
|
+import TagSelectButton from "../../tag/TagSelectButton";
|
|
|
|
|
+import { ITagData, ITagMapData } from "../../api/Tag";
|
|
|
|
|
|
|
|
interface IWidget {
|
|
interface IWidget {
|
|
|
data: IWbw;
|
|
data: IWbw;
|
|
@@ -41,6 +43,7 @@ interface IWidget {
|
|
|
onSave?: Function;
|
|
onSave?: Function;
|
|
|
onAttachmentSelectOpen?: Function;
|
|
onAttachmentSelectOpen?: Function;
|
|
|
onPopTopChange?: Function;
|
|
onPopTopChange?: Function;
|
|
|
|
|
+ onTagCreate?: Function;
|
|
|
}
|
|
}
|
|
|
const WbwDetailWidget = ({
|
|
const WbwDetailWidget = ({
|
|
|
data,
|
|
data,
|
|
@@ -51,6 +54,7 @@ const WbwDetailWidget = ({
|
|
|
onSave,
|
|
onSave,
|
|
|
onAttachmentSelectOpen,
|
|
onAttachmentSelectOpen,
|
|
|
onPopTopChange,
|
|
onPopTopChange,
|
|
|
|
|
+ onTagCreate,
|
|
|
}: IWidget) => {
|
|
}: IWidget) => {
|
|
|
const intl = useIntl();
|
|
const intl = useIntl();
|
|
|
const [currWbwData, setCurrWbwData] = useState<IWbw>(
|
|
const [currWbwData, setCurrWbwData] = useState<IWbw>(
|
|
@@ -168,6 +172,16 @@ const WbwDetailWidget = ({
|
|
|
}}
|
|
}}
|
|
|
/>
|
|
/>
|
|
|
</Tooltip>
|
|
</Tooltip>
|
|
|
|
|
+ <TagSelectButton
|
|
|
|
|
+ resType="wbw"
|
|
|
|
|
+ resId={data.uid}
|
|
|
|
|
+ disabled={true}
|
|
|
|
|
+ onCreate={(tags: ITagData[]) => {
|
|
|
|
|
+ if (typeof onTagCreate !== "undefined") {
|
|
|
|
|
+ onTagCreate(tags);
|
|
|
|
|
+ }
|
|
|
|
|
+ }}
|
|
|
|
|
+ />
|
|
|
<DiscussionButton
|
|
<DiscussionButton
|
|
|
initCount={data.hasComment ? 1 : 0}
|
|
initCount={data.hasComment ? 1 : 0}
|
|
|
hideCount
|
|
hideCount
|