-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add #381 Add hash ids instead of actual ID for model routes [WIP] #777
Conversation
Pull from Main
Add webmanifest (monicahq#726)
Change to git clone URL as the git@ will not work without a granted private key.
…icahq#731) When the current day of the month is greater than the number of days in the month, the date class was rolling forward to March.
…ahq#735) This will allow a user to search there contacts by there contact information. It is done by entering the field they are searching by followed by a : then the search term. For example to find a contact with the email [email protected] you would enter email:[email protected]. Fixes monicahq#729
Merge Upstream
Revert "Fix URL::forceSchema to forceScheme (monicahq#730)" (monicahq#744)
Merge Remote
app/Helpers/ID_hasher.php
Outdated
|
||
use Vinkla\Hashids\Facades\Hashids; | ||
|
||
class ID_hasher |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name ID_hasher
is not PSR1 compliant.
Please change it everywhere with idHasher
.
@turtles2 instead of writing |
@djaiss I am unsure on the best way to handle the existing tests. Many of them right now (18) use the model ID in there URL structure that will continue to work. But do we want to change them to use the hashid instead? At first I was thinking that we do but now I think it would be best to leave them as is and only test hashid for the sake of testing hashids. |
@djaiss I have added the hashIDs to the new relationships but I am getting an error "global_relationship_form_new_contact is not defined" on the editing page. I not sure why I am getting this. Besides this error it is ready for merging. |
@turtles2 yes, this error is due to this variable missing in To fix it, until a proper fix arrives, you can do this at the bottom of loadLanguageAsync(window.Laravel.locale, true).then((lang) => {
// the Vue appplication
me.app = new Vue({
i18n,
data: {
activities_description_show: false,
reminders_frequency: 'once',
accept_invite_user: false,
date_met_the_contact: 'known',
global_relationship_form_new_contact: true, ←-----------------HERE
},
methods: {
},
mounted: function() {
// required modules
require('./tags');
require('./search');
require('./contacts');
}
}).$mount('#app');
return app;
}); and recompile the assets ( |
@@ -46,7 +46,7 @@ | |||
@endif | |||
</div> | |||
<div class="table-cell list-actions"> | |||
<a href="{{ route('people.debt.edit', ['people' => $contact->id, 'debtId' => $debt->id]) }}"> | |||
<a href="{{ route('people.debt.edit', [$contact, $debt]) }}"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not keep the named attributes here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@asbiin I would have to test it to be sure but it's one of two reasons. Either there was some quirk in laravels route binding that required it, or I got carried away with find and replace. Looking at I would lean towards the first one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@turtles2 indeed ! The previous version was obviously buggy. Thanks !
We have just switched to Laravel 5.6, so I've updated vinkla/hashids dependency to '^5.0' |
app/Helpers/IdHasher.php
Outdated
|
||
public function decodeId($hash) | ||
{ | ||
if (str_contains($hash, $this->prefix)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it not be better to call starts_with
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@asbiin Yes it would be. I was not aware of that function.
I will take a look tonight and if that's the case hopefully fix it as well.
…On Sat, Apr 7, 2018, 3:32 AM Alexis Saettler ***@***.***> wrote:
Contact deletion seems to be broken, can you confirm ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#777 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ADfAuuzVv3txFV1-zdTGStIrNUl6PVk1ks5tmHm4gaJpZM4RWwP2>
.
|
@turtles2 thanks so much for your patience with this PR. I'm sorry it took so long to merge it. This is an awesome work. |
No worries with changes like this we need to get it right before we ship
…On Sun, Apr 8, 2018, 1:19 PM Régis Freyd ***@***.***> wrote:
@turtles2 <https://github.com/turtles2> thanks so much for your patience
with this PR. I'm sorry it took so long to merge it.
This is an awesome work.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#777 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ADfAurK4GahRex1fHdOd8w554B7EOTwkks5tmlSxgaJpZM4RWwP2>
.
|
This pull request has been automatically locked since there |
This will close #381 . Its current state its a proof of concept it needs the following things which I will work on.