-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated lease header files and initial work on other file headers (#4018
- Loading branch information
1 parent
e29c6f3
commit 6a67c02
Showing
35 changed files
with
709 additions
and
685 deletions.
There are no files selected for viewing
50 changes: 50 additions & 0 deletions
50
source/frontend/src/components/common/HeaderField/AuditSection.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { Col, Row } from 'react-bootstrap'; | ||
import styled from 'styled-components'; | ||
|
||
import { UserNameTooltip } from '@/components/common/UserNameTooltip'; | ||
import { Api_LastUpdatedBy } from '@/models/api/File'; | ||
import { ApiGen_Base_BaseAudit } from '@/models/api/generated/ApiGen_Base_BaseAudit'; | ||
import { prettyFormatUTCDate } from '@/utils'; | ||
|
||
export interface IAuditSectionProps { | ||
baseAudit: ApiGen_Base_BaseAudit; | ||
lastUpdatedBy: Api_LastUpdatedBy; | ||
} | ||
|
||
export const AuditSection: React.FC<IAuditSectionProps> = ({ baseAudit, lastUpdatedBy }) => { | ||
return ( | ||
<> | ||
<Row className="no-gutters"> | ||
<Col className="text-right"> | ||
<StyledSmallText> | ||
<strong>Created: </strong> | ||
{prettyFormatUTCDate(baseAudit?.appCreateTimestamp)} by{' '} | ||
<UserNameTooltip | ||
userName={baseAudit?.appCreateUserid} | ||
userGuid={baseAudit?.appCreateUserGuid} | ||
/> | ||
</StyledSmallText> | ||
</Col> | ||
</Row> | ||
<Row className="no-gutters"> | ||
<Col className="text-right"> | ||
<StyledSmallText> | ||
<strong>Updated: </strong> | ||
{prettyFormatUTCDate(lastUpdatedBy?.appLastUpdateTimestamp)} by{' '} | ||
<UserNameTooltip | ||
userName={lastUpdatedBy?.appLastUpdateUserid} | ||
userGuid={lastUpdatedBy?.appLastUpdateUserGuid} | ||
/> | ||
</StyledSmallText> | ||
</Col> | ||
</Row> | ||
</> | ||
); | ||
}; | ||
|
||
export default AuditSection; | ||
|
||
const StyledSmallText = styled.span` | ||
font-size: 0.87em; | ||
line-height: 1.9; | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.