Принудительное обновление задачи
This commit is contained in:
parent
a64ddd0c2f
commit
410559c2e1
1 changed files with 11 additions and 6 deletions
|
|
@ -6,6 +6,7 @@ import * as IssueHrefNs from '../misc-components/issue-href';
|
||||||
import Css from './issue-details-dialog.module.css';
|
import Css from './issue-details-dialog.module.css';
|
||||||
import * as UnreadedFlagNs from '../misc-components/unreaded-flag';
|
import * as UnreadedFlagNs from '../misc-components/unreaded-flag';
|
||||||
import { SetIssueReadingTimestamp } from '../utils/unreaded-provider';
|
import { SetIssueReadingTimestamp } from '../utils/unreaded-provider';
|
||||||
|
import axios from 'axios';
|
||||||
|
|
||||||
export const Store = types.model({
|
export const Store = types.model({
|
||||||
visible: types.boolean,
|
visible: types.boolean,
|
||||||
|
|
@ -40,16 +41,20 @@ export type Props = {
|
||||||
};
|
};
|
||||||
|
|
||||||
export const IssueDetailsDialog = observer((props: Props): JSX.Element => {
|
export const IssueDetailsDialog = observer((props: Props): JSX.Element => {
|
||||||
// DEBUG: begin
|
const onUpdateClick = (e: React.MouseEvent) => {
|
||||||
useEffect(() => {
|
const url = `/redmine-event-emitter/append-issues`;
|
||||||
console.debug(`Issue detailts dialog: issue_id=${props.store.issue.id}; subject=${props.store.issue?.subject || '-'}; description=${props.store.issue.description}; visible=${props.store.visible}`);
|
axios.post(url, [props.store.issue.id]);
|
||||||
});
|
};
|
||||||
// DEBUG: end
|
const onCloseClick = (e: React.MouseEvent) => {
|
||||||
|
e.stopPropagation();
|
||||||
|
props.store.hide();
|
||||||
|
};
|
||||||
return (
|
return (
|
||||||
<div className={Css.modal} style={props.store.displayStyle}>
|
<div className={Css.modal} style={props.store.displayStyle}>
|
||||||
<div className={Css.modalContent}>
|
<div className={Css.modalContent}>
|
||||||
<h1>
|
<h1>
|
||||||
<button onClick={(e) => {e.stopPropagation(); props.store.hide();}}>close</button>
|
<button onClick={onCloseClick}>close</button>
|
||||||
|
<button onClick={onUpdateClick}>force update</button>
|
||||||
<IssueHrefNs.IssueHref
|
<IssueHrefNs.IssueHref
|
||||||
id={props.store.issue?.id || -1}
|
id={props.store.issue?.id || -1}
|
||||||
subject={props.store.issue?.subject || ''}
|
subject={props.store.issue?.subject || ''}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue