Принудительное обновление задачи
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 * as UnreadedFlagNs from '../misc-components/unreaded-flag';
|
||||
import { SetIssueReadingTimestamp } from '../utils/unreaded-provider';
|
||||
import axios from 'axios';
|
||||
|
||||
export const Store = types.model({
|
||||
visible: types.boolean,
|
||||
|
|
@ -40,16 +41,20 @@ export type Props = {
|
|||
};
|
||||
|
||||
export const IssueDetailsDialog = observer((props: Props): JSX.Element => {
|
||||
// DEBUG: begin
|
||||
useEffect(() => {
|
||||
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}`);
|
||||
});
|
||||
// DEBUG: end
|
||||
const onUpdateClick = (e: React.MouseEvent) => {
|
||||
const url = `/redmine-event-emitter/append-issues`;
|
||||
axios.post(url, [props.store.issue.id]);
|
||||
};
|
||||
const onCloseClick = (e: React.MouseEvent) => {
|
||||
e.stopPropagation();
|
||||
props.store.hide();
|
||||
};
|
||||
return (
|
||||
<div className={Css.modal} style={props.store.displayStyle}>
|
||||
<div className={Css.modalContent}>
|
||||
<h1>
|
||||
<button onClick={(e) => {e.stopPropagation(); props.store.hide();}}>close</button>
|
||||
<button onClick={onCloseClick}>close</button>
|
||||
<button onClick={onUpdateClick}>force update</button>
|
||||
<IssueHrefNs.IssueHref
|
||||
id={props.store.issue?.id || -1}
|
||||
subject={props.store.issue?.subject || ''}
|
||||
|
|
|
|||
Loading…
Reference in a new issue