created updated fields added
This commit is contained in:
parent
94aacecaaa
commit
3d7f17c618
|
|
@ -44,6 +44,7 @@ const Post = () => {
|
||||||
<h1 className="post__head">{postData ? postData.title : ""}</h1>
|
<h1 className="post__head">{postData ? postData.title : ""}</h1>
|
||||||
</div>
|
</div>
|
||||||
<div className="post__date">
|
<div className="post__date">
|
||||||
|
<h4>Publish date:</h4>
|
||||||
<h4>
|
<h4>
|
||||||
{postData
|
{postData
|
||||||
? postData.publish_date
|
? postData.publish_date
|
||||||
|
|
@ -70,6 +71,34 @@ const Post = () => {
|
||||||
value={postData ? postData.summary : ""}
|
value={postData ? postData.summary : ""}
|
||||||
></textarea>
|
></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="post__content__block">
|
||||||
|
<h4>Created</h4>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
readOnly
|
||||||
|
value={
|
||||||
|
postData
|
||||||
|
? `${parseDate(postData.created_at)[0]}, ${
|
||||||
|
parseDate(postData.created_at)[1]
|
||||||
|
}`
|
||||||
|
: ""
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="post__content__block">
|
||||||
|
<h4>Updated</h4>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
readOnly
|
||||||
|
value={
|
||||||
|
postData
|
||||||
|
? `${parseDate(postData.updated_at)[0]}, ${
|
||||||
|
parseDate(postData.updated_at)[1]
|
||||||
|
}`
|
||||||
|
: ""
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
className="post__content__btn"
|
className="post__content__btn"
|
||||||
|
|
@ -121,8 +150,8 @@ const Post = () => {
|
||||||
<td>{`${parseDate(History.created_at)[0]}, ${
|
<td>{`${parseDate(History.created_at)[0]}, ${
|
||||||
parseDate(History.created_at)[1]
|
parseDate(History.created_at)[1]
|
||||||
}`}</td>
|
}`}</td>
|
||||||
<td>{`${parseDate(History.updatedAt)[0]}, ${
|
<td>{`${parseDate(History.updated_at)[0]}, ${
|
||||||
parseDate(History.updatedAt)[1]
|
parseDate(History.updated_at)[1]
|
||||||
}`}</td>
|
}`}</td>
|
||||||
</tr>
|
</tr>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -3,5 +3,5 @@ export interface LinksAll {
|
||||||
name: string;
|
name: string;
|
||||||
source: string;
|
source: string;
|
||||||
created_at: Date;
|
created_at: Date;
|
||||||
updatedAt: Date;
|
updated_at: Date;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ export interface HistoryList {
|
||||||
new_published_at: Date;
|
new_published_at: Date;
|
||||||
PostID: number;
|
PostID: number;
|
||||||
created_at: Date;
|
created_at: Date;
|
||||||
updatedAt: Date;
|
updated_at: Date;
|
||||||
}
|
}
|
||||||
export interface PostType {
|
export interface PostType {
|
||||||
id: number;
|
id: number;
|
||||||
|
|
@ -13,7 +13,7 @@ export interface PostType {
|
||||||
publish_date: Date;
|
publish_date: Date;
|
||||||
summary: string;
|
summary: string;
|
||||||
created_at: Date;
|
created_at: Date;
|
||||||
updatedAt: Date;
|
updated_at: Date;
|
||||||
HistoryList: HistoryList[];
|
HistoryList: HistoryList[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ export interface SourceType {
|
||||||
name: string;
|
name: string;
|
||||||
source: string;
|
source: string;
|
||||||
created_at: Date;
|
created_at: Date;
|
||||||
updatedAt: Date;
|
updated_at: Date;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SourceEditDataType {
|
export interface SourceEditDataType {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue