• Product / Portfolio Work
    • False
    • False
    • VMMgmt - Train-31

      This issue is about to implement "time ago" (instead of date time) fields for the different fields

      • Identities
        • Users
          • List (created field)
          • Groups (created field)
        • Groups
          • List (created field)
          • Users (created field)

      Use https://day.js.org/docs/en/display/from-now, this library will have to be installed and RelativeTime to be extended. It requires a bit of refactoring for the whole console project, which I recommend

      In one hand it would be to add a new config.ts file at the root of the src folder, containing

      import dayjs from 'dayjs';
      import relativeTime from 'dayjs/plugin/relativeTime';
      
      export type Config = {
        dateConfig: () => void;
      };
      
      const config = {
        dateConfig() {
          dayjs.extend(relativeTime);
        },
      };
      
      export default config;
      

      then App.tsx file will be modified by adding

        useEffect(() => {
          config.dateConfig()
        })
      

        1. screenshot-1.png
          15 kB
          Enrique Mingorance Cano

              emingora Enrique Mingorance Cano
              emingora Enrique Mingorance Cano
              Atif Shafi Atif Shafi
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: