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>
|
||||
</div>
|
||||
<div className="post__date">
|
||||
<h4>Publish date:</h4>
|
||||
<h4>
|
||||
{postData
|
||||
? postData.publish_date
|
||||
|
|
@ -70,6 +71,34 @@ const Post = () => {
|
|||
value={postData ? postData.summary : ""}
|
||||
></textarea>
|
||||
</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
|
||||
className="post__content__btn"
|
||||
|
|
@ -121,8 +150,8 @@ const Post = () => {
|
|||
<td>{`${parseDate(History.created_at)[0]}, ${
|
||||
parseDate(History.created_at)[1]
|
||||
}`}</td>
|
||||
<td>{`${parseDate(History.updatedAt)[0]}, ${
|
||||
parseDate(History.updatedAt)[1]
|
||||
<td>{`${parseDate(History.updated_at)[0]}, ${
|
||||
parseDate(History.updated_at)[1]
|
||||
}`}</td>
|
||||
</tr>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -3,5 +3,5 @@ export interface LinksAll {
|
|||
name: string;
|
||||
source: string;
|
||||
created_at: Date;
|
||||
updatedAt: Date;
|
||||
updated_at: Date;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ export interface HistoryList {
|
|||
new_published_at: Date;
|
||||
PostID: number;
|
||||
created_at: Date;
|
||||
updatedAt: Date;
|
||||
updated_at: Date;
|
||||
}
|
||||
export interface PostType {
|
||||
id: number;
|
||||
|
|
@ -13,7 +13,7 @@ export interface PostType {
|
|||
publish_date: Date;
|
||||
summary: string;
|
||||
created_at: Date;
|
||||
updatedAt: Date;
|
||||
updated_at: Date;
|
||||
HistoryList: HistoryList[];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ export interface SourceType {
|
|||
name: string;
|
||||
source: string;
|
||||
created_at: Date;
|
||||
updatedAt: Date;
|
||||
updated_at: Date;
|
||||
}
|
||||
|
||||
export interface SourceEditDataType {
|
||||
|
|
|
|||
Loading…
Reference in New Issue