<?xml version="1.0" encoding="UTF-8"?>
<!--
 * This file is part of FacturaScripts
 * Copyright (C) 2017-2025 Carlos Garcia Gomez <carlos@facturascripts.com>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 *
 * @author Artex Trading sa     <jcuello@artextrading.com>
 * @author Carlos García Gómez  <carlos@facturascripts.com>
-->
<view>
    <columns>
        <group name="data" numcolumns="12" valign="bottom">
            <column name="code" title="nick" order="100">
                <widget type="text" fieldname="nick" icon="fa-solid fa-hashtag" maxlength="50" required="true"
                        readonly="dinamic"/>
            </column>
            <column name="email" order="110">
                <widget type="email" fieldname="email" icon="fa-solid fa-envelope"/>
            </column>
            <column name="new-password" order="120">
                <widget type="password" fieldname="newPassword" icon="fa-solid fa-key"/>
            </column>
            <column name="repeat-new-password" order="130">
                <widget type="password" fieldname="newPassword2" icon="fa-solid fa-key"/>
            </column>
        </group>
        <group name="other" numcolumns="12">
            <column name="language" order="100">
                <widget type="select" fieldname="langcode">
                    <values/>
                </widget>
            </column>
            <column name="homepage" order="110">
                <widget type="select" fieldname="homepage">
                    <values/>
                </widget>
            </column>
            <column name="company" titleurl="ListEmpresa" level="99" order="120">
                <widget type="select" fieldname="idempresa" onclick="EditEmpresa" required="true">
                    <values source="empresas" fieldcode="idempresa" fieldtitle="nombrecorto"/>
                </widget>
            </column>
            <column name="warehouse" titleurl="ListAlmacen" level="99" order="130">
                <widget type="select" fieldname="codalmacen" parent="idempresa" onclick="EditAlmacen" required="true">
                    <values source="almacenes" fieldcode="codalmacen" fieldtitle="nombre" fieldfilter="idempresa"/>
                </widget>
            </column>
            <column name="serie" titleurl="ListSerie" level="99" order="140">
                <widget type="select" fieldname="codserie" onclick="EditSerie">
                    <values source="series" fieldcode="codserie" fieldtitle="descripcion"/>
                </widget>
            </column>
            <column name="agent" titleurl="ListAgente" level="99" order="150">
                <widget type="select" fieldname="codagente" onclick="EditAgente">
                    <values source="agentes" fieldcode="codagente" fieldtitle="nombre"/>
                </widget>
            </column>
        </group>
        <group name="advanced" title="advanced" icon="fa-solid fa-sliders" numcolumns="12" valign="bottom">
            <column name="is-admin" level="99" numcolumns="3" order="100">
                <widget type="checkbox" fieldname="admin"/>
            </column>
            <column name="enabled" level="99" numcolumns="3" order="110">
                <widget type="checkbox" fieldname="enabled"/>
            </column>
        </group>
        <group name="info" numcolumns="12" valign="bottom">
            <column name="level" level="99" order="100">
                <widget type="number" step="1" min="1" max="99" fieldname="level" icon="fa-solid fa-low-vision"/>
            </column>
            <column name="creation-date" order="110">
                <widget type="date" fieldname="creationdate" readonly="true"/>
            </column>
            <column name="last-activity" order="120">
                <widget type="datetime" fieldname="lastactivity" readonly="true"/>
            </column>
            <column name="last-ip" level="99" order="130">
                <widget type="text" fieldname="lastip" readonly="true"/>
            </column>
            <column name="browser" level="99" numcolumns="12" order="140">
                <widget type="textarea" fieldname="lastbrowser" readonly="true"/>
            </column>
        </group>
    </columns>
</view>