Closed quitriz closed 9 months ago
Hello @quitriz, Please share your URL.
Hello @quitriz, Please share your URL.
Hi, you don't need the url, that's all in the video, I explained clear enough i think, you will see the same thing with the url, and yet, here is what the bug reproduced. with the users that registered or sigin by google that has the "Author" as their title will have that problem, people who signup with Agents title doesn't have that bug, seem like the query gone wrong btwn these keywords that don't group well (maybe you guy meant who signed as "Author" won't post their properties for sale? ), i haven't try other titles roles. so for now, whoever has "Author" title has that mix up problem. I didn't modified any of your codes just the configurations.json, localization files and ..../lib/common/constant.dart as showed in documentation. I don't feel comfortable to give out url or credentials (I can see what's going on with the setup), i report bug to you guys and you should check it, i would love to have them fix or maybe i am wrong then forget it. if it's fixed, it's good for me, good for you, cuz u need that too.
@quitriz Sometimes we need
Hello @quitriz, Please share your URL.
Hi, you don't need the url, that's all in the video, I explained clear enough i think, you will see the same thing with the url, and yet, here is what the bug reproduced. with the users that registered or sigin by google that has the "Author" as their title will have that problem, people who signup with Agents title doesn't have that bug, seem like the query gone wrong btwn these keywords that don't group well (maybe you guy meant who signed as "Author" won't post their properties for sale? ), i haven't try other titles roles. so for now, whoever has "Author" title has that mix up problem. I didn't modified any of your codes just the configurations.json, localization files and ..../lib/common/constant.dart as showed in documentation. I don't feel comfortable to give out url or credentials (I can see what's going on with the setup), i report bug to you guys and you should check it, i would love to have them fix or maybe i am wrong then forget it. if it's fixed, it's good for me, good for you, cuz u need that too.
To streamline the issue identification and resolution process, providing the URL is essential. With the URL, we can swiftly pinpoint the problem without needing to replicate all the scenarios from our end. This expedites the resolution process and ensures efficient problem-solving.
To solve the issue go to packages/houzi_package/lib/pages/realtor_information_page.dart
then look for realtorDataMap()
function. Replace the function with the following:
Map<String, dynamic> realtorDataMap(dynamic item){
Map<String, dynamic> realtorMap = {};
if(isAgent){
realtorMap = {
REALTOR_SEARCH_TYPE : REALTOR_SEARCH_TYPE_AGENT,
REALTOR_SEARCH_ID : item.id,
REALTOR_SEARCH_NAME : item.title,
};
} else if(isAgency){
realtorMap = {
REALTOR_SEARCH_TYPE : REALTOR_SEARCH_TYPE_AGENCY,
REALTOR_SEARCH_ID : item.id,
REALTOR_SEARCH_NAME : item.title,
};
} else {
realtorMap = {
REALTOR_SEARCH_TYPE : REALTOR_SEARCH_TYPE_AUTHOR,
REALTOR_SEARCH_ID : item[tempRealtorIdKey],
REALTOR_SEARCH_NAME : title,
};
}
return realtorMap;
}
Then go to packages/houzi_package/lib/providers/api_providers/houzez_api_provider.dart
and look for provideAllPropertiesApi()
function and replace it following:
@override
Uri provideAllPropertiesApi(String status, int page, int perPage, int userId) {
var queryParameters = {
'page': "$page",
'per_page': "$perPage",
'status': status,
'author': "$userId",
};
var uri = getUri(
unEncodedPath: HOUZEZ_ALL_PROPERTIES_PATH,
params: queryParameters,
);
return uri;
}
To solve the issue go to
packages/houzi_package/lib/pages/realtor_information_page.dart
then look forrealtorDataMap()
function. Replace the function with the following:Map<String, dynamic> realtorDataMap(dynamic item){ Map<String, dynamic> realtorMap = {}; if(isAgent){ realtorMap = { REALTOR_SEARCH_TYPE : REALTOR_SEARCH_TYPE_AGENT, REALTOR_SEARCH_ID : item.id, REALTOR_SEARCH_NAME : item.title, }; } else if(isAgency){ realtorMap = { REALTOR_SEARCH_TYPE : REALTOR_SEARCH_TYPE_AGENCY, REALTOR_SEARCH_ID : item.id, REALTOR_SEARCH_NAME : item.title, }; } else { realtorMap = { REALTOR_SEARCH_TYPE : REALTOR_SEARCH_TYPE_AUTHOR, REALTOR_SEARCH_ID : item[tempRealtorIdKey], REALTOR_SEARCH_NAME : title, }; } return realtorMap; }
Then go to
packages/houzi_package/lib/providers/api_providers/houzez_api_provider.dart
and look forprovideAllPropertiesApi()
function and replace it following:@override Uri provideAllPropertiesApi(String status, int page, int perPage, int userId) { var queryParameters = { 'page': "$page", 'per_page': "$perPage", 'status': status, 'author': "$userId", }; var uri = getUri( unEncodedPath: HOUZEZ_ALL_PROPERTIES_PATH, params: queryParameters, ); return uri; }
Hi Hassan,
There you go :), you are good, you still don't need the url :). this is what i am talking about the professionalism, i was looking at the same place RealtorInfo as well, I am just not a programmer. and yes, thank you, i will do that.
Hi Hassan,
It's now fixed. thank you.
hi Hassan,
it fixed that problem but it created a other related problem, the moderation function stop working. when i logged in, all the users listings not appear on my admin screen for moderation anymore.
this is the new screen, all user listings are gone from my screen. test post is my admin screen.
and the next picture is the one is should be that i able to see other peoples post for moderation.
@quitriz Please mail me imhassan6197@gmail.com to resolve this issue.
The issue has been resolved. For future reference, please adhere to the following points:
Go to packages/houzi_package/lib/blocs/property_bloc.dart file and look for the fetchAllProperties() function. In this function parameter change it from int userId to int? userId. Make it like the following line of code:
Future<List> fetchAllProperties(String status, int page, int perPage, int? userId) async {
...
}
Go to packages/houzi_package/lib/repo/property_repository.dart and look for the fetchAllProperties() function. In this function parameter change it from int userId to int? userId. Make it like the following line of code:
Future<List<dynamic>> fetchAllProperties(String status, int page, int perPage, int? userId) async {
...
}
Go to packages/houzi_package/lib/providers/api_providers/property_api_provider.dart and look for the fetchAllProperties() function. In this function parameter change it from int userId to int? userId. Make it like the following line of code:
Future<Response> fetchAllProperties(String status, int page, int perPage, int? userId, {Map<String, dynamic>? options}) async {
...
}
Go to packages/houzi_package/lib/interfaces/api_provider_interface.dart and look for the provideAllPropertiesApi() function. In this function parameter change it from int userId to int? userId. Make it like the following line of code:
Uri provideAllPropertiesApi(String status, int page, int perPage, int? userId);
Go to packages/houzi_package/lib/providers/api_providers/houzez_api_provider.dart and look for the provideAllPropertiesApi() function. Replace the function with following piece of code:
@override
Uri provideAllPropertiesApi(String status, int page, int perPage, int? userId) {
var queryParameters = {
'page': "$page",
'per_page': "$perPage",
'status': status,
// 'author': "$userId",
};
if (userId != null) {
queryParameters["author"] = "$userId";
}
var uri = getUri(
unEncodedPath: HOUZEZ_ALL_PROPERTIES_PATH,
params: queryParameters,
);
return uri;
}
Go to packages/houzi_package/lib/pages/home_screen_drawer_menu_pages/properties.dart and look for fetchAllProperties() function and replace it with the following code:
Future<List<dynamic>> fetchAllProperties(int page) async {
...
List<dynamic> tempList = await _propertyBloc.fetchAllProperties(status, page, perPage, null);
...
}
Hi Hassan,
I noticed that after the fix for the "Author" thing, You have to logged in in order to views the posts on users' profile, but not the Agents, you can view even you are not logged ịn . is that right?
Thanks
https://github.com/booleanbites/houzi-support/assets/131728470/da69264f-bc71-4f0d-9ede-cbba234e102b
hi, can u double check?
this seem to be mixed up btwn users, specially with this user in the video, the Tuan Dinh Ngoc user with a long google email address, i tried to shorten that see if the error fixed but not quite. can u pleas e fix, when i click view more it went blank screen, and when i list properties from that user it list someone else properties.