-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Simple transaction overview * Added test for GetPortfolioTransaction * Added simple UI form for viewing and editing transactions
- Loading branch information
Showing
21 changed files
with
1,218 additions
and
578 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<script lang="ts"> | ||
import { Timestamp } from '@bufbuild/protobuf'; | ||
import dayjs from 'dayjs'; | ||
export let format = 'YYYY-MM-DD HH:mm'; | ||
export let date: Timestamp | undefined = new Timestamp(); | ||
export let initial = false; | ||
let internal: string; | ||
function input(x: Timestamp | undefined) { | ||
console.log(initial); | ||
if (initial) { | ||
return; | ||
} else { | ||
// only do this once because otherwise we encounter a bug where the year 0002 is parsed as 1902 | ||
initial = true; | ||
if (x !== undefined) { | ||
internal = dayjs(x.toDate()).format(format); | ||
} else { | ||
internal == ''; | ||
} | ||
} | ||
} | ||
function output(x: string) { | ||
if (x !== '') { | ||
date = Timestamp.fromDate(dayjs(x, format).toDate()); | ||
} else { | ||
//date = undefined; | ||
} | ||
} | ||
$: input(date); | ||
$: output(internal); | ||
</script> | ||
|
||
<input | ||
type="datetime-local" | ||
name="type" | ||
id="type" | ||
class="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 | ||
placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6" | ||
bind:value={internal} | ||
/> |
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.