from django import forms
from django.contrib.auth.models import User
from django.forms import DateInput
from . import models

MODE_CHOICES = [
    ('0', 'Select Work'),
    ('1', 'Engine Repairering'),
    ('2', 'Painting'),
    ('3', 'Oil Changing'),
    ('4', 'Interior Cleaning'),
    ('5', 'Body Wash'),
    ('6', 'Under Wash')
]

MODE_DEMAND = [
    ('', 'Select Product'),
    ('1', 'CALTEX_Delo_Gold_Ultra'),
    ('2', 'VIC_Hino_Fuel_Filter'),
    ('3', 'CALTEX_Texamatic_1888_Transmision_Oil')
]


class DateInput(forms.DateInput):
    input_type = 'date'

class MyForm4(forms.Form):
    Productid = forms.IntegerField(label="Select Product", required=True, widget=forms.Select(choices=MODE_DEMAND))
    inputdate = forms.DateField(widget=DateInput)


class MyForm5(forms.Form):
 customerid  = forms.IntegerField(label="Select Work To be Done", widget=forms.Select(choices=MODE_CHOICES))



class MyForm2(forms.Form):
 UserName = forms.CharField(label='User Name', widget=forms.TextInput(attrs={'class': 'input_field'}))
 Password = forms.CharField(label='Password', widget=forms.PasswordInput(attrs={'class': 'input_field'}))


MODE_CHOICES2 = [
    ('-', 'Select Availability'),
    ('Yes', 'Available'),
    ('No', 'Not Available')
]

class MyForm3(forms.Form):
 StaffID = forms.CharField(label='Enter Staff ID' )
 Availability = forms.CharField(label="Select Availability", widget=forms.Select(choices=MODE_CHOICES2))


#Demand Forecast
 class RequestForm(forms.ModelForm):
     class Meta:
         model = models.PastData
         fields = ['inputdate']

 class MyFormNew(forms.Form):
     inputdate = forms.DateField(widget=DateInput)

#Customer Frequency
class MyForm(forms.Form):
 customerid  = forms.IntegerField(label='Customer ID', widget=forms.TextInput(attrs={'class': 'input_field', 'required': True}))

#Maitenance Date
MODE_SERVICES = [
    ('0', 'Select Service Type'),
    ('1', 'Full Service')

]


class MyFormServices(forms.Form):
    customerid = forms.IntegerField(label='Enter Customer ID ')
    Vnumber = forms.CharField(label='Enter Vehicle Number ')
    ServiceType = forms.IntegerField(label="Select Service", widget=forms.Select(choices=MODE_SERVICES))

class MyFormNew(forms.Form):
 inputdate = forms.DateField(widget=DateInput)
