We’re currently experiencing a high volume of inquiries and our response time could be up to 2 days. We apologize for the delay, and thank you for your patience. Our available time: 2 AM - 1 PM (Monday - Friday) (UTC+0 Timezone).

Okay
  Public Ticket #2497884
issues
Closed

Comments

  • proprangers started the conversation

    1. I upgraded but found that I had updated "Investors" and "city" words but now they are again visible ? I check in translations but they are correct ? How to correct it now ?

    2. I had updated "STATUS" fields also in the code file you had suggested. Now after upgrade  its again back to the original state ? Shal I make the changes again in that same file ?

  •  2,567
    Support replied

    Hi,

    1. Translation files are updated in /resources/lang folder, you have to backup what you changes or publish translations from database again.

    2. You have to manage what you changes. It is overridden when you replace folder platform/plugins. You need to backup file platform/plugins/real-estate/src/Enums/PropertyStatusEnum.php and platform/plugins/real-estate/src/Enums/ProjectStatusEnum.php.

  • proprangers replied

    I have resolved the language issues. Also since I have updated the files for STATUS.

    Now I found that on the front it is showing the changed ( new ) status of projects. But on the admin side it's not showing that status. Kindly check the snapshot. How to resolve it ?

    I can see that STATUS is not in search filters , then what is the use of the status field ? Is there any functionality connected to STATUS or it's simply for display  purpose ?

  • proprangers replied

    snapshot

  •  2,567
    Support replied

    Hi,

    Please show me what you changes in PropertyStatusEnum.php and ProjectStatusEnum.php

    Make sure you also change in function toHtml().

  • proprangers replied

    You forgot to answer this query


    I can see that STATUS is not in search filters , then what is the use of the status field ? Is there any functionality connected to STATUS or it's simply for display  purpose ??



  • proprangers replied

    <?php

    namespace Botble\RealEstate\Enums;

    use Botble\Base\Supports\Enum;
    use Html;

    /**
     * @method static ProjectStatusEnum NOT_AVAILABLE()
     * @method static ProjectStatusEnum PRE_SALE()
     * @method static ProjectStatusEnum SELLING()
     * @method static ProjectStatusEnum SOLD()
     * @method static ProjectStatusEnum BUILDING()
     */
    class ProjectStatusEnum extends Enum
    {
        public const NOT_AVAILABLE = 'not_available';
        public const PRE_SALE = 'pre_sale';
        public const SELLING = 'selling';
        public const SOLD = 'sold';
        public const BUILDING = 'building';
        public const UNDERCONSTRUCTION = 'Under construction';
        public const READYTOMOVEIN = 'Ready to move in';
        public const NEWLAUNCH = 'New launch';

        /**
         * @var string
         */
        public static $langPath = 'plugins/real-estate::project.statuses';

        /**
         * @return string
         */
        public function toHtml()
        {
            switch ($this->value) {
                case self::NOT_AVAILABLE:
                    return Html::tag('span', self::NOT_AVAILABLE()->label(), ['class' => 'label-default status-label'])
                        ->toHtml();
                case self::PRE_SALE:
                    return Html::tag('span', self::PRE_SALE()->label(), ['class' => 'label-warning status-label'])
                        ->toHtml();
                case self::SELLING:
                    return Html::tag('span', self::SELLING()->label(), ['class' => 'label-success status-label'])
                        ->toHtml();
                case self::SOLD:
                    return Html::tag('span', self::SOLD()->label(), ['class' => 'label-danger status-label'])
                        ->toHtml();
                case self::BUILDING:
                    return Html::tag('span', self::BUILDING()->label(), ['class' => 'label-info status-label'])
                        ->toHtml();
                case self::BUILDING:
                    return Html::tag('span', self::UNDERCONSTRUCTION()->label(), ['class' => 'label-info status-label'])
                        ->toHtml();
                case self::BUILDING:
                    return Html::tag('span', self::READYTOMOVEIN()->label(), ['class' => 'label-info status-label'])
                        ->toHtml();
                case self::BUILDING:
                    return Html::tag('span', self::NEWLAUNCH()->label(), ['class' => 'label-info status-label'])
                        ->toHtml();
                default:
                    return null;
            }
        }
    }

  •  2,567
    Support replied

    Hi,

    It's wrong.

    3745130444.png
  • proprangers replied

    OOPS :)