Skip to content

Commit

Permalink
feat: add date of creation in journal (#4949)
Browse files Browse the repository at this point in the history
  • Loading branch information
sktlmarat authored Mar 27, 2021
1 parent 5728c6e commit be85cad
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 6 deletions.
1 change: 1 addition & 0 deletions app/Models/Journal/Entry.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public function getInfoForJournalEntry()
'month_name' => mb_convert_case(DateHelper::getShortMonth($this->date), MB_CASE_UPPER, 'UTF-8'),
'year' => $this->date->year,
'date' => $this->date,
'created_at' => DateHelper::getShortDateWithTime($this->created_at),
];
}
}
2 changes: 1 addition & 1 deletion public/js/app.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/langs/en.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/vendor.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions public/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"/js/manifest.js": "/js/manifest.js?id=7db827d654313dce4250",
"/js/vendor.js": "/js/vendor.js?id=fd5e7244487d0ac13457",
"/js/app.js": "/js/app.js?id=e6753772c0d5e75b2524",
"/js/vendor.js": "/js/vendor.js?id=e5787b0380465869eedc",
"/js/app.js": "/js/app.js?id=1713cb83bf4ebdae1960",
"/css/app-ltr.css": "/css/app-ltr.css?id=f8d44053a6b962b984b6",
"/css/app-rtl.css": "/css/app-rtl.css?id=f10bd01fc3967dbbe2ed",
"/css/stripe.css": "/css/stripe.css?id=04066fb482310d18299c",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@

<!-- Right column: showing logs -->
<div :class="[ dirltr ? 'fl' : 'fr' ]" class="journal-calendar-content">
<div class="br3 ba b--gray-monica bg-white pr3 pb3 pt3 mb3 journal-line">
<div v-tooltip.top="$t('journal.journal_created_at', { date: entry.created_at })"
class="br3 ba b--gray-monica bg-white pr3 pb3 pt3 mb3 journal-line"
>
<div class="flex">
<!-- Day -->
<div class="flex-none w-10 tc">
Expand Down
1 change: 1 addition & 0 deletions resources/lang/en/journal.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
'journal_add' => 'Add a journal entry',
'journal_edit' => 'Edit a journal entry',
'journal_empty' => 'Empty journal',
'journal_created_at' => 'Created at {date}',
'journal_created_automatically' => 'Created automatically',
'journal_entry_type_journal' => 'Journal entry',
'journal_entry_type_activity' => 'Activity',
Expand Down
1 change: 1 addition & 0 deletions tests/Unit/Models/EntryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public function get_info_for_journal_entry()
'month_name' => 'JAN',
'year' => 2017,
'date' => '2017-01-01 00:00:00',
'created_at' => 'Jan 01, 2017 00:00',
];

$this->assertEquals(
Expand Down

0 comments on commit be85cad

Please sign in to comment.