Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 25 21:30
    ibelar synchronize #1544
  • Nov 25 21:30

    ibelar on add-lookup-to-other-vue-form-control

    remove test comment (compare)

  • Nov 25 21:27
    ibelar converted_to_draft #1544
  • Nov 25 21:26
    ibelar opened #1544
  • Nov 25 21:24

    ibelar on add-lookup-to-other-vue-form-control

    init Merge branch 'develop' into fea… improvement (compare)

  • Nov 25 19:52
    mvorisek commented #1539
  • Nov 25 19:51
    mvorisek assigned #1539
  • Nov 25 19:51
    mvorisek commented #1539
  • Nov 25 19:50
    mvorisek commented #1541
  • Nov 25 19:47
    mvorisek assigned #1540
  • Nov 25 19:47
    mvorisek commented #1540
  • Nov 25 18:18
    bedengler commented #1540
  • Nov 25 18:16
    bedengler commented #1540
  • Nov 25 16:08
    bedengler commented #1540
  • Nov 25 14:10
    georgehristov review_requested #1543
  • Nov 25 14:10
    georgehristov review_requested #1543
  • Nov 25 14:10
    georgehristov opened #1543
  • Nov 25 14:10

    georgehristov on wizard-form-no-save-button

    [fix] check if buttonSave set (compare)

  • Nov 24 20:35

    DarkSide666 on multiline-with-contains-many

    (compare)

  • Nov 24 20:35

    DarkSide666 on develop

    fix/ Multiline using containsMa… (compare)

mkrecek234
@mkrecek234
Does anyone have a hint for me why the atk4/ui-develop demo shows nice € amounts, and my version with 'Money' field type does not show € signs? I could not find any trace where to configure that :-(
PhilippGrashoff
@PhilippGrashoff
its also in Persistence/UI IIRC
Svetlozar Kondakov
@skondakov
@mkrecek234 did you try $this->app->ui_persistence->currency
?
Thomas Stokkeland
@stokkeland
i always set $this->ui_persistence->currency = '$';
FabulousGee
@FabulousGee

Hi, though I do not really understand your use case, if you want to add extra conditions to a reference model, do it like this:

            $this->hasMany('Notification', [
                function() {
                    return (new Notification($this->persistence))->addCondition('model_class', get_class($this));
                },
                'their_field' => 'model_id']);

Thanks @PhilippGrashoff for the hint but unfortunately this doesn't work as expected either. I had the problem several times already when trying other workarounds: Fatal Error atk4\data\Exception: Field does not exist
I know that the error normally indicates that the field I am trying to use does not exist in this model so I double and triple checked - it IS there and the name is correct... Indicates that something is wrong already...

As for the use case, we maybe we could try the other way round and talk about the correct way to build the relations first.
Given I want to have two pages in my app. One page shows all existing/created people in a CRUD (PeopleModel). People have a name and a boolean flag "employee". Then there is a second model, the NoteModel which represents a small text attached to a single employee (so it is attached to a PeopleModel with employee = true with the hasOne relation)
The second page should show all notes that are available. With the CRUD right there I want to be able to create new notes for employees only. For now, the table only held employee's notes but when creating a new note, all entities are shown (not only employees) This is why I wanted to add the condition.
Maybe I am wrong with my design in general?

PhilippGrashoff
@PhilippGrashoff
Hi,
If this exception rises, that would mean that Model->init() wasnt executed. That happens when no persistence is passed, e.g:
new SomeModel() //init() not executed
new SomeModel($somePersistence) //like $this->persistence or $app->db. init() is executed
aaaah thanks for the explanation, makes sense
PhilippGrashoff
@PhilippGrashoff
$this->hasOne(
    'people_model_id', 
    [
        function() {
            return (new PeopleModel($this->persistence))->addCondition('employee', 'true');
        },
        'caption' => 'Whateveryoulike' //though hasOne() nowadays pulls caption from referenced model I think
    ]
);
if the field NoteModel is called people_model_id that should do it
try join the new discord chat for faster answers, much more going on there: https://discord.gg/TefeSe
FabulousGee
@FabulousGee

Thanks, that did the trick... I was using another variant of inserting persistence ($this->app->db). I tried "this->persistence" now and it works like a charm. Seems like I have to switch using this variant for the future :-)
So thanks again for the help and patience!

Will look into discord - thx for the heads up!
Stay healthy!

PhilippGrashoff
@PhilippGrashoff
np youre welcome
very strange, I cant see why $this->app->db shouldnt do the same
will point to exactly the same object
mkrecek234
@mkrecek234
Hi Philipp, can you send me another invite for Discord? Guys, looking for a library to send emails eg. via SMTP. Anyone has code already for that?
mkrecek234
@mkrecek234
What I still miss is to add an individual Action Button for delete into a grid - I know, for the pro it is simple, but I struggle to add this (other than adding a addColumn('delete') which does not look nice. I wish we had more code examples for defining actions of buttons (inside a grid, or in the menu of a grid) - this still puzzles me: eg change a record, save it and then show a jsNotify after the modal was close. Delete record. Change field of record and store without modal. All certainly easy, but the examples always only give a alert. 2. What also is corrupted is the rendering of the 'id' inside a link: $table->addColumn('name', new \atk4\ui\TableColumn\Link(['details', 'id' => '{$id}'])); it opens detail, but does not include the link (example ui-develop/table.php)
PhilippGrashoff
@PhilippGrashoff
Marco 'Lubber' Wienkoop
@lubber-de
@mkrecek234 SwiftMailer or PHPMailer are the standards since ages with and do also support SMTP. Both are equally good IMHO https://packagist.org/packages/swiftmailer/swiftmailer
https://packagist.org/packages/phpmailer/phpmailer
Thomas Stokkeland
@stokkeland
horizontal menus.. is there any way to make them wrap/stack on narrow screens?
UI 1.7
PhilippGrashoff
@PhilippGrashoff
@stokkeland sorry for the late reply. I'd check what Fomantic UI offers here, they surely have a solution for this. And if you are lucky, you just have to add 1 or 2 classes to the menu
Thomas Stokkeland
@stokkeland
oh yeah.. from their site looks like it supports stackable, it didnt work when i tried adding just the class, but i'll look into it further
Bagus A Priambada
@iam-adty
how to add our own css class / styles?
Bagus A Priambada
@iam-adty
how to override template used by view?
PhilippGrashoff
@PhilippGrashoff
HI @iam-adty, its best if you join our new Discord chat, there is much more going on than here: https://discord.gg/QVKSk2B
1 reply
Marc Fargas
@telenieko
Hi! Is there a list of supported backends of Agile Data? (db types it can talk to)
BTW the online UI demo has some pages on error: table2.php, interactive/ console, modal and loader.php atleast
PhilippGrashoff
@PhilippGrashoff
Hi Marc, best join our Discord channel, there is much more going on there: https://discord.gg/QVKSk2B
1 reply